Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIU SIYI] iP #184

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
198bd9c
change name of Duke.java into Erii.java
64-1 Feb 7, 2024
46c5bbe
Added UserDetail and TaskManager classes
64-1 Feb 7, 2024
b6bd1ed
Added ControlPanel class and modified taskmanager
64-1 Feb 8, 2024
90f4de3
Optimised ControlPanel and TaskManager
64-1 Feb 13, 2024
11aa4b1
Encapsulated task priority validation
64-1 Feb 13, 2024
80e6149
Added displayMenu method for ControlPanel
64-1 Feb 13, 2024
d81e62e
Adjusted validatePriority method
64-1 Feb 15, 2024
af93e4d
Merge branch 'branch-Level-5'
64-1 Feb 18, 2024
72cc84f
Refactor project structure into packages
64-1 Feb 18, 2024
badde63
Update README.md
64-1 Feb 18, 2024
ca1a678
Update README.md
64-1 Feb 18, 2024
904d91b
Update README.md
64-1 Feb 18, 2024
5b505fc
Update README.md
64-1 Feb 18, 2024
5eeeab8
Update README.md
64-1 Feb 18, 2024
ef1f2cf
Update README.md
64-1 Feb 18, 2024
730f971
Update README.md
64-1 Feb 18, 2024
b2e1eb9
Add delete task function
64-1 Feb 18, 2024
29e7978
Add data saving function and encapsulate control panel class
64-1 Feb 24, 2024
0a49677
Adjust data storage class
64-1 Feb 24, 2024
5eee43e
After braching gradle
64-1 Feb 24, 2024
84408cb
Revert "After braching gradle"
64-1 Feb 24, 2024
b6f3bc8
Creater JAR file
64-1 Feb 25, 2024
214d34d
Update annotation
64-1 Feb 25, 2024
c58e7b1
Update README.md
64-1 Feb 25, 2024
6e90bbd
Update README.md
64-1 Feb 25, 2024
5307983
Update README.md
64-1 Feb 25, 2024
ec0fb98
Enhance event and deadline date handling with time support
64-1 Feb 25, 2024
a8ef21f
Merge pull request #1 from 64-1/branch-Level-8
64-1 Feb 25, 2024
f4bd435
Implement task search by keyword
64-1 Feb 25, 2024
eda80a9
Merge pull request #2 from 64-1/branch-Level-9
64-1 Feb 25, 2024
007e4ab
Add documentation
64-1 Feb 25, 2024
0d8af09
Revert "Add documentation"
64-1 Feb 25, 2024
2b39244
Add documentation
64-1 Feb 25, 2024
16afdc4
Merge branch 'branch-Level-9'
64-1 Feb 25, 2024
688d2d1
Update README.md
64-1 Feb 25, 2024
b387ab5
Update README.md
64-1 Feb 25, 2024
8061302
Update README.md
64-1 Feb 25, 2024
3eee41b
Update README.md
64-1 Feb 25, 2024
b28600d
Update README.md
64-1 Feb 25, 2024
82599ce
Update README.md
64-1 Feb 25, 2024
0e3906a
no message
64-1 Mar 6, 2024
707e143
Update Erii Functional Overview
64-1 Mar 6, 2024
29694c2
Delete ip.jar
64-1 Mar 6, 2024
e89d762
Update README.md with user guide and main features
64-1 Mar 6, 2024
5b3b7a7
Refactor data storage and control panel classes
64-1 Mar 7, 2024
b47dd6c
Remove tasks and user details
64-1 Mar 7, 2024
81cc077
Adjust user details and task management functionality
64-1 Mar 30, 2024
76644da
Add taskToFileString() and fileStringToTask() methods
64-1 Mar 30, 2024
0ecf009
Refactor taskToFileString and fileStringToTask methods
64-1 Mar 30, 2024
32022b9
Refactor TaskManager class by removing empty lines at the beginning a…
64-1 Mar 30, 2024
3daf4b1
Add new options for listing tasks by date and searching
64-1 Mar 30, 2024
8b38d92
Update README.md
64-1 Apr 1, 2024
d39c989
Refactor task type validation and add search by date feature
64-1 Apr 1, 2024
219420f
Merge branch 'master' of https://github.com/64-1/ip
64-1 Apr 1, 2024
daecde6
Update userDetails.txt and EXPECTED.TXT
64-1 Apr 1, 2024
90ea34f
Update .gitignore to include Erii.jar
64-1 Apr 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
Erii.jar
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.checkstyle.configuration": "/sun_checks.xml"
}
74 changes: 50 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,50 @@
# Duke project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

## Setting up in Intellij

Prerequisites: JDK 11, update Intellij to the most recent version.

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 11** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
3. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
# User Guide for the Erii Application

## Introduction
Welcome to the Erii application, your comprehensive assistant for managing tasks and personal data at Kassel Academy. Designed with ease of use in mind, Erii helps you keep track of your daily tasks, manage your personal details, and interact seamlessly with the Kassel Academy's database.

## Getting Started
### System Requirements
- Java Runtime Environment (JRE) version 11 or higher.
- An active internet connection for initial setup and database synchronization (if applicable).

### Installation
1. Ensure Java is installed on your computer by running `java -version` in your command line or terminal.
2. Download `Erii.jar` to a convenient location on your computer.
3. Launch the application by double-clicking the file or executing `java -jar Erii.jar` in your command line or terminal.

## Main Features
### User Registration and Login
- Initial Setup: Upon first launch, you'll be prompted to enter your personal details, including name, birthday, and gender. This information is crucial for personalizing your experience with Erii.
- Welcome Back Message: Returning users are greeted with a welcome back message, streamlining the login process.

### Task Management
- Task Overview: Erii provides a comprehensive task management system. View, create, and track tasks tailored to your academic or personal needs.
- Loading Tasks: Your tasks are loaded upon application startup, ensuring you're immediately up to date with your schedule.

### Data Storage and Retrieval
- Secure Data Storage: Personal details and tasks are securely stored, with the ability to retrieve and update information as needed.
- Synchronization: Erii ensures your data is always synchronized, keeping your schedule and personal details up to date.

### Personalized Interaction
- Customized Greetings and Messages: Receive personalized messages based on your user profile, including verification status, rank, and course schedule.

### Control Panel
- User Interface: Erii's Control Panel provides an intuitive interface for managing your tasks and personal details, designed for ease of use and efficiency.

## Navigating the Control Panel
The Control Panel is the heart of your interaction with Erii. From here, you can access all the features of the application.
- Task List: Access your list of tasks from the main interface.
- Add Task: Create various task types, from deadline to event tasks.
- Mark Task: Mark a Task as done.
- Search Task: Search tasks by keyword or by date.

## FAQs
- Q: How do I update my personal information?
- A: Navigate to the User Details section in the Control Panel to update your information.

- Q: What should I do if I encounter errors or need support?
- A: Please contact Kassel Academy's technical support team for assistance with any issues or questions.

## Conclusion
Erii is designed to enhance your productivity and streamline your interactions with Kassel Academy. By effectively managing your tasks and personal details, you can focus on your academic goals and personal development. Welcome to a more organized and efficient way of managing your daily activities with Erii.
Binary file added data/641 (D) - Shortcut.lnk
Binary file not shown.
Empty file added data/tasks.txt
Empty file.
Empty file added data/userDetails.txt
Empty file.
111 changes: 97 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,112 @@
# User Guide
Welcome to the comprehensive User Guide for your application. This guide will walk you through the features and usage instructions to help you get the most out of your application.

## Features
## Features
### Feature-Greeting

### Feature-ABC
**Description:**

Description of the feature.
This feature initiates a user-friendly interaction by prompting new users to enter their name, birthday, and gender directly through the console. After receiving the inputs, it generates a personalized welcome message that incorporates the user's provided details, simulating a verification and enrollment process to an exclusive roster - in this case, the fictional Kassel Academy. This introductory procedure not only greets the user but also seamlessly collects essential information for a customized experience.

