@@ -265,8 +265,48 @@ The GUI then lists the filtered exercises.
265265
266266Given below is the Sequence Diagram for interactions within the Logic component for the execute("find_exercises bench")
267267API call.
268+
268269![ FindExercisesSequenceDiagram] ( images/FindExercisesSequenceDiagram.png )
269270
271+ ### Delete lesson
272+
273+ The delete lesson feature is implemented using ` LessonDeleteCommandParser ` , as well as the following command:
274+ * ` LessonDeleteCommand ` , to be executed when the user inputs the command into fitNUS.
275+
276+ ` LessonDeleteCommandParser ` takes in the user input and parses them to return a ` LessonDeleteCommand ` object. The
277+ ` LessonDeleteCommand ` class then executes the command by deleting the lesson from the respective ` FilteredList ` for
278+ lessons in ` ModelManager ` .
279+
280+ Given below is an example usage scenario and how the delete lesson mechanism behaves at each step.
281+
282+ ** Step 1:**
283+
284+ The user types into fitNUS ` lesson_delete 1 ` .
285+
286+ ** Step 2:**
287+
288+ This input is passed to ` LogicManager ` as a String and from there, the input is parsed by the ` parseCommand `
289+ method of ` FitNusParser ` .
290+
291+ ** Step 3:**
292+
293+ ` parseCommand ` identifies that this is a command to delete lesson, so it calls the ` parse ` method of
294+ ` LessonDeleteCommandParser ` on the input.
295+
296+ ** Step 4:**
297+
298+ Within ` parse ` , the name of the lesson is produced by ` ParserUtil ` parsing the given argument. This method then creates
299+ the Lesson object.
300+
301+ ** Step 5:**
302+
303+ ` LogicManager ` then calls the ` execute ` method of this returned ` LessonDeleteCommand ` .
304+ Within ` execute ` , ` ModelManager ` 's ` updateFilteredLessonList ` method is called. This removes the unwanted lesson.
305+
306+ ** Step 6:**
307+
308+ The GUI then lists the deleted lesson.
309+
270310
271311
272312--------------------------------------------------------------------------------------------------------------------
0 commit comments