forked from nus-cs2103-AY2324S1/ip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from TyrusLye/A-MoreOOP
A more oop
- Loading branch information
Showing
14 changed files
with
164 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/main/java/Launcher.java → src/main/java/URBOI_PACKIN/Launcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package URBOI_PACKIN; | ||
|
||
import javafx.application.Application; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package URBOI_PACKIN; | ||
|
||
import java.time.LocalDateTime; | ||
import java.time.format.DateTimeFormatter; | ||
|
||
public class Task { | ||
|
||
protected String description; | ||
protected boolean isDone; | ||
|
||
protected LocalDateTime date; | ||
|
||
public String toFileString() { | ||
return ""; | ||
} | ||
public Task(String description, LocalDateTime date) { | ||
this.description = description; | ||
this.isDone = false; | ||
this.date = date; | ||
} | ||
public String getStatusIcon() { | ||
return (isDone ? "[X]" : "[ ]"); // Return a tick or cross symbol cuz im lazy like that, or its easier. idk | ||
} | ||
/** | ||
* Get the description of the task. | ||
* | ||
* @return The description of the task. | ||
*/ | ||
public String getDescription() { | ||
return description; | ||
} | ||
public boolean isDone() { | ||
return isDone; | ||
} | ||
public void markDone() { | ||
isDone = true; | ||
} | ||
public void markNotDone() { | ||
isDone = false; | ||
} | ||
@Override | ||
public String toString() { | ||
return "[" + (isDone ? "X" : " ") + "] " + description; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package URBOI_PACKIN.TaskTypes; | ||
|
||
import URBOI_PACKIN.Task; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* Represents a Deadline task. | ||
*/ | ||
public class Deadline extends Task { | ||
|
||
public Deadline(String description, LocalDateTime date) { | ||
super(description, date); | ||
} | ||
|
||
@Override | ||
public String toFileString() { | ||
return "D | " + (isDone ? "1" : "0") + " | " + description + " | " + date; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "[D]" + super.toString() + " (by: " + date + ")"; | ||
} | ||
} |
Oops, something went wrong.