Skip to content

Colin386/ip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 dialog first)
  2. Set up the correct JDK version, as follows:
    1. Click Configure > Structure for New Projects and then Project Settings > Project > Project SDK
    2. If JDK 11 is listed in the drop down, select it. If it is not, click New... and select the directory where you installed JDK 11
    3. Click OK
  3. Import the project into Intellij as follows:
    1. Click Open or Import.
    2. Select the project directory, and click OK
    3. If there are any further prompts, accept the defaults.
  4. After the importing is complete, locate the src/main/java/Duke.java file, right-click it, and choose Run Duke.main(). If the setup is correct, you should see something like the below:
    Hello from
     ____        _        
    |  _ \ _   _| | _____ 
    | | | | | | | |/ / _ \
    | |_| | |_| |   <  __/
    |____/ \__,_|_|\_\___|
    

What can you do with Duke?

The following list some of the functions that you can do with Duke

  1. Keep track of deadlines, events and items to do.
  2. Find out what is happening on a particular date
  3. List down all events that you have to do
  4. Find specific events using a certain keyword

Installation Instructions

Prerequisites: A computer running Windows, Mac OS X or Linux

Windows

  1. Download and copy the iPtest.jar file into an empty folder. We will assume that the folder is called "C:\Duke"
  2. open the command prompt by entering cmd into the search bar
  3. type chcp 65001 into the command prompt and press enter
  4. navigate to the folder C:\Duke in the command prompt
  5. type java -Dfile.encoding=UTF-8 -jar iPtest.jar into the command prompt and press enter.
  6. The welcome message for the program should appear.

Macintosh

  1. Download and copy the iPtest.jar file into an empty folder.
  2. open the terminal by clicking on Launchpad->Utilities->Terminal
  3. navigate to the folder you have stored the jar file in the command prompt
  4. type java -jar iPtest.jar into the terminal and press enter.
  5. The welcome message for the program should appear.

Linux

  1. Download and copy the iPtest.jar file into an empty folder.
  2. open the terminal in the linux distribution.
  3. navigate to the folder you have stored the jar file in the command prompt
  4. type java -jar iPtest.jar into the linux terminal and press enter.
  5. The welcome message for the program should appear.

Conventions Used

The following table shows the list of conventions used when describing each function operation

function name - shows input that you need to type exactly in the terminal. In this case, type function name

<Compulsory User Input> - shows input that you will need to provide your own values or words. Program will fail if information is not provided

[Optional User Input] - shows input that you can choose to provide your own values. Input for these values are optional.

Function List

Below is a table containing the possible commands and a brief description of how to use them

Function Name Function Description
bye terminates the program and saves all recorded information into ~/data/duke.txt
deadline creates a deadline task with the date of deadline stored
delete deletes away a Task from your Task list
done mark a Task on your task list as done
event creates an event with the date of the event occurring stored
find prints out all events that contains a particular sequence of words
list prints out the list of Tasks stored on your personal list currently
todo creates a todo Task

Bye

terminates the program and saves all recorded information into ~/data/duke.txt

Syntax

bye

Deadline

creates a deadline task with the date of deadline stored

Syntax

deadline <Task name> /by <Date> [time]

<Task name> - Name of the task that has a deadline. E.g. Homework <Date> - A date in the form yyyy:mm:dd where the deadline will be set. E.g. 2020-03-09 [Time] - Optional Time information containing the time when the deadline must be met. If no time provided, assume that time of deadline is set to 12 midnight.

Example

deadline Homework /by 2020-04-03 13:00 - creates a deadline task called "Homework" that has a deadline set on 03 April 2020 at 1pm

deadline Homework /by 1998-02-03 - creates a deadline task called "Homework" that has a deadline set on 03 February 1998 at 12 midnight.

Delete

deletes away a Task from your Task list

Syntax

delete <index>

<index> - a number matching the index number of the item to be deleted from the list

Example

delete 3 - deletes the Task with index number 3 from your list of Tasks

Done

Mark a Task on your task list as done

Syntax

done <index>

<index> - a number matching the index number of the item to be marked as done

Example

done 2 - marks the Task with index number 2 from your list as completed

Event

Creates an event with the date of the event occurring stored

Syntax

event <Task name> /at <Date> [time]

<Task name> - Name of the Event. E.g. Christmas 2020

<Date> - A date in the form yyyy:mm:dd when the event will occur. E.g. 2020-03-09

[Time] - Optional Time information containing the time when the event will occur. If no time provided, assume that time of event occurring is set to 12 midnight.

Example

event Christmas /by 2020-12-25 13:00 - creates an event task called "Christmas" that occurs on 25 December 2020 at 1pm

event Birthday /by 1998-02-03 - creates an event task called "Birthday" that occurs on 03 February 1998 at 12 midnight.

Find

prints out all events that contains a particular sequence of words

Syntax

find <Word Sequence>

<Word Sequence> - Sequence of words user enters. Program will present all Task entries containing those sequence of words.

Example

Assuming you have the following items in your list, shown below in this table:

Index No. Event Type Status Name of Task date
1 Todo Not Done Homework N.A.
2 Deadline Done Cook Dinner 2010-03-01 12:30
3 Event Not Done Hari Raya Puasa 2021-05-12 00:00
4 Event Not Done Party 2010-03-01 14:15

find Cook - will list out all events with the word "Cook" as shown below

Here are the list of activities that contain the word "Cook":

2.[D][✓] Cook Dinner (by: 2010-03-01 12:30)Session saved!

List

prints out the list of Tasks stored on your personal list currently

Syntax

list [Date]

[Date]- Optional Date information in the form yyyy-mm-dd. If provided, cause the program to list down all events and deadlines that occur on that date.

Example

Assuming you have the following items in your list, shown below in this table:

Index No. Event Type Status Name of Task date
1 Todo Not Done Homework N.A.
2 Deadline Done Cook Dinner 2010-03-01 12:30
3 Event Not Done Hari Raya Puasa 2021-05-12 00:00
4 Event Not Done Party 2010-03-01 14:15

list - will list out all the events on the screen in the following format

Here are the tasks in your list:
1.[T][✗] Homework
2.[D][✗] Cook Dinner (by: 01 Mar 2010 12:30:00 p.m)
3.[E][✗] Hari Raya Puasa (at: 12 May 2021 12:00:00 a.m)
4.[E][✗] Party (at: 01 Mar 2010 02:15:00 p.m)

list 2010-03-01 - will list out all the events on the screen that falls on the 01 March 2010 in the following format

Here are all the activities that are conducted on this date: 2010-03-01

2.[D][✗] Cook Dinner (by: 01 Mar 2010 12:30:00 p.m)
4.[E][✗] Party (at: 01 Mar 2010 02:15:00 p.m)

Todo

creates a todo Task

Syntax

todo <Task Name>

<Task Name> - name of the todo task. E.g. Eat dinner.

Example

todo Eat dinner - creates a todo task with the name "Eat dinner" and adds it to the list

About

Starter code for the Duke project

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.6%
  • Shell 2.0%
  • Batchfile 1.4%