### Feature-XYZ
### Feature-Read in and Save Basic Info of the User

Description of the feature.
**Description:**

This feature allows the application to collect and store basic information about the user, such as their name, birthday, gender, and preferences. This personalized information helps in tailoring the application's functionality and responses to fit the user's needs, enhancing the overall user experience.

## Usage
### 'inputName' - Enter User Name

**Description:**

Prompts the user to input their full name (First Name Last Name). The application validates the input to ensure it includes both names, enhancing the personalized interaction.

**Example of usage:**

Please enter your full name (First Name Last Name): John Doe

**Expected outcome:**

The user's name is stored and utilized for personalized greetings and interactions within the application.
Welcome, John Doe! Your name has been recorded.

### inputBirthday - Enter Birthday

**Description:**

Ask the user to input their birthday in a specific format (DD/MM/YYYY). This information is crucial for personalized messages and functionalities related to the user's age or significant dates.

**Example of usage:**

Please enter your birthday (DD/MM/YYYY): 01/01/1990

**Expected outcome:**

The application stores the user's birthday for age-related functionalities and personalized greetings.
+ Your birthday, 01/01/1990, has been saved successfully.

### inputGender - Select Gender

**Description:**

The user is prompted to select their gender from predefined options. This feature allows for more tailored interactions and can be used to personalize the user experience further.

**Example of usage:**

Please enter your gender: 1. Male 2. Female 3. Other
**Expected outcome:**

The application records the user's gender selection, which can be used for personalized communication and functionalities.

Your gender, Male/Female/Other, has been recorded.

### addTask - Add a New Task

**Description:**

Allows users to add tasks to their list by entering a description and selecting a priority level. This feature is central to the task management functionality of the application.

**Example of usage:**

addTask Complete the project report /S

**Expected outcome:**

The task is added to the user's list with the specified priority, enhancing their productivity and task management.

Got it. I've added this task: Complete the project report <S\>

Now you have [number] tasks in the list.

### listTasks - List All Tasks

**Description:**

Displays all tasks currently in the user's list, providing a comprehensive overview of pending, completed, and scheduled tasks.

**Example of usage:**

listTasks

**Expected outcome:**

A list of all tasks, along with their details such as status, description, and priority, is displayed to the user.

Here are the tasks in your list:
1. [T][ ] Complete the project report <S\>

### `Keyword` - Describe action
### markTaskAsDone - Mark a Task as Done

Describe the action and its outcome.
**Description:**
Enables users to mark a task as completed by specifying the task number. This feature helps users keep track of their progress.

Example of usage:
**Example of usage:**

`keyword (optional arguments)`
markTaskAsDone 1

Expected outcome:
**Expected outcome:**

Description of the outcome.
The specified task is marked as completed, and its status is updated in the task list.

```
expected output
```
- Task 1 marked as done.
This guide should help you navigate through the application's features and functionalities. Enjoy managing your tasks and personalizing your experience with our application!
10 changes: 0 additions & 10 deletions src/main/java/Duke.java

This file was deleted.

50 changes: 50 additions & 0 deletions src/main/java/com/erii/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
package com.erii;
import java.util.List;
import com.erii.core.Erii;
import com.erii.core.TaskManager;
import com.erii.user.UserDetails;
import com.erii.data.DataStorage;
import com.erii.ui.ControlPanel;

