0% found this document useful (0 votes)
8 views

To-Do list Application in java project

The document is a micro project report for a To-Do List application developed by students of the Sanjay Bhokare Group of Institutes, focusing on task management and user-friendly interface. The project aims to enhance productivity through functionalities like adding, viewing, and removing tasks, while reinforcing Java programming concepts. Future enhancements are suggested, including task prioritization and a graphical user interface.

Uploaded by

ajimlaptop720
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

To-Do list Application in java project

The document is a micro project report for a To-Do List application developed by students of the Sanjay Bhokare Group of Institutes, focusing on task management and user-friendly interface. The project aims to enhance productivity through functionalities like adding, viewing, and removing tasks, while reinforcing Java programming concepts. Future enhancements are suggested, including task prioritization and a graphical user interface.

Uploaded by

ajimlaptop720
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Shree Ambabai Talim Sanstha’s

SANJAY BHOKARE GROUP OF INSTITUTES, MIRAJ


FACULTY OF POLYTECHNIC
Institute Code:1552
Department of Artifical Intelligence
and
Machine Learning Engineering
Micro Project Report
On

To-Do list Application


Prepared By
SR NAME OF STUDENT ROLL NO. ENROLLEMENT NO.
NO.
1. LOKHANDE ADITYARAJ ARJUN 2219 23213180020
2. MAGDUM SALMAN ABDULKADAR 2220 23213180022
3. MOMIN SAKIBMOHAMMED SHAKIL 2221 23213180025

Under The Guidance Of


Ms. S. P. Sakhalkar
Submitted To

Maharashtra State Board of Technical Education, Mumbai


(Autonomous) (ISO-9001-2008) (ISO/IEC 27001:2013)
Academic Year 2024-2025
MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION
Certificate
(Only for Micro Project report)

This is to certify that following student,


Roll no Enrollment No. Exam seat No Name
2219 23213180020 LOKHANDE
ADITYARAJ ARJUN
2220 23213180022 MAGDUM SALMAN
ABDULKADAR
2221 23213180025 MOMIN
SAKIBMOHAMMED
SHAKIL

Of 4rd Semester of Diploma in Artifical Intelligence and Machine Learning


Engineering, of institute ATS Sanjay Bhokare Group Of Institutes, Faculty of
Polytechnic, Miraj (code:1552) have completed the Micro Project Work
Satisfactorily in course JAVA PROGRAMMING (314317) For the academic year
2024-25 as prescribed in the curriculum

Place: Miraj.

Date: ……………

Subject Teacher Head of the Department Principal


Title of Micro Project:
To-Do list Application

1.0 Brief Introduction


In today's fast-paced world, effective task management is essential for personal productivity and
organization. The To-Do List application is designed to help users efficiently manage their tasks,
ensuring that important activities are not overlooked. This project aims to provide a simple yet
effective solution for individuals seeking to enhance their time management skills and streamline
their daily routines.
The To-Do List application allows users to create, view, and remove tasks through a user-friendly
console interface. By offering basic functionalities such as adding tasks, viewing the current list
of tasks, and removing completed or unnecessary tasks, this application serves as a practical tool
for anyone looking to organize their workload.

2.0 Aim of the Micro-Project

This Micro-Project aims to:

1. Task Organization: Provide a structured way to manage and prioritize tasks.


2. User -Friendly Interface: Create an intuitive console interface for easy navigation.
3. Task Management: Enable quick addition and removal of tasks.
4. Task Viewing: Allow users to view their current tasks clearly.
5. Data Persistence: Implement features to save and retrieve tasks between sessions.
6. Error Handling: Incorporate mechanisms to guide users through invalid inputs.
7. Scalability: Design for future enhancements like due dates and a GUI.
8. Learning Experience: Reinforce Java programming concepts and practical skills.

Team Members :

1. LOKHANDE ADITYARAJ ARJUN


2. MAGDUM SALMAN ABDULKADAR
3. MOMIN SAKIBMOHAMMED SHAKIL
3.0 Resources Required
Name of
S.N. Specifications Quantity Remarks
Resource/Material

