Notepad Project (1) For Practical
Notepad Project (1) For Practical
1. Introduction 4
2. Objective 6
3. Methodology 7
4. FeaturesImplemented 8
5. DataFlowDiagram 9
6. EntityRelationshipDiagram(DFD) 11
7. NavigationTree
12
8.
TableDesign,DataDictionary 15
9.
SDLC-WaterFallModel 17
10. InputFormWithData 27
11. CodingWithHeadingForEachProgram 31
12. AdvantagesAndLimitationsOfSystem 51
13. ConclusionAndReferences,Bibliography 53
1
The aim of this project was to develop a user-friendly and efficient
notepad application that allows users to create, edit, organize, and
synchronize their notes across various devices. The project involved
designing and implementing the application, incorporating essential
features, testing forfunctionality and usability, and ensuring robust security
measures
In today's fast-paced digital age, the need for efficient and user-
friendlytoolsfornote-takinganddocumentdraftinghasbecome paramount.
Notepad applications have emerged as essential software solutions, catering
to a wide range of users, from students and professionals to individuals
managing their personal tasks and ideas.
2
Overview:
Text Editing: Users will be able to type, edit, and format text using
basic formatting options such as font styles, sizes, and colors. Essential
editing features like copy, cut, paste, undo, and redo will also be
incorporated to facilitate seamless text manipulation.
Note Management: The application will provide users with the ability
to create, save, open, and delete notes effortlessly. An intuitive user
interface will allow for easy navigation and organization of notes, ensuring
users can efficiently manage their digital workspace.
Customization Options: To enhance the user experience, the
application will offer customization options such as theme selection,
background colors, and font preferences. Users will have the flexibility to
personalize the appearance of their workspace according to their
preferences and aesthetic preferences.
3
Developauser-friendlyinterfacefornotecreationandmanagement.
Implementsynchronizationfunctionalitytoensureseamlessaccessto notes
Incorporatefeaturesfororganizingnotes,suchasfolders,tags,and search
capabilities.
accesscontrols.
Testtheapplicationthoroughlytoidentifyandaddressanybugsorusability
issues.
Providedocumentationandsupportforuserstoeffectivelyutilizethe notepad
application.
4
The development process followed an iterative approach, with
continuous feedback from stakeholders and testing at each stage. The
project was divided into the following phases:
5
Thenotepadapplicationincludesthefollowingkeyfeatures:
Notecreation,editing,anddeletionfunctionality.
Synchronizationofnotesacrossmultipledevicesinreal-time.
Organizationofnotesusingfolders,tags,andsearchfunctionality.
multimedia support.
Collaborationfeatures,suchassharingnotesandleavingcomments.
Secureaccesscontrolsandencryptiontoprotectuserdata.
6
+ +
| Notepad |
+ + +
|
|
+ v +
| UserInterface |
+ + +
|
|
+ v +
| Controller |
+ + +
|
|
+ v +
| Database |
+ +
7
Description
Notepad:Representsthemainsystemorapplication.
and synchronization.
Database:Storesallthenotes,userpreferences,andotherrelevantdata.
Itfacilitatesdatamanagementandensuresdataintegrityandsecurity
8
9
Home
- Dashboard
- ListofNotes
- ViewNote
- EditNote
- DeleteNote
- CreateNewNote
Folders
- ListofFolders
- ViewFolder
- EditFolder
- DeleteFolder
- CreateNewFolder
Tags
- ListofTags
- ViewTag
- Edit Tag
- Delete Tag
- CreateNewTag
SharedwithMe
- ListofSharedNotes
- ViewSharedNote
Settings
- Profile
- EditProfile
- Security
ChangePassword
- Two-FactorAuthentication
Logout
10
Description:
1) Home:
Landingpageorstartingpointoftheapplication.
2) Dashboard:
Overviewofnotesandfolders,allowinguserstonavigatetodifferent
sections.
3) ListofNotes:
Displaysallnotesbelongingtotheuser.
Optionstoview,edit,anddeleteindividualnotes.
4) CreateNewNote:
Allowsuserstocreateanewnote.
5) Folders:
Sectionformanagingfolders.
6) ListofFolders:
Displaysallfolderscreatedbytheuser.
Optionstoview,edit,anddeleteindividualfolders.
7) CreateNewFolder:
Allowsuserstocreateanewfolder.
8) Tags:
Sectionformanagingtags.
Listof Tags
Displaysalltagscreatedbytheuser.
Optionstoview,edit,anddeleteindividualtags.
11
9) CreateNewTag:
Allowsuserstocreateanewtag.
10) SharedwithMe:
Sectionfornotessharedwiththeuserbyothers.
11) Settings:
Sectionforusersettingsandpreferences.
12) Profile:
Allowsuserstoviewandedittheirprofileinformation.
13) Security:
Allowsuserstomanagesecurity-relatedsettingssuchaspassword
and two-factor authentication.
14) Logout:
Logstheuseroutoftheapplication.
12
13
14
The Waterfall Model was the first Process Model to be introduced. It is
also referred to as a linear-sequential life cycle model. It is very simple to
understand and use.
In a waterfall model, each phase must be completed before the next phase
can begin and there is no overlapping in the phases.
The Waterfall model is the earliest SDLC approach that was used for
software development.
ThewaterfallModelillustratesthesoftwaredevelopmentprocessinalinear
sequential flow.
This means that any phase in the development process begins only if the
previous phase is complete. In this waterfall model, the phases do not
overlap.
The following illustration is a representation of the different phases of the
Waterfall Mode
15
ThesequentialphasesinWaterfallmodelare−
Requirement Gathering and analysis − All possible requirements of
thesystemtobedevelopedarecapturedinthisphaseanddocumentedin a
requirement specification document.
System Design − The requirement specifications from first phase are
studied in this phase and the system design is prepared. This system
designhelpsinspecifyinghardwareandsystemrequirementsandhelps in
defining the overall system architecture.
Implementation − With inputs fromthe system design,the system is
firstdevelopedinsmallprogramscalledunits,whichareintegratedin
16
thenextphase.Eachunitisdevelopedandtestedforitsfunctionality, which is
referred to as Unit Testing.
Integration and Testing − All the units developed in the
implementationphaseareintegratedintoasystemaftertestingofeach unit.
Post integration the entire system is tested for any faults and failures.
Deploymentofsystem−Oncethefunctionalandnon-functionaltesting
isdone;theproductisdeployedinthecustomerenvironmentorreleased into
the market.
Maintenance − There are some issues which come up in the client
environment.Tofixthoseissues,patchesarereleased.Alsotoenhance the
product some better versions are released. Maintenance is done to
deliver these changes in the customer environment.
WaterfallModel-Application
Every software developed is different and requires a suitable SDLC
approach to be followed based on the internal and external factors. Some
situations where the use of
Waterfallmodelismostappropriateare−
Requirementsareverywelldocumented,clearandfixed.
Productdefinitionisstable.
Technologyisunderstoodandisnot dynamic.
Therearenoambiguousrequirements.
Ampleresourceswithrequiredexpertiseareavailabletosupporttheproduct.
Theprojectisshort
17
WaterfallModel-Advantages
The advantages of waterfall development are that it allows for
departmentalization and control.Some of the major advantages of the
Waterfall Model are as follows −
Simpleandeasytounderstandanduse
Easytomanageduetotherigidityofthemodel.Eachphasehasspecificdeliverable
and a review process.
Phasesareprocessedandcompletedoneata time.
Workswellforsmallerprojectswhererequirementsareverywellunderstood.
Clearlydefinedstages.
Wellunderstoodmilestones.
Easytoarrangetasks.
Processandresultsarewelldocumented
18
DataDictionary:
UserTable:
id:Uniqueidentifierforeachuser.
username:Uniqueusernameusedforloginauthentication.
email:Uniqueemailaddressassociatedwiththeuser'saccount.
password_hash:Hashedrepresentationoftheuser'spasswordfor
security.
NoteTable:
id:Uniqueidentifierforeachnote.
title:Titleofthenote.
content:Textualcontentofthenote.
created_at:Timestampindicatingwhenthenotewascreated.
updated_at:Timestampindicatingwhenthenotewaslastupdated.
user_id:Foreignkeyreferencingtheuserwhocreatedthenote.
FolderTable:
id:Uniqueidentifierforeachfolder.
name:Nameofthefolder.
user_id:Foreignkeyreferencingtheuserwhoownsthefolder.
Note_FolderTable(Many-to-ManyRelationship):
id:UniqueidentifierforeachrecordintheNote_Foldertable.
note_id:Foreignkeyreferencingthenoteassociatedwithafolder.
folder_id:Foreignkeyreferencingthefolderassociatedwithanote.
19
DETAILEDDESCRIPTIONOFTECHNOLOGIES USED
FRONTEND
HTML:
CSS:
CascadingStyleSheets,fondlyreferredtoasCSS,isasimpledesign language intended
to simplify the process of making web pages presentable.
20
CSShandlesthelookandfeelpartofawebpage.UsingCSS,youcan
controlthecolorofthetext,thestyleoffonts,thespacingbetween paragraphs,
how columns are sized and laid out, what background imagesor colors are
used, layout designs, variations in display for different devices
andscreensizesaswellasavarietyofothereffects.CSSiseasytolearn and
understand but it provides powerful control over the presentation of an
HTMLdocument.Mostcommonly,CSSiscombinedwiththemarkuplanguages
HTML or XHTML.
AdvantagesofCSS
CSS saves time
Pages load faster
Easymaintenance
Superior styles to HTML
MultipleDeviceCompatibility
Global web standards
CSSVersions
Cascading Style Sheets level 1 (CSS1) came out of W3C as a
recommendation in December 1996.
This version describes the CSS language as well as a simple visual
formatting model for all the HTML tags.
CSS2 became a W3C recommendation in May 1998 and builds on CSS1.
This version adds support for media-specific style sheets e.g. printers and
aural devices, downloadable fonts, element positioning and tables.
21
JAVASCRIPT
JavaScript is a dynamic computer programming language. It is lightweight
and most commonly used as a part of web pages, whose implementations
allowclient-sidescripttointeractwiththeuserandmakedynamic pages.It is an
interpreted programming language with object-oriented capabilities.
JavaScript was first known as Live Script, but Netscape changed its name
to JavaScript, possibly because of the excitement being generated by Java.
JavaScriptmadeitsfirstappearanceinNetscape2.0in1995withthename Live
Script. The general-purpose core of the language has been embedded in
Netscape, Internet Explorer, and other web browsers.
AdvantagesofJavaScript:
Less server interaction
Immediate feedback to the
visitorsIncreasedinteractivity
Richer interfaces.
LimitationsofJavaScript:
Client-sideJavaScriptdoesnotallowthereadingorwritingoffiles.This has
been kept for security reason.
JavaScriptcannotbeusedfornetworkingapplicationsbecausethereisno such
support available.
JavaScript doesn't have any multi-threading or multiprocessor capabilities.
Onceagain,JavaScriptisalightweight,interpretedprogramminglanguage that
allows you to build interactivity into otherwise static HTML pages.
22
BOOTSTRAP
Twitter Bootstrap is the most popular front-end framework in the recent
time. It is sleek, intuitive, and powerful mobile first front-end framework
forfasterandeasierwebdevelopment.ItusesHTML,CSSandJavaScript. This
tutorial will teach you the basics of Bootstrap Framework using which you
can create web projects with ease. The tutorial is divided into sections
such as Bootstrap Basic Structure, Bootstrap CSS, Bootstrap Layout
Components and Bootstrap Plugins. Each of these sections contain related
topics with simple and useful examples.
WhytoLearnBootstrap:
Mobile first approach
Browser Support
Easy to get started
Responsive design
ApplicationsofBootstrap
Scaffolding
CSS
Components
JavaScriptPlugins
Customize
23
BACKEND
MYSQL
24
Dashboard
Registrationpage
25
Login page
Notepagedashboard
26
Writeyournoteshere
NoteSaved
27
Edityournote
Deleteyournote
28
Dashboard
<%@pagelanguage="java"contentType="text/html;charset=ISO-
8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>LoginPage</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<%@includefile="all_component/navbar.jsp"%>
<divclass="container-fluiddiv-color">
<div class="row">
<divclass="col-md-4offset-md-4">
<divclass="cardmt-4">
<divclass="card-headertext-centertext-
whitebg-
<iclass="fafa-user-plusfa-3x" aria-
custom">hidden="t
<h4>LoginPage</h4>
rue"></i> </div>
<%
StringinvalidMsg= (String)
session.getAttribute("login-faild");
if(invalidMsg!=null){
%>
29
<divclass="alertalert-danger"
role="alert"><%=invalidMsg%></div>
<%
session.removeAttribute("login-failed");
}
%>
<%
StringwithoutLogin=(String)
session.getAttribute("Login-error");
if(withoutLogin!=null){
%>
<divclass="alertalert-danger"
role="alert"><%=withoutLogin%></div>
<%
session.removeAttribute("Login-error");
}
%>
<%
String
lgMsg=(String)session.getAttribute("logoutMsg");
if(lgMsg!=null)
{%>
<divclass="alertalert-success" role="alert"><
%=lgMsg%></div>
<%
session.removeAttribute("logoutMsg");
30
}
%>
<divclass="card-body">
<formaction="loginServlet"
method="post">
<divclass="form-group">
<label>Enter
Email</label><input type="email"
class="form-control"
id="exampleInputEmail1"
aria-
describedby="emailHelp"name="uemail">
</div>
<divclass="form-group">
<label
for="exampleInputPassword1">EnterPassword</label><input
type="password"
class="form-control" id="exampleInputPassword1"
name="upassword">
</div>
<button type="submit"
class="btnbtn-primary
badge-pillbtn-block">Login</button>
</form>
</div>
</div>
31
</div>
</div>
</div>
<divclass="container-fluidbg-darkmt-1">
<pclass="text-centertext-white">Note:AnyErrorsoccurthen
contact R.Bamnawat, A.Jagtap, Y.Thombre .Designed and
developed by Rohan Bamnawat, Aditya Jagtap,
YuvrajThombre</p>
<pclass="text-centertext-white">AllRightReserved
@Rohan,Aaditya,Yuvraj-2022-25</p>
</div>
</body>
</html>
Registration
<%@pagelanguage="java"contentType="text/html;charset=ISO-
8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>RegisterPage</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<%@includefile="all_component/navbar.jsp"%>
<divclass="container-fluiddiv-color">
32
<div class="row">
<divclass="col-md-4offset-md-4">
<divclass="cardmt-4">
<divclass="card-headertext-centertext-
whitebg-
<iclass="fafa-user-plusfa-3x" aria-
custom">hidden="t
<h4>Registration</h4>
rue"></i> </div>
<%
StringregMsg=(String)
session.getAttribute("reg-sucess");
if(regMsg!=null){
%>
<divclass="alertalert-success"
role="alert"><%=regMsg%>Login
<ahref="login.jsp">ClickHere</a>
</div>
<%
session.removeAttribute("reg-sucess");
}
%>
<%
StringFailedMsg=(String)
session.getAttribute("failed-msg");
33
if(FailedMsg !=null){
%>
<divclass="alertalert-danger"
role="alert"><%=FailedMsg%></div>
<%
session.removeAttribute("failed-msg");
}
%>
<divclass="card-body">
<formaction="UserServlet"
method="post">
<divclass="form-group">
<label>Enter Full
Name</label><inputtype="text"
class="form-control"
id="exampleInputEmail1"
aria-
describedby="emailHelp"name="fname">
</div>
<divclass="form-group">
<label>Enter
Email</label><input type="email"
class="form-control"
id="exampleInputEmail1"
aria-
describedby="emailHelp"name="uemail">
</div>
<divclass="form-group">
34
<label
for="exampleInputPassword1">EnterPassword</label><input
type="password"
class="form-control" id="exampleInputPassword1"
name="upassword">
</div>
<button type="submit"
class="btnbtn-primary
badge-pillbtn-block">Register</button>
</form>
</div>
</div>
</div>
</div>
</div>
<divclass="container-fluidbg-darkmt-1">
<pclass="text-centertext-white">Note:AnyErrorsoccurthen
contact R.Bamnawat, A.Jagtap, Y.Thombre ..Designed and
developed by Rohan Bamnawat, Aditya Jagtap,
YuvrajThombre</p>
<pclass="text-centertext-white">AllRightReserved
@Rohan,Aaditya,Yuvraj-2022-25</p>
</div>
</body>
</html>
35
Loginpage
<%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>LoginPage</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<%@includefile="all_component/navbar.jsp"%>
<divclass="container-fluiddiv-color">
<divclass="row">
<divclass="col-md-4offset-md-4">
<divclass="cardmt-4">
<divclass="card-headertext-centertext-white
bg-custom">
<iclass="fafa-user-plusfa-3x"aria-
hidden="true"></i> <h4>LoginPage</h4>
</div>
<%
StringinvalidMsg=(String)
session.getAttribute("login-faild");
if(invalidMsg!=null){
%>
<divclass="alertalert-danger" role="alert"><
%=invalidMsg%></div>
<%
session.removeAttribute("login-failed");
}
%>
<%
36
StringwithoutLogin=(String)
session.getAttribute("Login-error");
if(withoutLogin!=null){
%>
<divclass="alertalert-danger" role="alert"><
%=withoutLogin%></div>
<%
session.removeAttribute("Login-error");
}
%>
<%
String
lgMsg=(String)session.getAttribute("logoutMsg");
if(lgMsg!=null)
{%>
<divclass="alertalert-success" role="alert"><%=lgMsg
%></div>
<%
session.removeAttribute("logoutMsg");
}
%>
<divclass="card-body">
<formaction="loginServlet"
method="post"> <divclass="form-group">
<label>EnterEmail</label>
<inputtype="email"
37
class="form-control"
id="exampleInputEmail1"
aria-
describedby="emailHelp"name="uemail">
</div>
<divclass="form-group">
<label
for="exampleInputPassword1">EnterPassword</label><input
type="password"
class="form-control" id="exampleInputPassword1"
name="upassword">
</div>
<buttontype="submit"
class="btnbtn-primarybadge-
pillbtn-block">Login</button>
</form>
</div>
</div>
</div>
</div>
</div>
<divclass="container-fluidbg-darkmt-1">
<pclass="text-centertext-white">Note::AnyErrorsoccurthen contact
R.Bamnawat, A.Jagtap, Y.Thombre ..Designed and developed by
Rohan Bamnawat, Aditya Jagtap, YuvrajThombre</p>
<pclass="text-centertext-white">AllRightReserved
@Rohan,Aaditya,Yuvraj-2022-25</p>
</div>
</body>
</html>
38
Notepagedashboard
<%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%
UserDetailsuser2=(UserDetails)session.getAttribute("userD");
if(user2==null){
response.sendRedirect("login.jsp");
session.setAttribute("Login-error","PleaseLogin..");
}
%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>Inserttitlehere</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<divclass="container-fluid">
<%@includefile="all_component/navbar.jsp"%>
<divclass="cardpy-3">
<divclass="car-bodytext-center">
<imgalt=""src="img/note.jpg"class="img-fluidmx-auto"style="max-
width:350px;">
<h1>STARTTAKINGYOUROWNNOTES</h1>
<ahref="addNotes.jsp"class="btnbtn-outline-primary">StartHere</a>
</div>
</div>
</div>
<%@includefile="all_component/footer.jsp"%>
</body>
</html>
39
Addyournote
<%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%
UserDetailsuser1=(UserDetails)session.getAttribute("userD");
if(user1==null){
response.sendRedirect("login.jsp");
session.setAttribute("Login-error","PleaseLogin..");
}
%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>AddNotes</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<divclass="container-fluid">
<%@includefile="all_component/navbar.jsp"%>
<h1class="text-center">AddYourNotes</h1>
<divclass="container">
<divclass="row">
<divclass="col-md-12">
<formaction="AddNotesServlet"
method="post">
<divclass="form-group">
<%
UserDetailsus=
(UserDetails)session.getAttribute("userD");
if(us!=null)
{%>
40
<inputtype="hidden" value="<
%=us.getId() %>" name="uid">
<%}
%>
<label
for="exampleInputEmail1">EnterTitle</label><input
type="text"class="form-
control"id="exampleInputEmail1"
aria-describedby="emailHelp"
name="title"required="required">
</div>
<divclass="form-group">
<label
for="exampleInputEmail1">EnterContent</label>
<textarearows="10"cols=""
class="form-control"name="content"
required="required"></textarea>
</div>
<divclass="containertext-center">
<buttontype="submit"class="btn
btn-primary">AddNotes</button>
</div>
</form>
</div>
</div>
</div>
</div>
<%@includefile="all_component/footer.jsp"%>
</body>
</html>
41
Edityournote
<%@pageimport="com.User.Post"%>
<%@pageimport="java.util.List"%>
<%@pageimport="com.Db.DBConnect"%>
<%@pageimport="com.DAO.PostDAO"%>
<%@pagelanguage="java"contentType="text/html;charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%
UserDetailsuser1=(UserDetails)session.getAttribute("userD");
if(user1==null){
response.sendRedirect("login.jsp");
session.setAttribute("Login-error","PleaseLogin..");
}
%>
<!DOCTYPEhtml>
<html>
<head>
<metacharset="ISO-8859-1">
<title>EditNotes:</title>
<%@includefile="all_component/allcss.jsp"%>
</head>
<body>
<%
Integernoteid=Integer.parseInt(request.getParameter("note_id"));
PostDAOpost=newPostDAO(DBConnect.getConn()); Post
p = post.getDataById(noteid);
42
%>
<divclass="container-fluid">
<%@includefile="all_component/navbar.jsp"%>
<h1class="text-center">EditYourNotes</h1>
<divclass="container">
<divclass="row">
<divclass="col-md-12">
<formaction="NoteEditServlet"
method="post">
<inputtype="hidden"value="<%=noteid%>"
name="noteid">
<divclass="form-group">
<label
for="exampleInputEmail1">EnterTitle</label><input
type="text"class="form-
control"id="exampleInputEmail1"
aria-describedby="emailHelp"
name="title"required="required"value="<%=p.getTitle()%>">
</div>
<divclass="form-group">
<label
for="exampleInputEmail1">EnterContent</label>
<textarearows="10"cols=""
class="form-control"name="content"
required="required"><%=p.getContent()%></textarea>
</div>
43
<divclass="containertext-center">
<buttontype="submit"class="btn
btn-primary">AddNotes</button>
</div>
</form>
</div>
</div>
</div>
</div>
<%@includefile="all_component/footer.jsp"%>
</body>
</html>
MySql
User connection:
packagecom.DAO;
importjava.sql.Connection;
importjava.sql.PreparedStatement;
import java.sql.ResultSet;
importjava.util.ArrayList;
import java.util.List;
importcom.User.Post;
publicclassPostDAO{
44
privateConnectionconn;
publicPostDAO(Connectionconn){ super();
this.conn=conn;
}
publicbooleanAddNotes(Stringti,Stringco,intui){ boolean f
= false;
try{
Stringqu="insertintopost(title,content,uid)
values(?,?,?)";
PreparedStatementps=
conn.prepareStatement(qu);
ps.setString(1, ti);
ps.setString(2,co);
ps.setInt(3, ui);
inti=ps.executeUpdate(); if
(i == 1) {
f=true;
}
}catch(Exceptione){
}
return f;
}
publicList<Post>getData(intid)
45
{
List<Post> list = newArrayList<Post>();
Post po = null;
try{
Stringqu="select*frompostwhereuid=?orderby id
DESC";
PreparedStatementps=conn.prepareStatement(qu);
ps.setInt(1, id);
ResultSetrs=ps.executeQuery();
while(rs.next())
{
po=new Post();
po.setId(rs.getInt(1));
po.setTitle(rs.getString(2));
po.setContent(rs.getString(3));
po.setPdate(rs.getTimestamp(4));
list.add(po);
}
}catch(Exceptione){
}
returnlist;
}
publicPostgetDataById(intnoteId)
{
Postp=null;
try {
Stringqu="select*frompostwhereid=?";Prepared
Statementps =
conn.prepareStatement(qu);
46
ps.setInt(1,noteId);
ResultSetrs=ps.executeQuery();
if(rs.next()) {
p= new Post();
p.setId(rs.getInt(1));
p.setTitle(rs.getString(2));
p.setContent(rs.getString(3));
}
}catch(Exceptione){
e.printStackTrace();
}
returnp;
}
publicbooleanPostUpdate(intnid,Stringti,Stringco)
{
booleanf=false;
try{
Stringqu="updatepostsettitle=?,content=?
whereid=?";
PreparedStatementps=
conn.prepareStatement(qu);
ps.setString(1, ti);
ps.setString(2,co);
ps.setInt(3, nid);
inti=ps.executeUpdate();
47
if(i==1){
f=true;
}
}catch(Exception e) {
e.printStackTrace();
}
return f;
}
publicbooleanDeleteNotes(intnid)
{
booleanf=false; try
Stringqu="deletefrompostwhereid=?";PreparedS
tatementps =
conn.prepareStatement(qu);
ps.setInt(1,nid);
intx=ps.executeUpdate(); if(x==1)
{
f=true;
}
}catch(Exception e) {
e.printStackTrace();
}
return f;
}
}
48
Advantages:
Ease of Use: Notepad applications are typically designed to be simple and
intuitive, making them easy for users to understand and navigate without
extensive training.
49
Limitations:
Limited Features: Notepad applications typically lack advanced features
found in full-fledged word processing software like Microsoft Word or
Google Docs. Users may find them insufficient for complex document
formatting, advanced editing, or document sharing needs.
50
Conclusion:
However, it's essential for users to carefully evaluate the features and
limitations of notepad applications to ensure they meet their specific needs.
Factors such as compatibility, security, organization capabilities, and
collaboration features should be considered when selecting a notepad
application.
Overall, while notepad applications may not be suitable for every use case,
they remain valuable tools in the digital age, providing an efficient and
accessible platform for capturing and organizing information.
51
References/Bibliography:
1) https://www.javatpoint.com/java-tutorial
2) https://www.geeksforgeeks.org/java/
3) https://www.w3schools.com/MySQL/default.asp
4) JavaByComparison:BecomeaJavaCraftsmanin70Examples
52