/**
* The main class of the program.
* It initializes the necessary objects and starts the program execution.
*/
public class Main {
public static void main(String[] args) {
DataStorage storage = new DataStorage();
TaskManager taskManager = new TaskManager();
UserDetails userDetails = storage.loadUserDetails();
ControlPanel controlPanel = new ControlPanel(taskManager, storage, userDetails);

Erii.main(args);

System.out.println("Initializing Kassel Academy...");

if (userDetails == null || userDetails.getUserName() == null || userDetails.getUserName().isEmpty()) {
userDetails = new UserDetails();
userDetails.inputName();
userDetails.inputBirthday();
userDetails.inputGender();
storage.saveUserDetails(userDetails);
String message = String.format(
"Verification passed.\nOptions enabled.\n%s Born on %s\n%s\nID A.D.0013\n" +
"Rank 'S'\nListed in the Kassel Academy roster.\n" +
"Database access granted\nAccount activated\nCourse schedule generated\n" +
"I am Erii, the secretary of Kassel Academy, pleased to serve you.",
userDetails.getUserName(), userDetails.getUserBirthday(), userDetails.getUserGender());
System.out.println(message);
} else {
String message = "Welcome back, " + userDetails.getUserName();
System.out.println(message);
}

List<TaskManager.Task> loadedTasks = storage.loadTasks(taskManager);
for (TaskManager.Task task : loadedTasks) {
taskManager.loadTask(task);
}
taskManager.listTasks();

controlPanel.start();
}
}
33 changes: 33 additions & 0 deletions src/main/java/com/erii/core/Erii.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.erii.core;

/**
* The Erii class represents a program that prints out the ASCII art of the word "Erii".
* It contains the main method which executes the program.
*/
public class Erii {
public static void main(String[] args) {
String art =

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider storing this art as a static final variable

" _____ _____ _____ _____ \n" +
" /\\ \\ /\\ \\ /\\ \\ /\\ \\ \n" +
" /::\\ \\ /::\\ \\ /::\\ \\ /::\\ \\ \n" +
" /::::\\ \\ /::::\\ \\ \\:::\\ \\ \\:::\\ \\ \n" +
" /::::::\\ \\ /::::::\\ \\ \\:::\\ \\ \\:::\\ \\ \n" +
" /:::/\\:::\\ \\ /:::/\\:::\\ \\ \\:::\\ \\ \\:::\\ \\ \n" +
" /:::/__\\:::\\ \\ /:::/__\\:::\\ \\ \\:::\\ \\ \\:::\\ \\ \n" +
" /::::\\ \\:::\\ \\ /::::\\ \\:::\\ \\ /::::\\ \\ /::::\\ \\ \n" +
"/::::::\\ \\:::\\ \\ /::::::\\ \\:::\\ \\ ____ /::::::\\ \\ ____ /::::::\\ \\ \n" +
"/:::/\\:::\\ \\:::\\ \\ /:::/\\:::\\ \\:::\\____\\ /\\ \\ /:::/\\:::\\ \\ /\\ \\ /:::/\\:::\\ \\ \n" +
"/:::/__\\:::\\ \\:::\\____\\/:::/ \\:::\\ \\:::| |/::\\ \\/:::/ \\:::\\____\\/::\\ \\/:::/ \\:::\\____\\\n" +
"\\:::\\ \\:::\\ \\::/ /\\::/ |::::\\ /:::|____|\\:::\\ /:::/ \\::/ /\\:::\\ /:::/ \\::/ /\n" +
" \\:::\\ \\:::\\ \\/____/ \\/____|:::::\\/:::/ / \\:::\\/:::/ / \\/____/ \\:::\\/:::/ / \\/____/ \n" +
" \\:::\\ \\:::\\ \\ |:::::::::/ / \\::::::/ / \\::::::/ / \n" +
" \\:::\\ \\:::\\____\\ |::|\\::::/ / \\::::/____/ \\::::/____/ \n" +
" \\:::\\ \\::/ / |::| \\::/____/ \\:::\\ \\ \\:::\\ \\ \n" +
" \\:::\\ \\/____/ |::| ~| \\:::\\ \\ \\:::\\ \\ \n" +
" \\:::\\ \\ |::| | \\:::\\ \\ \\:::\\ \\ \n" +
" \\:::\\____\\ \\::| | \\:::\\____\\ \\:::\\____\\ \n" +
" \\::/ / \\:| | \\::/ / \\::/ / \n" +
" \\/____/ \\|___| \\/____/ \\/____/ \n";
System.out.println(art);
}
}
Loading