Java Development Kit Version 8 or higher for Required for compiling


1 1
(JDK) compatibility with Swing and running Java code.

Integrated Development Eclipse, IntelliJ IDEA, or For coding, debugging,


2 1
Environment (IDE) NetBeans and project management.

Included with JDK; no


Built-in Java library for
3 Swing Library N/A separate installation
GUI development
needed.

Open Exchange Rates,


Optional for real-time
4 Exchange Rate API CurrencyLayer, or 1
exchange rates.
similar

Oracle's Java
For reference and learning
5 Documentation documentation and N/A
purposes.
Swing tutorials

For managing code


Git or GitHub for version
6 Version Control System 1 versions and
control
collaboration.

To ensure functionality
JUnit or similar for unit
7 Testing Framework 1 and reliability of the
testing
application.
4.0 Source Code and Output
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.Border;

class Task extends JPanel {

JLabel index;
JTextField taskName;
JButton done;

Color pink = new Color(255, 161, 161);


Color green = new Color(188, 226, 158);
Color doneColor = new Color(233, 119, 119);

private boolean checked;

Task() {
this.setPreferredSize(new Dimension(400, 20)); // set size of task
this.setBackground(pink); // set background color of task

this.setLayout(new BorderLayout()); // set layout of task

checked = false;

index = new JLabel(""); // create index label


index.setPreferredSize(new Dimension(20, 20)); // set size of index
label
index.setHorizontalAlignment(JLabel.CENTER); // set alignment of index
label
this.add(index, BorderLayout.WEST); // add index label to task

taskName = new JTextField("Write something.."); // create task name


text field
taskName.setBorder(BorderFactory.createEmptyBorder()); // remove border
of text field
taskName.setBackground(pink); // set background color of text field

this.add(taskName, BorderLayout.CENTER);

done = new JButton("Done");


done.setPreferredSize(new Dimension(80, 20));
done.setBorder(BorderFactory.createEmptyBorder());
done.setBackground(doneColor);
done.setFocusPainted(false);

this.add(done, BorderLayout.EAST);

public void changeIndex(int num) {


this.index.setText(num + ""); // num to String
this.revalidate(); // refresh
}

public JButton getDone() {


return done;
}

public boolean getState() {


return checked;
}

public void changeState() {


this.setBackground(green);
taskName.setBackground(green);
checked = true;
revalidate();
}
}

class List extends JPanel {

Color lightColor = new Color(252, 221, 176);


List() {

GridLayout layout = new GridLayout(10, 1);


layout.setVgap(5); // Vertical gap

this.setLayout(layout); // 10 tasks
this.setPreferredSize(new Dimension(400, 560));
this.setBackground(lightColor);
}

public void updateNumbers() {


Component[] listItems = this.getComponents();

for (int i = 0; i < listItems.length; i++) {


if (listItems[i] instanceof Task) {
((Task) listItems[i]).changeIndex(i + 1);
}
}

public void removeCompletedTasks() {

for (Component c : getComponents()) {


if (c instanceof Task) {
if (((Task) c).getState()) {
remove(c); // remove the component
updateNumbers(); // update the indexing of all items
}
}
}

}
}

class Footer extends JPanel {

JButton addTask;
JButton clear;

Color orange = new Color(233, 133, 128);


Color lightColor = new Color(252, 221, 176);
Border emptyBorder = BorderFactory.createEmptyBorder();

Footer() {
this.setPreferredSize(new Dimension(400, 60));
this.setBackground(lightColor);

addTask = new JButton("Add Task"); // add task button


addTask.setBorder(emptyBorder); // remove border
addTask.setFont(new Font("Sans-serif", Font.ITALIC, 20)); // set font
addTask.setVerticalAlignment(JButton.BOTTOM); // align text to bottom
addTask.setBackground(orange); // set background color
this.add(addTask); // add to footer

this.add(Box.createHorizontalStrut(20)); // Space between buttons

clear = new JButton("Clear finished tasks"); // clear button


clear.setFont(new Font("Sans-serif", Font.ITALIC, 20)); // set font
clear.setBorder(emptyBorder); // remove border
clear.setBackground(orange); // set background color
this.add(clear); // add to footer
}

public JButton getNewTask() {


return addTask;
}

public JButton getClear() {


return clear;
}
}

class TitleBar extends JPanel {

Color lightColor = new Color(252, 221, 176);

TitleBar() {
this.setPreferredSize(new Dimension(400, 80)); // Size of the title bar
this.setBackground(lightColor); // Color of the title bar
JLabel titleText = new JLabel("To Do List"); // Text of the title bar
titleText.setPreferredSize(new Dimension(200, 60)); // Size of the text
titleText.setFont(new Font("Sans-serif", Font.BOLD, 20)); // Font of
the text
titleText.setHorizontalAlignment(JLabel.CENTER); // Align the text to
the center
this.add(titleText); // Add the text to the title bar
}
}
class AppFrame extends JFrame {

private TitleBar title;


private Footer footer;
private List list;

private JButton newTask;


private JButton clear;

AppFrame() {
this.setSize(400, 600); // 400 width and 600 height
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Close on exit
this.setVisible(true); // Make visible

title = new TitleBar();


footer = new Footer();
list = new List();

this.add(title, BorderLayout.NORTH); // Add title bar on top of the


screen
this.add(footer, BorderLayout.SOUTH); // Add footer on bottom of the
screen
this.add(list, BorderLayout.CENTER); // Add list in middle of footer
and title

newTask = footer.getNewTask();
clear = footer.getClear();

addListeners();
}

public void addListeners() {


newTask.addMouseListener(new MouseAdapter() {
@override
public void mousePressed(MouseEvent e) {
Task task = new Task();
list.add(task); // Add new task to list
list.updateNumbers(); // Updates the numbers of the tasks

task.getDone().addMouseListener(new MouseAdapter() {
@override
public void mousePressed(MouseEvent e) {

task.changeState(); // Change color of task


list.updateNumbers(); // Updates the numbers of the
tasks
revalidate(); // Updates the frame

}
});
}

});

clear.addMouseListener(new MouseAdapter() {
@override
public void mousePressed(MouseEvent e) {
list.removeCompletedTasks(); // Removes all tasks that are done
repaint(); // Repaints the list
}
});
}

public class ToDoList {

public static void main(String args[]) {


AppFrame frame = new AppFrame(); // Create the frame
}
}

@interface override {

}
 Output
5.0. Conclusion
The To-Do List application successfully addresses the need for effective task management in a user-
friendly manner. By providing essential functionalities such as adding, viewing, and removing tasks, the
application empowers users to organize their daily activities and enhance their productivity.
Throughout the development process, we have implemented core Java programming concepts,
including object-oriented design and data handling, which not only solidified our understanding of the
language but also demonstrated its practical applications in real-world scenarios.
While the current version of the application serves as a solid foundation, there are numerous
opportunities for future enhancements. Potential improvements could include the addition of features
such as task prioritization, due date management, and a graphical user interface, which would further
enrich the user experience.
In summary, this project has not only fulfilled its primary objectives but has also provided valuable
insights into software development and user-centered design. We look forward to continuing the
evolution of this application and exploring new functionalities that can further assist users in managing
their tasks effectively.

Micro-Project Evaluation Sheet

Process Assessment Product Assessment Total


Part A - Project Methodology Part B - Project individual Marks
Project (2 marks) Report/Working Presentation/Viva 10
Proposal Model (4 marks)
(2 marks) (2 marks)

Note:
Every course teacher is expected to assign marks for group evolution for each group of students in first 3
columns as per rubrics & individual evaluation in 4TH column for each group of studentsas per rubrics
based on viva.

Comments/Suggestions about teamwork/leadership/inter-personal communication (if any)


………………………………………………………………………………………………
……………………………………………………………………………………………..
……………………………………………………………………………………………..
……………………………………………………………………………………………..

Any Other Comment:


……………………………………………………………………………………………
……………………………………………………………………………………………
……………………………………………………………………………………………
………………………………………………………………………………………………
Name and designation of the Faculty Member…………………………………….

Signature………………………………………………………………………………

Date:……………………..

You might also like