Skip to content

Commit

Permalink
Merge pull request nus-cs2103-AY1819S2#43 from charnixon/master
Browse files Browse the repository at this point in the history
GPA and Education parameters added to Person
  • Loading branch information
charnixon authored Mar 19, 2019
2 parents 73c70c9 + d239c15 commit 71c73cf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/seedu/address/logic/commands/AddCommand.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package seedu.address.logic.commands;

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.parser.CliSyntax.PREFIX_ADDRESS;
import static seedu.address.logic.parser.CliSyntax.PREFIX_EMAIL;
import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME;
import static seedu.address.logic.parser.CliSyntax.PREFIX_PHONE;
import static seedu.address.logic.parser.CliSyntax.PREFIX_SKILL;
import static seedu.address.logic.parser.CliSyntax.*;

import seedu.address.logic.CommandHistory;
import seedu.address.logic.commands.exceptions.CommandException;
Expand All @@ -25,12 +21,16 @@ public class AddCommand extends Command {
+ PREFIX_NAME + "NAME "
+ PREFIX_PHONE + "PHONE "
+ PREFIX_EMAIL + "EMAIL "
+ PREFIX_EDUCATION + "EDUCATION "
+ PREFIX_GPA + "GPA "
+ PREFIX_ADDRESS + "ADDRESS "
+ "[" + PREFIX_SKILL + "TAG]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_PHONE + "98765432 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_EDUCATION + "NUS "
+ PREFIX_GPA + "3 "
+ PREFIX_ADDRESS + "311, Clementi Ave 2, #02-25 "
+ PREFIX_SKILL + "friends "
+ PREFIX_SKILL + "owesMoney";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ private List<Person> OrderPersonsTags(List<Person> lastShownList) {
Name name = lastShownList.get(i).getName();
Phone phone = lastShownList.get(i).getPhone();
Email email = lastShownList.get(i).getEmail();
Education education = lastShownList.get(i).getEducation();
GPA gpa = lastShownList.get(i).getGPA();
Address address = lastShownList.get(i).getAddress();
//change list back to set
LinkedHashSet<SkillsTag> tagSet = SortUtil.toTags(individualSortedSkills);

Person person = new Person(name, phone, email, address, tagSet);
Person person = new Person(name, phone, email, education, gpa, address, tagSet);
personsWithCorrectTagOrder.add(person);
}
return personsWithCorrectTagOrder;
Expand Down

0 comments on commit 71c73cf

Please sign in to comment.