20f208-Java Mini Project - Merged
20f208-Java Mini Project - Merged
Submitted by
of
BACHELOR OF ENGINEERING
in
INFORMATION TECHNOLOGY
JULY 2022
CERTIFICATE
Certified that this project report titled “To do list” is the bonafide work of
20F208 – BHARATH KUMAR S , who carried out the project under my supervision
.Certified further , that to the best of my knowledge the work reported here in does not
form part of any other project report.
I understand the policy on plagiarism and declare that the project and publications
are my own work ,except where specifically acknowledged and has not been copied from
other sources or been previously submitted for award or assessment.
VIKKRAM.R
Faculty-In-charge
Examiner I Examiner II
18PE04 / 18FE04/18SE04 ADVANCED
JAVA PROGRAMMING
ROLL NO 20F208
B
SECTION
18PE04 / 18FE04/18SE04 Advanced Java Programming Mini project report
TABLE OF CONTENTS
Page
S.No. Mini-Project Title Topics Covered No.
1. To Do List
2. Can Update Status of To Do Tasks
Evaluation criteria
Mini-Project Title Coding Output Demonstra Viva Total Signature of the Faculty In
tion Voce
charge with date
30 30 30 Marks 10 100
Marks Marks Marks Marks
TO DO LIST
Review
Can Update To do Tasks
Review
Overall Mini-Project Marks (100)
CO6
(100)
PROJECT DESCRIPTION:
User data :
Overview:
AddTask : It is Used to add Task into the database
update Task: This function is used to update the task date , status , duedate , etc…!!.
For the operation to be successful, the following conditions are to be met.
1. The Input given to change the taskname and the taskname should be correct
2. The task from which details are retrieved should be entered Correctly
If all these conditions are met, the task can be entered into the Table and updated at any time when it
needs to get updated Table Name : To DOList
Values for this table will be hardcoded directly.
Class Description
update
taskname • used to update the taskname in the todo list
update
duedate
• This is used to update the due date of a task stored in the db for that you need
to enter the correct taskname which should be changed
Update Status
This is used to update the status of the task it requires taskname which should be
get updated
This is used Display the task name and their due date description and etc
Display all
• This is used to display all the values present in the todo list table
Package: com.kce.bank.service
Class Method and Variables Description
To Do List Main class
public static void main(String[] args)
The code that is needed to test your program goes here. A sample code is shown at
the end of the document.
Remove
Tasks
This is used to remove the Taskname from the to do list for that you need to enter
the taskname which needs to be deleted
Main Method:
You can write code in the main method and test all the above test cases. A sample code of the
main method to test the first test case is shown below for your reference.
import java.sql.DriverManager;
Connection conn;
Class.forName("com.mysql.cj.jdbc.Driver");
if (conn != null) {
System.out.println("connected");
} else {
System.out.println("not connected");
return conn;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Scanner;
Connection conn;
conn = connect.getConnection();
Statement stmt;
stmt = conn.createStatement();
while (true) {
if (check.equals("Insert")) {
PreparedStatement pstmt;
pstmt.setString(1, taskname);
pstmt.setString(2, date);
pstmt.setString(3, duedate);
pstmt.setString(4, status);
pstmt.setString(5, taskdesc);
pstmt.executeUpdate();
System.out.println("****************************************************************************
*****");
continue;
if (check.equals("removeTask")) {
PreparedStatement pstmt1;
pstmt1.setString(1,del );
pstmt1.executeUpdate();
System.out.println("****************************************************************************
*****");
continue;
if (check.equals("updateStatus")) {
PreparedStatement pstmt2;
pstmt2.setString(2,tas);
pstmt2.setString(1,status);
pstmt2.executeUpdate();
System.out.println("****************************************************************************
*****");
continue;
if (check.equals("updateDuedate")){
PreparedStatement pstmt3;
pstmt3.setString(2,Taskname);
pstmt3.setString(1,duedate);
pstmt3.executeUpdate();
System.out.println("****************************************************************************
*****");
continue;
if (check.equals("changeDescription")){
PreparedStatement pstmt4;
pstmt4.setString(1,description);
pstmt4.setString(2,tasks);
pstmt4.executeUpdate();
System.out.println("****************************************************************************
*****");
continue;
if (check.equals("DisplayTasks")){
PreparedStatement preparedStatement ;
String ts = sc.nextLine();
preparedStatement.setString(1,ts);
ResultSet rs ;
rs =preparedStatement.executeQuery();
while (rs.next()){
System.out.println(rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3) + " " + rs.getString(4) + " "
+ rs.getString(5));
continue;
if (check.equals("displayall")){
PreparedStatement pstate ;
while (rst.next()){
System.out.println(rst.getString(1) + " " + rst.getString(2) + " "+ rst.getString(3) + " " + rst.getString(4) +
" " +rst.getString(5)) ;
continue;
if (check.equals("QuitApp")){
System.out.println("Quitted");
break;
OUTPUT 1 :
OUTPUT 2 :
OUTPUT 4:
OUTPUT 5 :
OUTPUT 7:
OUTPUT 8 :