File tree Expand file tree Collapse file tree 3 files changed +7
-35
lines changed
src/main/java/seedu/duke/calendar Expand file tree Collapse file tree 3 files changed +7
-35
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
package seedu .duke .calendar .command ;
4
4
5
+ import seedu .duke .calendar .EventList ;
6
+
5
7
import java .time .LocalDateTime ;
6
8
import java .util .Scanner ;
7
9
8
10
public class DeleteEventCommand extends EventCommand {
9
- public void execute (Scanner scanner , Calendar calendar ) {
11
+ public void execute (Scanner scanner , EventList eventList ) {
10
12
System .out .print ("Enter the event name: " );
11
13
String eventName = scanner .nextLine ();
12
14
13
- calendar . delEvent (eventName );
15
+ eventList . deleteEvent (eventName );
14
16
15
17
System .out .println ("Event has been deleted from your Calendar!" );
16
18
}
Original file line number Diff line number Diff line change 8
8
import java .util .Scanner ;
9
9
10
10
public class ListCalendarEventsCommand extends EventCommand {
11
- public void execute (Scanner scanner , EventList flashcardList ) {
11
+ public void execute (Scanner scanner , EventList eventList ) {
12
12
System .out .println ("Here is a list of all your events: " );
13
13
14
14
System .out .println ("-" .repeat (80 ));
15
- for (Flashcard flashcard : flashcardList . getFlashcards ()) {
16
- System .out .print (flashcard );
15
+ for (Event event : eventList . getEvent ()) {
16
+ System .out .print (event );
17
17
System .out .println ("-" .repeat (80 ));
18
18
}
19
19
}
You can’t perform that action at this time.
0 commit comments