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

[Boo Wen Jun] iP #454

Open
wants to merge 86 commits into
base: master
Choose a base branch
from
Open

[Boo Wen Jun] iP #454

wants to merge 86 commits into from

Conversation

wj200
Copy link

@wj200 wj200 commented Feb 4, 2025

Mars User Guide

Introducing MARS! A personal tasklist chatbot to help you better organise your day

UI Image

Ever get overwhelmed with Deadlines, Events, ToDos, and DoWithins?
Here is an assistant with a minimalist UI for you! 😄

Sneak Peek

  • Adding Deadlines
  • Marking Tasks
  • Reminders coming soon

Get started

Download the .jar file of your desired version.
Double-click and open file.
The application is ready for use! Start adding tasks and performing other actions.

Here are the types of Tasks available:

  • Todo
  • Deadline
  • Event
  • Do Within a certain time period

To add a Todo:

format: todo {task name}
e.g. todo read book

To add a deadline:

format: deadline {task name} (by: MMM dd yyyy, h:mm a)
e.g. deadline return book (by: Feb 02 2024, 6:00 pm)

To add an Event:

format: event {task name} (from: MMM dd yyyy, h:mm a to MMM dd yyyy, h:mm a)
e.g. event CS2103T project meeting (from: Feb 28 2024, 6:00 am to: Mar 03 2024, 8:00 am)

To add a DoWithin, run:

format: do within {task name} between: MMM dd yyyy, h:mm a and MMM dd yyyy, h:mm a
e.g. collect certificate between: Jan 15 2024, 6:00 pm and Jan 25 2024, 6:00 pm

If tasks are added successfully, the output would be:

Got it. I've added this task:
[T][ ] read book
Now you have 1 task in the list

Got it. I've added this task:
[D][ ] deadline return book by 2024-02-02 18:00
Now you have 2 tasks in the list

Got it. I've added this task:
[E][ ] CS2103T project meeting from: 2024-02-28 06:00 to 2024-03-03 08:00
Now you have 3 tasks in the list

Got it. I've added this task:
[DW][ ] collect certificate between: 2024-01-15 18:00 and 2024-01-25 18:00
Now you have 4 tasks in the list

Features:

Deleting a task

Format: delete {task number}
eg. delete 1

Noted. I have removed this task [T][ ] read book
Now you have 3 tasks in the list

Marking a task

Format: mark {task number}
eg. mark 1

Nice! I've marked this task as done: [T][X] read book

Unmarking a task

Format: unmark {task number}
eg. unmark 1

OK, I've marked this task as not done yet: [T][ ] read book

List

Format: list
e.g. list

Here are the tasks in your list:
[T][ ] read book
[DW][ ] collect certificate between: 2024-01-15 18:00 and 2024-01-25 18:00

Find a task through keyword

Format: find {keyword}
eg. find book

Here are the matching tasks in your list:
[T][ ] read book

damithc and others added 15 commits July 11, 2024 16:52
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.

Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
Copy link

@dnardnar dnardnar left a comment

Choose a reason for hiding this comment

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

I only looked at Code Quality → Naming, this is from week 4, W4.6, take note of this to improve your code and use it in the future as well. Well Done!

Comment on lines 1 to 2
public class marsException extends RuntimeException{
public marsException(String message){
Copy link

Choose a reason for hiding this comment

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

Suggested change
public class marsException extends RuntimeException{
public marsException(String message){
public class MarsException extends RuntimeException{
public MarsException(String message){

I noticed that the class name marsException does not follow the PascalCase convention for class names. According to the coding standard, class names should be nouns and written in PascalCase. Consider renaming it to MarsException to align with the standard.

Comment on lines 2 to 7
protected String description;
protected boolean isDone;

public Task(String description) {
this.description = description;
this.isDone = false;
Copy link

Choose a reason for hiding this comment

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

"I like how you used a boolean variable name like isDone, which follows the convention of starting with 'is' to indicate a boolean value. This makes the code more readable and intuitive. Good job!


public class Mars {
public static void main(String[] args) {
List<Task> arrayList = new ArrayList<>();
Copy link

Choose a reason for hiding this comment

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

Suggested change
List<Task> arrayList = new ArrayList<>();
List<Task> taskList = new ArrayList<>();

The variable name arrayList could be improved to better describe its purpose. Since this is a collection of tasks, consider renaming it to tasks or taskList.

}

/*Level 2. Add, List */
private void store(List<Task> arrayList){
Copy link

Choose a reason for hiding this comment

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

The method name store() is a bit ambiguous as it doesn't clearly explain what it does. Based on its functionality, a more descriptive name like addAndListTasks() or manageTasks() would better convey its purpose and improve code clarity

Copy link

@yuto1115 yuto1115 left a comment

Choose a reason for hiding this comment

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

Overall, I found your code fine and easy to understand. You can improve your codes by following the coding style and splitting codes into multiple classes to engage more OOP.

"____________________________________________________________\n" +
" Bye. Hope to see you again soon!\n" +
"____________________________________________________________"); */
try{
Copy link

Choose a reason for hiding this comment

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

Suggested change
try{
try {

A space should be inserted here.

Comment on lines 69 to 70
}
else {
Copy link

Choose a reason for hiding this comment

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

Suggested change
}
else {
} else {

Should be modified to follow the coding conventions.

String description = reader.nextLine();
System.out.println("____________________________________________________________\n");
switch(taskType){
case "todo":
Copy link

Choose a reason for hiding this comment

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

There should not be any indent before "case" statements.

private void mark(List<Task> lst){
Object[] taskArray = lst.toArray();

Scanner reader = new Scanner(System.in);
Copy link

Choose a reason for hiding this comment

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

Don't you think that the creation of a new Object[] is redundant here?

My suggestion is to remove this line and get the task object directly from the given List<task> as lst.get(num - 1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants