-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Zhouyirui/tp into branch_UG
# Conflicts: # docs/UserGuide.md
- Loading branch information
Showing
17 changed files
with
298 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,11 +4,11 @@ title: User Guide | |
--- | ||
|
||
ClassMATE is a **desktop app designed for CS2101 tutors to manage student contacts and organize them into their tutorial classes and groups, as well as | ||
other administrative matters including recording of students' class participation. It is optimized for use via a Command Line Interface** (CLI) while | ||
other administrative matters including recording of students' class participation. It is optimized for use via a Command Line Interface** (CLI) while | ||
still having the benefits of a Graphical User Interface (GUI). If you can type fast, ClassMATE can get your contact management tasks done faster than traditional GUI apps. | ||
|
||
This guide will get you started on how to create students, classes and groups, | ||
assigning students to their respective classes and groups and covers other functionalities for users | ||
This guide will get you started on how to create students, classes and groups, | ||
assigning students to their respective classes and groups and covers other functionalities for users | ||
such as filtering and searching students. Finally, it will also guide | ||
you through on how you can add class participation marks for your students. | ||
|
||
|
@@ -44,24 +44,42 @@ We hope you find this User Guide helpful in using ClassMATE! | |
1. Ensure you have Java `11` or above installed in your Computer. (Go to [this website](https://codejava.net/java-se/download-and-install-java-11-openjdk-and-oracle-jdk) and follow the instructions to download and install Oracle JDK 11, which is _basically_ Java 11.) | ||
1. Download the latest `classmate.jar` from [here](https://github.com/AY2122S1-CS2103T-W15-1/tp/releases). | ||
1. Copy the file to the folder you want to use as the _home folder_ for your ClassMATE. | ||
1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.<br> | ||
1. Double-click the file to start the app. The GUI similar to the image below should appear in a few seconds. Note how the app contains some sample data.<br> | ||
 | ||
1. Type the command in the **Command-Line Input** and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.<br> | ||
Some example commands you can try: | ||
* **`liststu`** : Lists all students. | ||
|
||
* **`addstu n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 c/G06`**: Adds a student named `John Doe` to ClassMATE. | ||
|
||
* **`deletestu 3`**: Deletes the 3rd student shown in the current list. | ||
|
||
* **`clear`** : Deletes all students. | ||
|
||
* **`exit`** : Exits the app. | ||
1. Refer to the [Features](#features) below for details of each command. | ||
1. Refer to the [Features](#Features) below for details of each command. | ||
|
||
-------------------------------------------------------------------------------------------------------------------- | ||
|
||
## Features | ||
## CLI Tutorial | ||
|
||
In this section, you will familiarize yourself with the use of CLI to facilitate your experience when using ClassMATE. | ||
All commands would be typed in the **Command-Line Input** located at the top of the user interface as shown in the image below. | ||
|
||
 | ||
|
||
Once you have familiarised yourself with the layout of the application, try out some example commands! | ||
|
||
Some example commands you can try: | ||
* **`liststu`** : Lists all students. All students currently stored in ClassMATE will be displayed in the **Student Panel**. | ||
|
||
* **`addc c/G99 s/Tuesday 2 to 4pm, Friday 2 to 4pm`**: Adds a tutorial class with the code `G99`. The **Tutorial Class Panel** | ||
should reflect the updated list of tutorial classes including your new class, `G99`. | ||
|
||
* **`addstu n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 c/G99`**: Adds a student named `John Doe` to ClassMATE. | ||
The **Student Panel** Should reflect the updated list of students including your new student, `John Doe`. | ||
|
||
* **`deletestu 3`**: Deletes the 3rd student shown in the current list. | ||
|
||
* **`clear`** : Deletes all students. | ||
|
||
* **`exit`** : Exits the app. | ||
|
||
Once you have attempted these commands, you're ready to go! | ||
|
||
### Command format | ||
|
||
This section will help you understand the syntax used to describe the command features in this guide better. | ||
|
||
<div markdown="block" class="alert alert-info"> | ||
**:information_source: Notes about the command format:**<br> | ||
|
@@ -86,16 +104,27 @@ We hope you find this User Guide helpful in using ClassMATE! | |
|
||
</div> | ||
|
||
### Viewing help : `help` | ||
## Features | ||
|
||
Shows a message explaning how to access the help page. | ||
Here, you can find instructions on how to use ClassMATE's various features. The features are divided into three main subsections, | ||
each covering different subsections, namely the Student features, Tutorial Class Features and Tutorial Group Features. Each | ||
subsection will provide you with an overview of the section, followed by the individual commands' formats, instructions on how to use them, | ||
examples of use and the expected outcome of executing these commands. | ||
|
||
 | ||
|
||
Format: `help` | ||
|
||
## Student Commands | ||
|
||
This part of the guide covers all the features you can use to manage student information.These features include: | ||
1. Add a new Student | ||
1. Edit and existing Student | ||
1. View a student's details | ||
1. Delete a student | ||
1. List all students | ||
1. Find students by name | ||
1. Add Class participation marks | ||
1. Delete all students | ||
|
||
### Adding a student: `addstu` | ||
|
||
Adds a student to ClassMATE. | ||
|
@@ -251,18 +280,28 @@ Examples: | |
|
||
Deletes a class from ClassMATE | ||
|
||
 | ||
Format: `deletec INDEX` | ||
|
||
* Deletes the class at the specified INDEX. | ||
* The index refers to the index number shown in the displayed list of classes. | ||
The index **must be a positive integer** 1, 2, 3, … | ||
* Students assinged to that class will have thier clascode replaced by `No Class`. They can be edited | ||
to be added to another class. | ||
|
||
Examples: | ||
* `listc` followed by `deletec 2` deletes the 2nd class in the list of classes. | ||
* `findc G06` followed by `deletec 1` deletes the 1st class in the results of the `findc` command. | ||
|
||
## Tutorial Group Commands | ||
|
||
This part of the guide covers all the features you can use to manage Groups within a tutorial class. These features include: | ||
1. Add a group | ||
1. View all groups in a class | ||
1. Delete a group | ||
1. Add a student to a group | ||
1. Remove a student from a group | ||
|
||
### Adding a group: `addcg` | ||
|
||
Adds a group to a particular tutorial class | ||
|
@@ -308,7 +347,11 @@ Format: `deletecg INDEX` | |
Examples: | ||
* `listg n/G06` followed by `deleteg 2` deletes the 2nd group in the list of group in class G06 | ||
|
||
<<<<<<< HEAD | ||
### Adding Student to a group: `addsg` | ||
======= | ||
### Adding Student to a group: `addsg` [Coming Soon] | ||
>>>>>>> 26bc37482e0c6a7ebb59d6753eae335409cadb55 | ||
Adds student to a group. | ||
|
||
|
@@ -334,6 +377,15 @@ Example: | |
* `liststu c/G06`shows that Betsy is a student in class G06 with Index 1. | ||
`deletesg 1 g/A c/G06 type/OP1` then removes Betsy from OP1 Group A in class G06 | ||
|
||
## Additional Commands | ||
|
||
### Viewing help : `help` | ||
|
||
Shows a message explaning how to access the help page. | ||
|
||
 | ||
|
||
Format: `help` | ||
|
||
### Exiting the program : `exit` | ||
|
||
|
@@ -378,8 +430,13 @@ Action | Format, Examples | |
**View class** | `viewc INDEX`<br> e.g., `listc` followed by `viewc 3` | ||
**List all classes** | `listc` | ||
**Find class** | `findc KEYWORD [MORE_KEYWORDS]`<br> e.g., `findc A02` | ||
<<<<<<< HEAD | ||
**Add Tutorial Group** | `addcg gn/GROUP_NAME c/CLASS_CODE type/TYPE` <br> e.g.,`addcg gn/1 c/G11 type/OP1` | ||
**Delete Tutorial Group** | `deletecg INDEX` <br> e.g., `deletecg 2` | ||
======= | ||
**Add Tutorial Group** | `addcg gn/GROUP_NAME c/CLASS_CODE type/TYPE` <br> e.g.,`addsg n/Betsy tp/OP1 g/A` | ||
**Delete Tutorial Group** | `deletecg INDEX` <br> e.g., `deletecg 2` | ||
>>>>>>> 26bc37482e0c6a7ebb59d6753eae335409cadb55 | ||
**List Tutorial Group** | `listg` | ||
**Add Student to Group** | `addsg INDEX g/GROUP_NAME c/CLASSCODE type/TYPE` <br> e.g., `addsg 1 gn/Group 1 c/G01 type/OP1` | ||
**Delete Student from Group** | `deletesg INDEX g/GROUP_NAME c/CLASSCODE type/TYPE` <br> e.g., `deletesg 1 gn/Group 1 c/G01 type/OP1` | ||
|
@@ -390,3 +447,7 @@ Action | Format, Examples | |
|
||
**Java 11** | Java is a programming language, more on it [here](https://en.wikipedia.org/wiki/Java_(programming_language)). | ||
**JSON** | a JSON file is an open standard file format, more on it [here](https://en.wikipedia.org/wiki/JSON). | ||
**CLI** | Command Line Interface (CLI) enables users to interact with a program by typing in text commands following | ||
visual prompts from the program. | ||
**GUI** | Graphical User Interface (GUI) is a system of interactive visual components that allows users to interact with | ||
a program through graphical icons. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
71 changes: 71 additions & 0 deletions
71
src/main/java/seedu/address/logic/commands/ViewGroupCommand.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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package seedu.address.logic.commands; | ||
|
||
import static java.util.Objects.requireNonNull; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_CLASSCODE; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUPNUMBER; | ||
import static seedu.address.logic.parser.CliSyntax.PREFIX_TYPE; | ||
|
||
import seedu.address.commons.core.Messages; | ||
import seedu.address.logic.commands.exceptions.CommandException; | ||
import seedu.address.model.Model; | ||
import seedu.address.model.student.GroupMemberPredicate; | ||
import seedu.address.model.tutorialclass.TutorialClass; | ||
import seedu.address.model.tutorialgroup.TutorialGroup; | ||
|
||
/** | ||
* Lists all students in a tutorial group in ClassMATE given a class code, tutorial group type and tutorial group name | ||
* Keyword matching is case-insensitive. | ||
*/ | ||
public class ViewGroupCommand extends Command { | ||
|
||
public static final String COMMAND_WORD = "viewg"; | ||
|
||
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all students in a tutorial group given a class " | ||
+ "code, tutorial group type and tutorial group name (case-insensitive) and displays them as a list" | ||
+ "with index numbers.\n" | ||
+ "Parameters: " | ||
+ PREFIX_CLASSCODE + "CLASSCODE " | ||
+ PREFIX_TYPE + "TYPE " | ||
+ PREFIX_GROUPNUMBER + "GROUPNUMBER " | ||
+ "Example: " + COMMAND_WORD + " " | ||
+ PREFIX_GROUPNUMBER + "3 " | ||
+ PREFIX_CLASSCODE + "G06 " | ||
+ PREFIX_TYPE + "OP2 "; | ||
|
||
private final TutorialGroup toView; | ||
private final TutorialClass toViewTutorialClass; | ||
|
||
/** | ||
* Creates a ViewGroupCommand to show the students in the specified {@code TutorialGroup} | ||
*/ | ||
public ViewGroupCommand(TutorialGroup tutorialGroup) { | ||
requireNonNull(tutorialGroup); | ||
toView = tutorialGroup; | ||
// new class with the same class code created to check whether it exists in ClassMATE | ||
toViewTutorialClass = TutorialClass.createTestTutorialClass(toView.getClassCode()); | ||
} | ||
|
||
@Override | ||
public CommandResult execute(Model model) throws CommandException { | ||
requireNonNull(model); | ||
|
||
// check if tutorial class exists in ClassMATE | ||
if (!model.hasTutorialClass(toViewTutorialClass)) { | ||
throw new CommandException(Messages.MESSAGE_CLASS_DOES_NOT_EXIST); | ||
} | ||
|
||
|
||
|
||
model.updateFilteredStudentList(new GroupMemberPredicate(toView)); | ||
return new CommandResult( | ||
String.format(Messages.MESSAGE_TUTORIAL_GROUP_LISTED_OVERVIEW, | ||
model.getFilteredStudentList().size())); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object other) { | ||
return other == this // short circuit if same object | ||
|| (other instanceof ViewGroupCommand // instanceof handles nulls | ||
&& toView.equals(((ViewGroupCommand) other).toView)); // state check | ||
} | ||
} |
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
Oops, something went wrong.