Some of CareBook features are adapted from the AddressBook-Level3 project created by the SE-EDU initiative. As such, CareBook contains some of the code and documentation from AddressBook-Level3.
The list of third-party libraries used are: JavaFX, Jackson, JUnit5
Refer to the guide Setting up and getting started.
The Architecture Diagram given above explains the high-level design of the App.
Given below is a quick overview of main components and how they interact with each other.
Main components of the architecture
Main
(consisting of classes Main
and MainApp
) is in charge of the app launch and shut down.
The bulk of the app's work is done by the following four components:
UI
: The UI of the App.Logic
: The command executor.Model
: Holds the data of the App in memory.Storage
: Reads data from, and writes data to, the hard disk.Commons
represents a collection of classes used by multiple other components.
How the architecture components interact with each other
The Sequence Diagram below shows how the components interact with each other for the scenario where the user issues the command delete A10A
.
Each of the four main components (also shown in the diagram above),
interface
with the same name as the Component.{Component Name}Manager
class (which follows the corresponding API interface
mentioned in the previous point.For example, the Logic
component defines its API in the Logic.java
interface and implements its functionality using the LogicManager.java
class which follows the Logic
interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
The API of this component is specified in Ui.java
The UI consists of a MainWindow
that is made up of parts e.g.CommandBox
, ResultDisplay
, StudentListPanel
, StatusBarFooter
etc. All these, including the MainWindow
, inherit from the abstract UiPart
class which captures the commonalities between classes that represent parts of the visible GUI.
The UI
component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml
files that are in the src/main/resources/view
folder. For example, the layout of the MainWindow
is specified in MainWindow.fxml
The UI
component,
Logic
component.Model
data so that the UI can be updated with the modified data.Logic
component, because the UI
relies on the Logic
to execute commands.Model
component, as it displays Student
object residing in the Model
.API : Logic.java
Here's a (partial) class diagram of the Logic
component:
The sequence diagram below illustrates the interactions within the Logic
component, taking execute("delete A10A")
API call as an example.
Note: The lifeline for DeleteStudentCommandParser
should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the Logic
component works:
Logic
is called upon to execute a command, it is passed to an AddressBookParser
object which in turn creates a parser that matches the command (e.g., DeleteStudentCommandParser
) and uses it to parse the command.Command
object (more precisely, an object of one of its subclasses e.g., DeleteStudentCommand
) which is executed by the LogicManager
.Model
when it is executed (e.g. to delete a student).Model
) to achieve.CommandResult
object which is returned back from Logic
.Here are the other classes in Logic
(omitted from the class diagram above) that are used for parsing a user command:
How the parsing works:
AddressBookParser
class creates an XYZCommandParser
(XYZ
is a placeholder for the specific command name e.g., AddCommandParser
) which uses the other classes shown above to parse the user command and create a XYZCommand
object (e.g., AddCommand
) which the AddressBookParser
returns back as a Command
object.XYZCommandParser
classes (e.g., AddStudentCommandParser
, DeleteStudentCommandParser
, ...) inherit from the Parser
interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model
component,
Student
objects (which are contained in a UniqueStudentList
object).Student
objects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiable ObservableList<Student>
that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.UserPref
object that represents the user’s preferences. This is exposed to the outside as a ReadOnlyUserPref
objects.Model
represents data entities of the domain, they should make sense on their own without depending on other components)API : Storage.java
The Storage
component,
AddressBookStorage
and UserPrefStorage
, which means it can be treated as either one (if only the functionality of only one is needed).Model
component (because the Storage
component's job is to save/retrieve objects that belong to the Model
)Classes used by multiple components are in the seedu.address.commons
package.
This section describes some noteworthy details on how certain features are implemented.
Logic Classes:
AddStudentCommand.java
AddStudentCommandParser.java
AddStudentCommandParser
parses the input entered by user before executing AddStudentCommand
to add a student to Model
This is illustrated in the activity diagram below:
If all the above conditions are satisfied, the student is added to the model.
Logic Classes:
ExportCommand.java
ExportCommandParser.java
ExportCommandParser
parses the input entered by user before executing ExportCommand
to export
student name, parent name, student ID, parent email, parent phone number and attendance history of all students in Model.
This is illustrated in the activity diagram below:
If all the above conditions are satisfied, export command will be successfully executed and a .csv file will be created in directory where carebook.jar file is placed.
Logic Classes:
DeleteStudentCommand.java
DeleteStudentCommandParser.java
DeleteStudentCommandParser
parses the input entered by user before executing DeleteStudentCommand
to
delete a student from Model
If the above condition is satisfied, delete student command will be successfully executed.
Logic classes:
FindStudentCommand.java
FindStudentCommandParser.java
If the above condition is satisfied, find student command will be successfully executed.
FindStudentCommandParser
parses the input entered by user before executing FindStudentCommand
to
find a student from Model
Target user profile:
Value proposition: CareBook helps daycare teachers manage classroom and parent communication by providing instant CLI access to students' information and streamlining repetitive tasks like daily attendance and maintaining student records.
Priorities: High (must have) - * * *
, Medium (nice to have) - * *
, Low (unlikely to have) - *
Priority | As a … | I want to … | So that I can… |
---|---|---|---|
* * * | potential user exploring the product | see the instruction guide | easily know how the app works |
* * * | daycare teacher | view the students' and parents' contacts | disseminate information to them |
* * * | daycare teacher | add student details to the system | keep records up to date as children enrol or leave |
* * * | daycare teacher | remove student details from the system | keep records up to date as children enrol or leave |
* * * | daycare teacher | mark students as present | efficiently take attendance during busy mornings |
* * * | daycare teacher | quickly search for a child's emergency contact details | immediately inform parents in case of emergencies |
* * | forgetful teacher | search for contacts by phone number | quickly identify who is calling/who to call |
* * | daycare teacher | generate a summary of daily/monthly attendance | track attendance accurately |
* * | new user | copy-paste the parents' contacts from the app | easily send an email to all parents |
* * | forgetful user | filter the students in my class by subjects | plan the class for the day better |
* * | daycare teacher | view all classes scheduled for the day | prepare for my daily routine |
* * | daycare teacher | make a note of my student (e.g., behaviour, meals, incidents) | keep track of important details |
* * | daycare teacher | edit student details from the system | keep records up to date as children enrol or leave |
* * | daycare teacher | export student details | transfer student details to other systems |
* * | daycare teacher | export parent details | transfer parent details to other systems |
* * | daycare teacher | filter students by age group | access information for age-based activities |
* * | daycare teacher | create a custom group for students | organise activities for special occasions |
* * | daycare teacher | flag important information (e.g. medical conditions/allergies) about a student | quickly access important details in times of crisis |
* * | daycare teacher | access an audit log of student information updates | track when and what information was modified |
* * | daycare teacher | record students' absence with their reasons | maintain accurate records and organise makeup lessons |
* * | daycare teacher | see which students share the same emergency contact | coordinate communication for siblings in the class |
* * | daycare teacher | view basic student information (age, name, class) without accessing their complete records | quickly identify students |
* * | daycare teacher | receive alerts when a student's information is updated | stay informed about important changes |
* * | daycare teacher | undo previous commands | revert any errors |
* | daycare teacher | schedule and send pre-set messages to parents | remind them about upcoming events or tasks effortlessly |
* | daycare teacher | receive automated alerts if a child is absent for multiple days | follow up with parents if needed |
* | daycare teacher | set reminders for student-specific events (e.g., medication time) | avoid missing important occasions |
* | expert user | sort students' records by various criteria (e.g., name) | find information more efficiently |
* | forgetful user | set a preferred name for each student | remember their names and address them properly |
* | daycare teacher | see attendance trends over a certain period | identify students who have been missing classes |
* | daycare teacher | print a list of students with their emergency contacts as a PDF | have a copy for quick reference in case of a power outage |
(For all use cases below, the System is the CareBook
and the Actor is the Daycare Teacher
, unless specified otherwise.)
MSS
User requests to add a student.
CareBook validates student details (student name, parent name, student ID, phone number, email address and address).
CareBook adds the new student.
CareBook confirms successful addition.
Use case ends.
Extensions
2a. CareBook detects an invalid student name, parent name, student ID, phone number, email address, or address.
2a1. CareBook displays an error message.
Use case resumes from step 1.
2b. CareBook detects a duplicate student ID.
2b1. CareBook displays an error message.
Use case resumes from step 1.
2c. CareBook detects an incorrect command format or unknown command.
2c1. CareBook displays an error message.
Use case resumes from step 1.
MSS
User requests to edit a student with new details by using student ID.
CareBook verifies that the student exists.
CareBook updates the student with the new details.
CareBook confirms successful edit.
Use case ends.
Extensions
2a. CareBook detects an invalid student ID or is unable to find student ID.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an incorrect command format or unknown command.
2b1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to delete a student by student ID.
CareBook verifies that the student exists.
CareBook removes the student.
CareBook confirms successful removal.
Use case ends.
Extensions
2a. CareBook detects an invalid student ID or is unable to find student ID.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an incorrect command format or unknown command.
2b1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to list all students.
CareBook displays a list of all students.
Use case ends.
Extensions
2a. CareBook detects an empty list of students.
2a1. CareBook displays an error message.
Use case ends.
MSS
User requests to find a student by student ID.
CareBook verifies that the student exists.
CareBook retrieves the student’s details.
CareBook displays the student’s information.
Use case ends.
Extensions
2a. CareBook detects an invalid student ID or is unable to find student ID.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an incorrect command format or unknown command.
2b1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to mark a student as present by student ID.
CareBook verifies that the student exists.
CareBook updates the attendance record for that student.
CareBook confirms that the student has been marked present.
Use case ends.
Extensions
2a. CareBook detects an invalid student ID, is unable to find student ID, or finds that the student is already marked as present.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an incorrect command format or unknown command.
2b1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to mark a student as absent by student ID.
CareBook verifies that the student exists.
CareBook updates the attendance record for that student.
CareBook confirms that the student has been marked absent.
Use case ends.
Extensions
2a. CareBook detects an invalid student ID, is unable to find student ID, or finds the that student is already marked as absent.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an incorrect command format or unknown command.
2b1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to clear all students.
CareBook clears all students.
Use case ends.
MSS
User requests for help.
CareBook displays a list of all commands, their respective parameters, and an example of usage.
Use case ends.
MSS
User requests to mark all students as present.
CareBook updates the attendance record for every student as present.
CareBook confirms that all students have been marked present.
Use case ends.
Extensions
2a. CareBook detects an empty list of students.
2a1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to mark all students as absent.
CareBook updates the attendance record for every student as absent.
CareBook confirms that all students have been marked absent.
Use case ends.
Extensions
2a. CareBook detects an empty list of students.
2a1. CareBook displays an error message.
Use case resumes at step 1.
MSS
User requests to export all students information with a filename.
CareBook saves all students information into the directory where the CareBook application is located.
Use case ends.
Extensions
2a. CareBook detects an invalid filename.
2a1. CareBook displays an error message.
Use case resumes at step 1.
2b. CareBook detects an empty list of students.
2b1. CareBook displays an error message.
Use case resumes at step 1.
17
or above installed.Given below are instructions to test the app manually.
Note: These instructions only provide a starting point for testers to work on; testers are expected to do more exploratory testing.
Initial launch
CareBook.jar
file and copy into an empty folderJava 17
or above installed in your computer.cd
into the folder you placed your .jar file and type java -jar CareBook.jar
and press enter to run CareBook application.Saving window preferences
java -jar CareBook.jar
and pressing enter.Verifying Logs during launch
java -jar CareBook.jar
and pressing enter.Deleting a student while all students are being shown
list
command. Multiple students in the list.delete A10A
delete A99Z
delete
, delete a10
, ...
(where student ID is invalid).Deleting a Student When No Students Are Displayed
clear
command.delete A99Z
Dealing with missing data files
data
directory.Dealing with corrupted data files
data
directory and open carebook.json
in a text editor.Ensuring data is saved after adding/deleting a student
Difficulty Level and Challenges Faced
Our project builds on AddressBook Level 3 (AB3) but required significant refactoring to better fit our target users' needs. As a result, the complexity of data management, validation, and UI representation increased.
Key challenges included:
person
model to student
model.Effort Required
The project effort was distributed across key areas:
Student
model.Achievements
Team members (count): 5
Improve UI (Main Window and Find Window) for long names and addresses: When dealing with long name and addresses, CareBook truncates these values in both the main and find window. Furthermore, find window cannot be resized. To improve this in the future, we would make the UI display long name and address values and make find window resizable.
Modify edit command to detect changes: When editing student contact, CareBook does not recognise that no changes are made and edit command is allowed to go through without throwing an error. For future improvements, we would make changes such that edit command will detect no changes are being made and throw an error.
Modify UI to display student name and studentId in sorted order: When adding new students, student that has just been added will appear at the bottom of the UI display. This makes it hard for users to track their students. For future improvements, we would implement a comparator class to sort students by their student ID.
Modify export command to export student records to different file types and different directories: When exporting student records, the exported file is automatically saved as a .csv file to the current directory of carebook.jar file. When user tries to copy and paste records from .csv file to file types like excel, there is a slight formatting issue. For future improvements, we would implement a method to allow users to export to a different file type and directory of their choice.
Modify add command to allow names with special characters: Currently, users can only add student and parent names that consist of alphanumeric characters and space. For future improvements, we plan to allow users to add names with special characters like @, / or names in different languages (e.g. Arabic, Chinese).
Modify add command to validate that email contains a period: Currently, users can enter emails that do not contain a period in the domain (e.g. a@bc). For future improvements, we plan to enhance email validation by ensuring that the domain part of the email contains at least one period (e.g. example.com) to better reflect real-world email formats.
Automatically refresh attendance records on a new date: Currently, users need to trigger a refresh to update the attendance records on a new date.
When a user is working on this app at late night, past 12am, the date will change, hence they will have to manually refresh the data using commands like list
.
For further improvement, we plan to automatically detect a date change while the app is running, and refresh the attendance records without user-triggered actions.
Modify clear command to clear attendance record only: Currently, attendance records accumulate over time with no option to delete them, making it difficult for users to manage large volumes of data. For future improvements, we would allow users to clear only the attendance records in CareBook.
Modify find command to search using student name: Currently, the searches for students using their student ID. We plan to modify it to also accept student names, allowing users to quickly locate a student's information by name, which will be useful in emergency situations.
Modify list command to display only present or absent students: Currently, the list command displays all the students. As a future improvements, we plan to allow users to either list the present or absent students, to make it easier to identify which students are not present.