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

Add Subject to Lesson.java #111

Merged
merged 10 commits into from
Nov 1, 2024

Conversation

mingyang143
Copy link

fixes #104
fixes #105

TODO:
The DeleteLessonCommand.java class is not updated with the discussed command format

@mingyang143 mingyang143 added this to the v1.5 milestone Oct 25, 2024
@mingyang143 mingyang143 self-assigned this Oct 25, 2024
# Conflicts:
#	src/main/java/seedu/address/logic/parser/CliSyntax.java
@mingyang143 mingyang143 marked this pull request as ready for review October 26, 2024 05:22
@@ -27,7 +29,7 @@ public class AddLessonCommand extends Command {
+ ": Adds a lesson taught by the tutor to the tutee identified by their respective index numbers "
+ "in the displayed persons list.\n"
+ "Parameters: TUTORINDEX TUTEEINDEX (must be positive integers)\n"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update the command description and format (and use TUTOR_INDEX etc)

@@ -26,23 +28,35 @@ public class DeleteLessonCommand extends Command {
+ ": Deletes the lesson between a tutor and tutee, identified by their respective index numbers "
+ "in the displayed person list.\n"
+ "Parameters: TUTORINDEX TUTEEINDEX (must be positive integers)\n"
+ "Example: " + COMMAND_WORD + " 1 3";
+ "Example: " + COMMAND_WORD + " 1 3" + " " + PREFIX_SUBJECT + "Math";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update the command description, parameters and JavaDoc

/**
* Creates a DeleteLesson Command to delete the Lesson asssociated with
* the specified {@code Tutor} and {@code Tutee}.
* @param tutorIndex
* @param tuteeIndex
*/
public DeleteLessonCommand(Index tutorIndex, Index tuteeIndex) {
public DeleteLessonCommand(Index tutorIndex, Index tuteeIndex, Subject subject) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update the JavaDoc

* @throws ParseException if the specified index is invalid (not non-zero unsigned integer)
* or if the format was wrong.
*/
public static Index[] parseIndexes(String args) throws ParseException {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove parseIndices if not used anymore

@Jollybomber Jollybomber merged commit 06fff62 into AY2425S1-CS2103T-F08-1a:master Nov 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deleteLesson wrong format does not show error message Add Subject field to Lesson
3 participants