diff --git a/.gitignore b/.gitignore index 5e59b862ba4..3953eebc474 100644 --- a/.gitignore +++ b/.gitignore @@ -2,11 +2,13 @@ /.gradle/ /build/ src/main/resources/docs/ +src/main/main.iml # IDEA files /.idea/ /out/ /*.iml +*.swp # Storage/log files /data/ @@ -19,3 +21,8 @@ src/test/data/sandbox/ # MacOS custom attributes files created by Finder .DS_Store + +# files for testing +study_plan.csv +backup.json + diff --git a/.travis.yml b/.travis.yml index 924a42eb8da..01ada018b8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ deploy: branch: master before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock + - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ cache: diff --git a/README.adoc b/README.adoc index e36efe534bb..f1677dea9bd 100644 --- a/README.adoc +++ b/README.adoc @@ -1,10 +1,8 @@ -= Address Book (Level 3) -ifdef::env-github,env-browser[:relfileprefix: docs/] += iGrad -https://travis-ci.org/se-edu/addressbook-level3[image:https://travis-ci.org/se-edu/addressbook-level3.svg?branch=master[Build Status]] -https://ci.appveyor.com/project/damithc/addressbook-level3[image:https://ci.appveyor.com/api/projects/status/3boko2x2vr5cc3w2?svg=true[Build status]] -https://coveralls.io/github/se-edu/addressbook-level3?branch=master[image:https://coveralls.io/repos/github/se-edu/addressbook-level3/badge.svg?branch=master[Coverage Status]] -https://www.codacy.com/app/damith/addressbook-level3?utm_source=github.com&utm_medium=referral&utm_content=se-edu/addressbook-level3&utm_campaign=Badge_Grade[image:https://api.codacy.com/project/badge/Grade/fc0b7775cf7f4fdeaf08776f3d8e364a[Codacy Badge]] +https://travis-ci.org/AY1920S2-CS2103T-F09-3/main[image:https://travis-ci.org/AY1920S2-CS2103T-F09-3/main.svg?branch=master[Build Status]] +https://coveralls.io/github/AY1920S2-CS2103T-F09-3/main?branch=master[image:https://coveralls.io/repos/github/AY1920S2-CS2103T-F09-3/main/badge.svg?branch=master&service=GitHub[Coverage Status]] +image:https://api.codacy.com/project/badge/Grade/f15c80077ca543afad741bee37e6f4db[link="https://app.codacy.com/gh/AY1920S2-CS2103T-F09-3/main?utm_source=github.com&utm_medium=referral&utm_content=AY1920S2-CS2103T-F09-3/main&utm_campaign=Badge_Grade_Dashboard"] ifdef::env-github[] @@ -15,22 +13,39 @@ ifndef::env-github[] image::images/Ui.png[width="600"] endif::[] -* This is a desktop Address Book application. It has a GUI but most of the user interactions happen using a CLI (Command Line Interface). -* It is a Java sample application intended for students learning Software Engineering while using Java as the main programming language. -* It is *written in OOP fashion*. It provides a *reasonably well-written* code example that is *significantly bigger* (around 6 KLoC)than what students usually write in beginner-level SE modules. +Sick of having tracking your university progress the manual way? +Start getting rid of your Excel sheets and scribbled down notes and download _iGrad_ right now! + +What is _iGrad_? + +_iGrad_ is the app to track your university progress, for students who are frustrated with the +limited features the university provides, by students who are frustrated by the limited +features the university provides. + +_iGrad_ offers users the ability to create custom courses and graduation requirements, +ensuring the *maximum* degree of flexibility when planning and keeping track of your progress + +_iGrad_ also retrieves data directly from https://nusmods.com[NUS Mods], ensuring that module +information is always up to date. + +_iGrad_ calculates your CAP at every step, ensuring you never have to use a CAP calculator again + +Finally, the _iGrad_ team is always open to feedback and suggestions from the public will always be followed up on. == Site Map * <> * <> -* <> * <> * <> == Acknowledgements -* Some parts of this sample application were inspired by the excellent http://code.makery.ch/library/javafx-8-tutorial/[Java FX tutorial] by -_Marco Jakob_. -* Libraries used: https://openjfx.io/[JavaFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/junit-team/junit5[JUnit5] + + +== Acknowledgements + +* This project was built on top of Address Book 3 by the https://se-education.org/[SE-Education team]. +* Libraries used: https://openjfx.io/[JavaFX], https://github.com/FasterXML/jackson[Jackson], https://github.com/junit-team/junit5[JUnit5]. == Licence : link:LICENSE[MIT] diff --git a/build.gradle b/build.gradle index 93029ef8262..4aa16d74281 100644 --- a/build.gradle +++ b/build.gradle @@ -12,10 +12,20 @@ plugins { id 'com.github.johnrengelman.shadow' version '4.0.4' id 'org.asciidoctor.convert' version '1.5.6' id 'application' + id 'org.openjfx.javafxplugin' version '0.0.7' +} + +repositories { + mavenCentral() +} + +javafx { + version = "11.0.2" + modules = [ 'javafx.controls', 'javafx.fxml' ] } // Specifies the entry point of the application -mainClassName = 'seedu.address.Main' +mainClassName = 'igrad.Main' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -44,7 +54,7 @@ test { dependencies { String jUnitVersion = '5.4.0' String javaFxVersion = '11' - + compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jdk8', version: '2.8.8' implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win' implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac' implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux' @@ -67,7 +77,7 @@ dependencies { } shadowJar { - archiveName = 'addressbook.jar' + archiveName = 'igrad.jar' destinationDir = file("${buildDir}/jar/") } @@ -133,8 +143,8 @@ asciidoctor { idprefix: '', // for compatibility with GitHub preview idseparator: '-', 'site-root': "${sourceDir}", // must be the same as sourceDir, do not modify - 'site-name': 'AddressBook-Level3', - 'site-githuburl': 'https://github.com/se-edu/addressbook-level3', + 'site-name': 'iGrad', + 'site-githuburl': 'https://github.com/AY1920S2-CS2103T-F09-3/main', 'site-seedu': true, // delete this line if your project is not a fork (not a SE-EDU project) ] diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 24eaeb44965..61b6da7516c 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -59,6 +59,7 @@ value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE"/> + diff --git a/config/checkstyle/suppressions.xml b/config/checkstyle/suppressions.xml index dabcd1ff4e3..f2f96550d7e 100644 --- a/config/checkstyle/suppressions.xml +++ b/config/checkstyle/suppressions.xml @@ -1,8 +1,8 @@ + "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" + "https://checkstyle.org/dtds/suppressions_1_2.dtd"> diff --git a/docs/AboutUs.adoc b/docs/AboutUs.adoc index 458e6134f45..94c6af57b5d 100644 --- a/docs/AboutUs.adoc +++ b/docs/AboutUs.adoc @@ -4,53 +4,48 @@ :imagesDir: images :stylesDir: stylesheets -AddressBook - Level 3 was developed by the https://se-edu.github.io/docs/Team.html[se-edu] team. + -_{The dummy content given below serves as a placeholder to be used by future forks of the project.}_ + -{empty} + +iGrad was developed by the https://github.com/AY1920S2-CS2103T-F09-3 team. + We are a team based in the http://www.comp.nus.edu.sg[School of Computing, National University of Singapore]. == Project Team -=== John Doe -image::damithc.jpg[width="150", align="left"] -{empty}[http://www.comp.nus.edu.sg/~damithch[homepage]] [https://github.com/damithc[github]] [<>] +=== Daryl Goh +image::dargohzy.png[width="150", align="left"] +{empty}[https://github.com/dargohzy[github]] -Role: Project Advisor +Role: Frontend Developer ''' -=== John Roe -image::lejolly.jpg[width="150", align="left"] -{empty}[http://github.com/lejolly[github]] [<>] +=== Nathanael Seen +image::nathanaelseen.png[width="150", align="left"] +{empty}[https://github.com/nathanaelseen[github]] -Role: Team Lead + -Responsibilities: UI +Role: Chief Technology Officer ''' -=== Johnny Doe -image::yijinl.jpg[width="150", align="left"] -{empty}[http://github.com/yijinl[github]] [<>] +=== Teri +image::teriaiw.png[width="150", align="left"] +{empty}[http://github.com/teriaiw[github]] -Role: Developer + -Responsibilities: Data +Role: UI/UX ''' -=== Johnny Roe -image::m133225.jpg[width="150", align="left"] -{empty}[http://github.com/m133225[github]] [<>] +=== Wayne Wee +image::waynewee.png[width="150", align="left"] +{empty}[http://github.com/waynewee[github]] -Role: Developer + -Responsibilities: Dev Ops + Threading +Role: Marketing ''' -=== Benson Meier -image::yl_coder.jpg[width="150", align="left"] -{empty}[http://github.com/yl-coder[github]] [<>] +=== Yijie +image::yjskrs.png[width="150", align="left"] +{empty}[http://github.com/yjskrs[github]] -Role: Developer + -Responsibilities: UI +Role: Project Manager ''' diff --git a/docs/ContactUs.adoc b/docs/ContactUs.adoc index 81be279ef6d..d19a3a54365 100644 --- a/docs/ContactUs.adoc +++ b/docs/ContactUs.adoc @@ -2,6 +2,5 @@ :site-section: ContactUs :stylesDir: stylesheets -* *Bug reports, Suggestions* : Post in our https://github.com/se-edu/addressbook-level3/issues[issue tracker] if you noticed bugs or have suggestions on how to improve. -* *Contributing* : We welcome pull requests. Follow the process described https://github.com/oss-generic/process[here] -* *Email us* : You can also reach us at `damith [at] comp.nus.edu.sg` +* *Bug reports, Suggestions* : Post in our https://github.com/AY1920S2-CS2103T-F09-3/main/issues[issue tracker] if you noticed bugs or have suggestions on how to improve. +* *Email us* : You can also reach us at `e0202795 [at] comp.nus.edu.sg` diff --git a/docs/DevOps.adoc b/docs/DevOps.adoc index 2aa5a6bc0c1..d5b9ee8840e 100644 --- a/docs/DevOps.adoc +++ b/docs/DevOps.adoc @@ -12,7 +12,7 @@ ifdef::env-github[] :note-caption: :information_source: :warning-caption: :warning: endif::[] -:repoURL: https://github.com/se-edu/addressbook-level3/tree/master +:repoURL: https://github.com/AY1920S2-CS2103T-F09-3/main/tree/master == Build Automation @@ -34,14 +34,14 @@ When a pull request has changes to asciidoc files, you can use https://www.netli Here are the steps to create a new release. -. Update the version number in link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp.java`]. +. Update the version number in link:{repoURL}/src/main/java/igrad/MainApp.java[`MainApp.java`]. . Generate a JAR file <>. . Tag the repo with the version number. e.g. `v0.1` . https://help.github.com/articles/creating-releases/[Create a new release using GitHub] and upload the JAR file you created. == Managing Dependencies -A project often depends on third-party libraries. For example, Address Book depends on the https://github.com/FasterXML/jackson[Jackson library] for JSON parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives: +A project often depends on third-party libraries. For example, Course Book depends on the https://github.com/FasterXML/jackson[Jackson library] for JSON parsing. Managing these _dependencies_ can be automated using Gradle. For example, Gradle can download the dependencies automatically, which is better than these alternatives: [loweralpha] . Include those libraries in the repo (this bloats the repo size) diff --git a/docs/DeveloperGuide.adoc b/docs/DeveloperGuide.adoc index 3d65905a853..f3d5fa5d23e 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -1,9 +1,10 @@ -= AddressBook Level 3 - Developer Guide += iGrad - Developer Guide :site-section: DeveloperGuide :toc: :toc-title: :toc-placement: preamble -:sectnums: +:toclevels: 3 +:sectnums: 4 :imagesDir: images :stylesDir: stylesheets :xrefstyle: full @@ -14,7 +15,7 @@ ifdef::env-github[] endif::[] :repoURL: https://github.com/se-edu/addressbook-level3/tree/master -By: `Team SE-EDU`      Since: `Jun 2016`      Licence: `MIT` +By: `AY1920S2-CS2103T-F09-3`      Since: `Feb 2020`      Licence: `MIT` == Setting up @@ -26,15 +27,17 @@ Refer to the guide <>. === Architecture .Architecture Diagram -image::ArchitectureDiagram.png[] +image::developer-guide/ArchitectureDiagram.png[] -The *_Architecture Diagram_* given above explains the high-level design of the App. Given below is a quick overview of each component. +The *_Architecture Diagram_* given above explains the high-level design of the App. +Given below is a quick overview of each component. [TIP] The `.puml` files used to create diagrams in this document can be found in the link:{repoURL}/docs/diagrams/[diagrams] folder. Refer to the <> to learn how to create and edit diagrams. -`Main` has two classes called link:{repoURL}/src/main/java/seedu/address/Main.java[`Main`] and link:{repoURL}/src/main/java/seedu/address/MainApp.java[`MainApp`]. It is responsible for, +`Main` has two classes called link:{repoURL}/src/main/java/igrad/Main.java[`Main`] and link:{repoURL}/src/main/java/igrad/MainApp.java[`MainApp`]. +It is responsible for, * At app launch: Initializes the components in the correct sequence, and connects them up with each other. * At shut down: Shuts down the components and invokes cleanup method where necessary. @@ -44,198 +47,1106 @@ The following class plays an important role at the architecture level: * `LogsCenter` : Used by many classes to write log messages to the App's log file. -The rest of the App consists of four components. +The rest of the App consists of five components. * <>: The UI of the App. * <>: The command executor. * <>: Holds the data of the App in-memory. * <>: Reads data from, and writes data to, the hard disk. +* <>: Interacts with an external Application Programming Interface (API) to obtain data for the App. -Each of the four components +Each of the first four components * Defines its _API_ in an `interface` with the same name as the Component. * Exposes its functionality using a `{Component Name}Manager` class. -For example, the `Logic` component (see the class diagram given below) defines it's API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class. +For example, the `Logic` component (see the class diagram given below) defines its API in the `Logic.java` interface and exposes its functionality using the `LogicManager.java` class. .Class Diagram of the Logic Component -image::LogicClassDiagram.png[] +image::developer-guide/LogicClassDiagram.png[] [discrete] ==== How the architecture components interact with each other The _Sequence Diagram_ below shows how the components interact with each other for the scenario where the user issues the command `delete 1`. -.Component interactions for `delete 1` command -image::ArchitectureSequenceDiagram.png[] +.Component interactions for `module delete CS1010` command +image::developer-guide/ArchitectureSequenceDiagram.png[] The sections below give more details of each component. +//tag::ui[] [[Design-Ui]] === UI component .Structure of the UI Component -image::UiClassDiagram.png[] +image::developer-guide/UiClassDiagram.png[] -*API* : link:{repoURL}/src/main/java/seedu/address/ui/Ui.java[`Ui.java`] +*API* : link:{repoURL}/src/main/java/igrad/ui/Ui.java[`Ui.java`] -The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `PersonListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class. +Section by: https://github.com/dargohzy[Daryl] -The `UI` component uses JavaFx UI framework. The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. For example, the layout of the link:{repoURL}/src/main/java/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`] +The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `ModuleListPanel`, `StatusBar` etc. +All these, including the `MainWindow` (excluding `AvatarImage`), inherit from the abstract `UiPart` class. + +The `UI` component uses JavaFx UI framework. +The layout of these UI parts are defined in matching `.fxml` files that are in the `src/main/resources/view` folder. +For example, the layout of the link:{repoURL}/src/main/java/igrad/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`]. The `UI` component, * Executes user commands using the `Logic` component. * Listens for changes to `Model` data so that the UI can be updated with the modified data. +==== MainWindow + +The `MainWindow` class serves as the hub for all the UI components, and contains the following UI classes: + +* `AvatarSelectionPanel` - Avatar selection screen on first-time startup. +* `CommandBox` - Command box for user input. +* `CommandReceivedPanel` - Displays the last command entered. +* `ResultDisplay` - Displays the resultant message of the command entered. Also contains the avatar image. +* `ModuleListPanel` - Panel displaying the modules input into the system. +* `RequirementListPanel` - Panel displaying the requirements input into the system. +* `ProgressSidePanel` - Panel displaying the user's academic progress and fundamental details (Eg. CAP). + +The `MainWindow` coordinates the development between the backend and frontend components to induce a visible change to the interface. + +This is done through the `executeCommand(String commandText, Model model)` method. Upon user input, the `logic` class +executes the command in `commandText`, and the model is updated to reflect the changes. Subsequently, after the model +has been updated, the following UI classes `ResultDisplay` and `ProgressSidePanel` are refreshed as a result. + +==== AvatarSelectionPanel + +The `AvatarSelectionPanel` class displays the avatar selection screen upon first-time startup. Users will choose an +that will act as a guide throughout their usage of the application. + +==== CommandBox + +The `CommandBox` class contains an editable `TextArea` JavaFX component which allows the user to enter input commands. + +==== CommandReceivedPanel +The `CommandReceivedPanel` class contains a panel that shows the last command entered into the system. + +Here is an example of how the `CommandReceivedPanel` works: +[[fig-CommandReceivedPanelSequenceDiagram]] +.CommandReceivedPanel Updating from Received Command + +image::developer-guide/CommandReceivedSetCommand.png[] + +. Command executed on `MainWindow`. +. `MainWindow` calls the method `refreshCommandReceivedPanel`, which refreshes the `CommandReceivedPanel`. +. `CommandReceivedPanel` updates its JavaFX `Label` with the `String` of the command given. +. `CommandReceivedPanel` displays visible change on the interface. +. `refreshCommandReceivedPanel` ends execution. + +==== ResultDisplay +The `ResultDisplay` class shows the resultant message generated from the user's input. +The avatar will also showcase a different expression according to the success of the command given. + +Here is an example of how the `ResultDisplay` works: +[[fig-ResultDisplaySequenceDiagram]] +.ResultDisplay Updating from Received Command + +image::developer-guide/ResultDisplayHandleCommand.png[] + +. Command executed on `MainWindow`. +. `MainWindow` calls the method `refreshResultDisplayAvatar`, which refreshes the `Avatar` in `ResultDisplay`. +. `ResultDisplay` updates its JavaFX `ImageView` according to the `Avatar` of the command given. In this case, when no +exception is thrown, the `Avatar` displays that of a positive expression. +. `refreshResultDisplayAvatar` ends execution. +. `ResultDisplay` displays visible change on the interface. +. `MainWindow` calls the method `refreshResultDisplay`, which refreshes the resultant message displayed in `ResultDisplay`. +. `ResultDisplay` updates its JavaFX `TextArea` according to the `CommandResult` of the command given. In this case, the +TextArea will display the 'success' message generated as a result of the command. +. `ResultDisplay` displays visible change on the interface. +. `refreshResultDisplay` ends execution. + +==== ModuleListPanel +The `ModuleListPanel` class contains the `ObservableList` JavaFX component allowing for a list view of the +components inside it, in this case, a list of `ModuleCard` objects. + +The contents of the list are dependent on the `modules` that the user has input into the system. Each module will be +displayed as a `ModuleCard` object. + +==== RequirementListPanel +The `RequirementListPanel` class contains the `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. +* stores the Course Book data. +* exposes an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. +* exposes an unmodifiable `ObservableList` that can be 'observed'. * does not depend on any of the other three components. [NOTE] -As a more OOP model, we can store a `Tag` list in `Address Book`, which `Person` can reference. This would allow `Address Book` to only require one `Tag` object per unique `Tag`, instead of each `Person` needing their own `Tag` object. An example of how such a model may look like is given below. + +As a more OOP model, we can store a `Tag` list in `Course Book`, which `Module` can reference. +This would allow `Course Book` to only require one `Tag` object per unique `Tag`, instead of each `Module` needing their own `Tag` object. +An example of how such a model may look like is given below. + + -image:BetterModelClassDiagram.png[] +image:developer-guide/BetterModelClassDiagram.png[] [[Design-Storage]] === Storage component .Structure of the Storage Component -image::StorageClassDiagram.png[] +image::developer-guide/StorageClassDiagram.png[] -*API* : link:{repoURL}/src/main/java/seedu/address/storage/Storage.java[`Storage.java`] +*API* : link:{repoURL}/src/main/java/igrad/memo/Storage.java[`Storage.java`] The `Storage` component, * can save `UserPref` objects in json format and read it back. -* can save the Address Book data in json format and read it back. +* can save the Course Book data in json format and read it back. [[Design-Commons]] === Common classes -Classes used by multiple components are in the `seedu.addressbook.commons` package. +Classes used by multiple components are in the `iGrad.commons` package. == Implementation This section describes some noteworthy details on how certain features are implemented. -// tag::undoredo[] -=== [Proposed] Undo/Redo feature -==== Proposed Implementation +//tag::course-feature-dg[] -The undo/redo mechanism is facilitated by `VersionedAddressBook`. -It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. -Additionally, it implements the following operations: +=== Course Feature +Section by: https://github.com/nathanaelseen[Nathanael Seen] -* `VersionedAddressBook#commit()` -- Saves the current address book state in its history. -* `VersionedAddressBook#undo()` -- Restores the previous address book state from its history. -* `VersionedAddressBook#redo()` -- Restores a previously undone address book state from its history. +As per the Model diagram xref:anchor-tag-a[above], there is only one `CourseBook` in the system. -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively. +A `CourseBook` represents all information related to helping a user track her graduation +requirements, including the following: -Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. +** One `UniqueModuleList`, consisting of all xref:anchor-tag-b[`Modules`] in the system, +which may or may not be mapped to any (degree) xref:anchor-tag-c[`Requirement(s)`] +** One `UniqueRequirementList`, consisting of all (degree) xref:anchor-tag-c[`Requirements`] +** One `CourseInfo`, representing important information related to a degree course, which +would be detailed more in this section -Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state. +==== Implementation +Section by: https://github.com/nathanaelseen[Nathanael Seen] -image::UndoRedoState0.png[] -Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state. +In the implementation of the course feature which 'houses' the various xref:anchor-tag-c[`Requirements`] +and the xref:anchor-tag-b[`Modules`] mapped under those requirements, a `CourseInfo` class is +necessary in order to represent overall course information, such as the name of the course, the +current cap of the student (or user), the total credits (MCs) fulfilled/required, and +semesters left before she could graduate. -image::UndoRedoState1.png[] +These important information are encapsulated in the `CourseInfo` class which should only +have one `Name`, one `Cap`, one `Credits` and one `Semesters` object(s), at any one time: -Step 3. The user executes `add n/David ...` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`. +.Structure of CourseInfo Class +image::developer-guide/CourseInfoClassDiagram.png[] -image::UndoRedoState2.png[] +Also, as per the diagram above, we note that these fields (in a `CourseInfo`) are optional, +because a user might not even have a course set in the first place. This occurs when the +application is started out in a 'blank' state, with no initial or sample data. -[NOTE] -If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`. +Now, to describe more of this `CourseInfo` class, its fields, the following two sub-sections would +detail the `Credits` and `Semesters` classes and their design. -Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state. +Thereafter, the next two sub-sections would attempt to explain the mechanics of the two crucial static +methods `computeCredits(...)` and `computeCap(...)`, which is used +throughout the application. -image::UndoRedoState3.png[] +Finally, the last two sections would be dedicated to elaborating how the various +course commands; `course edit` and `course achieve` works. -[NOTE] -If the `currentStatePointer` is at index 0, pointing to the initial address book state, then there are no previous address book states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the undo. +===== Credits +Section by: https://github.com/nathanaelseen[Nathanael Seen] -The following sequence diagram shows how the undo operation works: +.Course Credits Class Diagram +image::developer-guide/CourseCreditsClassDiagram.png[] -image::UndoSequenceDiagram.png[] +The `Credits` class maintains 2 integers; `creditsRequired` and `creditsFulfilled`, for +storing both the total number of course credits (MCs) required for graduation, +and also the number credits the user has fulfilled thus far, respectively. -NOTE: The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +Also, it some `public` validation methods (`isValidCreditsFulfilled()` and `isValidCreditsFulfilled()`) +which is used in the constructor for constructing a 'valid' `Credits` object. -The `redo` command does the opposite -- it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state. +The following constraints defines a 'valid' `Credits` object: -[NOTE] -If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone address book states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo. +* `creditsRequired` > 0 +* `creditsFulfilled` >= 0 + +Note that `creditsFulfilled` can be *more than or equals* to `creditsRequired`, as it is +possible that a student 'over-fulfills' the graduation requirements in her course. + + +The following are some noteworthy details on the `Credits` class/object: + +anchor:anchor-tag-f[] + +* `Credits` is recomputed through the xref:anchor-tag-d[`computeCredits(...)`] method in +`CourseInfo` (whenever there is a possible change). This newly recomputed `Credits` object would be +subsequently updated in the `CourseInfo` + +anchor:anchor-tag-g[] + +* `creditsRequired` is recomputed by summing all the `creditsRequired` of the +individual `Requirements` in the `UniqueRequirementList` + +* `creditsFulfilled` is recomputed in the same way as `creditsFulfilled` + +* In the `CourseInfo` class, `Credits` is first initialized (to some non-empty value) only when the +following conditions have been met: + +** The user has already set a course, through the `course set` command. + +** There is at least one `Requirement` in the `UniqueRequirementList`,` by which `creditsRequired` +and `creditsFulfilled` could be re/computed. + +//end::course-feature-dg[] + +===== Semesters + +//tag::semesters[] + +Section by: https://github.com/teriaiw[Teri] + +.Course Semesters Class Diagram +image::developer-guide/CourseSemestersClassDiagram.png[] + +`Semesters` stores the total semesters and remaining semesters that a user has in the course. + +The following are some noteworthy details on the `Semesters` class/object: + +* `Semesters` is first initialized when user does command `course set`. `totalSemesters` will be equal to +`remainingSemesters` as user has not entered any other data to indicate completion of semesters. +* `Semesters` is updated through method `computeSemesters` in `CourseInfo`. +* `totalSemesters` is changed by user through the command `course edit`. +* `remainingSemesters` is computed by method `computeRemainingSemesters`. This method uses the `moduleList` +to check for `module` that has `Semester` and `Grade`. The `module` which fulfils the mentioned and has the latest +`Semester` will be taken as the latest completed semester. + +//end::semesters[] + +//tag::course-compute-credits-cap-dg[] + +anchor:anchor-tag-d[] + +===== Compute Credits + +In this section, we describe how `computeCredits(requirement: Requirement[])` works to recompute +the latest `Credits`. + +As previously xref:anchor-tag-f[mentioned], this method is invoked everytime there is a +possible change in the total course `Credits`. + +This might be caused through the following commands: + +* `module done` where a `Module` is attributed a grade and marked done. Resultantly, all +`Requirements` in the `UniqueRequirementList`, consisting of that `Module` would have to be updated. +Also, but most importantly, the `creditsFulfilled` attribute of those `Requirements` would +have to be updated, causing an eventual change in the total course `creditsFulfilled` of `Credits` +(in `CourseInfo`). + +* `requirement un/assign` where `Module(s)` are assigned to that particular requirement, where +some `Modules` might have already been marked as done and given a grade, hence falling back +to the first scenario, where `creditsFulfilled` of a course would have to be updated. + +* `requirement edit` where the `creditsRequired` attribute of that requirement might be +updated, resulting in the need to update the overall course `creditsRequired` as well + +* And many others such as; `requirement add`, `requirement delete`, `module edit`, `module delete` + +Now, we have specified the possible scenarios where `computeCredits(...)` might have to be +invoked to update `Credits` of `CourseInfo`, however we have not described how it actually works. + +As from our previous xref:anchor-tag-g[discussion], we note that `creditsFulfilled` and +`creditsRequired` is computed through summing up the `creditsFulfilled` and `creditsRequired` +for the individual `Requirements`. + +More formally, the interactions between the various classes, for the computation to be +performed are as such: + +.Sequence Diagram for computing updated credits +image::developer-guide/ComputeCreditsSequenceDiagram.png[] + +===== Compute Cap + +Similar to <>, `Cap` has to be updated frequently, each time module information +in `coursebook` changes, and the `computeCap(...)` method facilitates the recomputation of the +updated `Cap`. + +The diagram below describes the interactions between the various classes, as the computation +is performed: + +.Sequence Diagram for computing updated cap +image::developer-guide/ComputeCapSequenceDiagram.png[] + +We note that from above, `CourseInfo` does most of the interfacing with other classes, +and the rest of the classes don't interact with each another. + +In summary, the following steps are performed as `computeCap(...)` is invoked: + +(For each `Module` in the `moduleList`): + +. `CourseInfo` first iterates through `reqList` to determine if a `Module` belongs to any `Requirement` +. If it does, `CourseInfo` again interfaces with `Module` to extract its `Grade`. +. Finally, `CourseInfo` interacts with `Grade` to determine if the `Grade` is a non-SU grade. +. If the `Grade` is non-SU, the `Module` is factored into Cap computation. + +//end::course-compute-credits-cap-dg[] + +//tag::courseedit[] +==== Course Edit +Section by: https://github.com/teriaiw[Teri] + +===== Overview +Users can edit their course info, which are `Name` and `Semesters` by using the `course edit` command. + +===== Implementation +Here is how the courseInfo class updates when name and semesters of course is edited. + +.Sequence Diagram when editing course name and course semesters. +image::developer-guide/CourseEditSequenceDiagram.png[] + +When a user edits a course, the user has to specify the prefix `n/` for `Name` or `s/` prefix +for `Semesters`. + +Then the application proceeds to do the following steps: + +. The `CourseEditCommandParser` is called to parse the `CourseEditCommand` with the `n/` and `s/` prefix. +. The `CourseEditCommand` is executed and calls `setCourseInfo` to `Model`. +. `Model` calls the same method `setCourseInfo` to `CourseBook`. +. The new course `Name` and course `Semesters` is set in the `CourseBook`. + +//end::courseedit[] + +//tag::courseachieve[] +==== Course Achieve +Section by: https://github.com/teriaiw[Teri] + +===== Overview +Users can get an automatic calculation of their desired C.A.P. by using the `course achieve` command and +entering their desired `Cap`. + +===== Implementation +The computation of C.A.P. is done through `computeEstimatedCap` in `courseInfo` which uses `Semesters` +and `Cap` of `courseInfo`. + +.Course Achieve Logic Sequence Diagram +image::developer-guide/CourseAchieveSequenceDiagram.png[] +When a user wants to calculate achievable C.A.P., the user has to specify the prefix `c/` for `Cap`. +Then the application proceeds to do the following steps: + +. The `CourseAchieveCommandParser` is called to parse the `CourseAchieveCommand` with the `c/` prefix. +. The `CourseAchieveCommand` is executed and it calls method `getCourseInfo` in `Model` to get `CourseInfo`. +. The `CourseAchieveCommand` then proceeds to call method `computeEstimatedCap` in `CourseInfo`. +. The `CourseAchieveCommand` then passes the computed result to `CommandResult` + +The below is a detailed description of what happens inside the `Model`: + +.Course Achieve Model Sequence Diagram +image::developer-guide/CourseAchieveSequenceDiagram2.png[] + +. After the execute call, the `CourseAchieveCommand` calls method `getCourseInfo` in `Model`. +. `Model` then calls the same method `getCourseInfo` to `CourseBook` to retrieve `CourseInfo`. +. With the `CourseInfo` and `Cap`, `CourseAchieveCommand` calls method `computeEstimatedCap` in `CourseInfo`. +. `CourseInfo` calls method `getSemesters` and `getCap` to itself to get the following information: +... `Semesters` +... `Cap` +. `computeEstimmatedCap` computes and returns estimate `Cap`. +. The result is passed back to `CourseAchieveCommand`, which passes to `CommandResult` and eventually returns to +the user. + +===== Design Considerations + +*Invalid and Unachievable C.A.P.* + +It is possible that a calculated `Cap` to achieve is not a valid `Cap`. In such situations, an exception is +thrown within the `computeEstimatedCap` command and it is caught in the `CourseAchieveCommand`. User will be +given feedback that the desired C.A.P. is not achievable. + +The figure below illustrates this: + +.Course Achieve Activity Diagram +image::developer-guide/CourseAchieveActivityDiagram.png[] + +Therefore, there are three types of result displayed to User: + +. When User enters invalid Cap to achieve +. When computed Cap is invalid +. When computed Cap is valid +//end::courseachieve[] + +''' + +anchor:anchor-tag-b[] + +//tag::module[] + +=== Module Feature +Section by: https://github.com/waynewee[Wayne] + +==== Module Component + +The `Module` component is the building block of all other components in the system. +In order to track the number of `credits` left to fulfill +for each `requirement`, each `module` is stored in a `UniqueModuleList` and the `credits` tied to each +`module` is then tabulated. + +Besides being necessary in tracking the amount of credits left for a `requirement`, `modules` are also +used to decide which `semester` the user is currently in. When a `semester` is tagged to a `module`, either when +a new `module` is added or an existing `module` is edited, the latest `semester` of all `modules` in the `filteredList` of modules is taken +to be the current semester. + +A module must have the following non-optional values: + +|=== +|Value Type|Class Name|Example + +|String|Title|Software Engineering +|String|ModuleCode| CS2103T +|String| Credits| 4 +|List|ModulePrerequisites| CS2030, CS2040 +|List|ModulePreclusions| CS2103, CS2103T, CS2113T, CS2113 +|=== + +A module may also have the following optional values: + +|=== +|Value Type|Class Name|Example + +|String|Semester|Y3S1 +|String|Grade| A+ +|=== + +<> illustrates the relation between the various classes: + +[#moduleClassDiagram] +.Module Class Diagram +image::developer-guide/ModuleClassDiagram.png[] + +//tag::wayne-ug[] +==== Module Add Auto +Section by: https://github.com/waynewee[Wayne] + +===== Overview + +The "automatic" addition of `modules` allows users to add up to 10 `modules` at once with all non-optional values filled in. +This is done by making a HTTP GET request to the https://api.nusmods.com/[NUSMods API] and fetching the module data +given in a JSON format. + +===== Implementation + +The automatic filling in of `module` details on addition of a new `module` is facilitated by `NusModsRequester`. +It creates a new instance of `GetRequestManager` which it relies on to make a request to the https://api.nusmods.com/[NUSMods API]. +Upon receiving a response, it creates an instance of JsonParsedModule. + +`JsonParsedModule` parses the JSON object given in the response of the initial request and stores the following values: + +[#JsonParsedModuleTableOfValues] +.JsonParsedModule Table of Values +|=== +|Value Type|Name|Example + +|String|title|Software Engineering +|String|moduleCode|CS2103T +|String|credits|4 +|String|prerequisite| CS2040C or (CS2030 and (CS2040 or its equivalent)) +|String|preclusion| CS2103, CS2103T, (CS2113T for CS2113), (CS2113 for CS2113T) +|=== + +NOTE: <> illustrates the difficulty in parsing `prerequisites` and `preclusions` as +the data provided is not in a standard format + +The created `JsonParsedModule` object is then converted into a `Module` object, which is subsequently added +to the `courseBook` via the method `addModule` of the `ModelManager`. + +<> illustrates this: + +[#moduleAddAutoSequenceDiagram] +.Module Add Auto Sequence Diagram +image::developer-guide/ModuleAddAutoSequenceDiagram.png[] + +===== Design Considerations + +Most of the design considerations arose as a result of having to make a network request. + +*A _secondary_ module addition feature* + +As with all network requests, this feature might not work as intended in certain circumstances. Possible cases are: + +1. High Network Congestion + +2. Poor Network Connection + +3. NUSMods Offline + +In such situations, it becomes difficult or impossible to carry out the addition of `modules` using this command. +Therefore, this feature was built on top of the primary `module add` feature, ensuring that the user +could still manage to add `modules` even when faced with the issues as listed above. + +The use case for this situation is as follows: + +''' +System: iGrad + +Use case: UCM1 - Add module via NUSMods + +Actor: User, NUSMods + +MSS: + +1. User wants to add a module. + +2. iGrad requires user to specify the module codes. + +3. User enters the module codes corresponding to the modules +he wishes to add. + +4. iGrad sends a request to NUSMods. + +5. NUSMods responds with the requested data. + +6. iGrad adds the module to the module list. + +7. User views the module in the module list. + +Use case ends. + +Extensions: + +5a. NUSMods does not respond with the requested data. + +5a1. User adds module manually + +[#moduleAutoAddUseCaseDiagram] +.Module Auto Add Use Case Diagram +image::developer-guide/ModuleAutoAddUseCaseDiagram.png[] + +//end::wayne-ug[] +''' +*Messages for individual modules* + +As this feature allows a user to add `modules` by batches, it is possible that one or more `modules` in +the batch are invalid or require warning messages. In order to facilitate this, the processing of the list of `modules` and the +generation of error and warning messages were done in parallel. This was because if the list of `modules` was processed first, +`modules` with issues would be filtered out without notice, leading to a confusing user experience. + +[#moduleAddAutoBatchProcessing] +.Module Add Auto Batch Processing +image::developer-guide/ModuleAddAutoBatchActivityDiagram.png[] + +*Improving the user experience [PROPOSED]* + +Due to network latency - the Round Trip Time taken from when a request is made to when a response is +received - the user might experience a situation where it appears that the application has stopped working. + +For a large batch of `modules`, the application might also display a _not responding_ label in the toolbar. +In order to improve the user experience, it is ideal that a loader be displayed when waiting for the response from the server. +However, due to time constraints, this was not implemented. + +*Getting the latest data [DEPRECATED]* + +Past iterations of this feature made a maximum of two requests for one `module`. The first request would +attempt to get the `module` for the current academic year, whilst the second request attempted to get +the `module` for the previous academic year, in the event the module for the current academic year was not available. + +This process is illustrated in <>. However, it was decided +that the benefits of making a maximum of one request outweighed that of getting the latest module information and thus, +currently only one request is made. + +[#previousImplementationOfModuleAddAuto] +.Previous implementation of Module Add Auto +image::developer-guide/ModuleAddAutoActivityDiagram.png[] + + +==== Module Filter + +===== Overview + +The average number of `modules` a student has for a 4 year program in NUS is 40. The application window, however, can display +a maximum of 9 `modules` for a 17" screen and considerably less for smaller displays. As a result, it is imperative that users have +a way to filter `modules` so that only what is required is displayed. + +===== Implementation + +The filtering of modules is done by calling the `execute` function of `ModuleFilterCommand`.`ModuleFilterCommand` takes in +optional parameters `Semester`, `Credits`, `Grade` and an operator, which could be `AND` or `OR`. The `ModuleFilterCommand` then +calls `updateFilteredModuleList` on the `Model` such that the `Model` updates the `filteredList` based on the predicates provided. +The `ModuleFilterCommand` then calls `getFilteredModuleList()` to check if the filter was applied successfully. + +The matching is done by the functions `checkSemesterMatch(Module m)`, `checkCreditsMatch(Module m)` and `checkGradeMatch(Module m)`. Unlike +the other two functions, `checkCreditsMatch(Module m)` does not check if the actual `credits` for a module is present since the +`credits` field in a module is compulsory. + +The `AND` operator specifies that the provided parameters be chained with the logical _and_ operator. + +The `OR` operator specifies that provided parameters be chained with the logical _or_ operator. + +When the filter command is issued, the `Model` updates the module list based on the predicate given. <> +illustrates this sequence of events: +[#moduleFilterSequenceDiagram] +.Module Filter Sequence Diagram +image::developer-guide/ModuleFilterSequenceDiagram.png[] + +===== Design Considerations + +*Resetting the state* + +When this command is issued, the modules that do not match the predicate given will disappear from the module list. +It is thus necessary to allow the user to issue a new command in order to view all the modules again. + +Whilst creating a new command such as `module reset` was proposed, it was decided that a new command would only serve to +make the user experience more complicated than it should be. + +Therefore, an allowance was made for `module filter` to reset the state when receiving no parameters, a divergence from +the way other functions handled the situation of empty parameters. + +<> illustrates this clearly: + +[#moduleFilterActivityDiagram] +.Module Filter Activity Diagram +image::developer-guide/ModuleFilterActivityDiagram.png[] + +The `filteredList` of `modules` therefore takes three general states (see <>): + +1. Initial State ++ +The `module` list is unfiltered. All `modules` are displayed. -Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged. +2. Filtered by `AND` State ++ +The `module` list is filtered by a predicate composed of the provided parameters +chained together with the logical _and_ operator + +3. Filtered by `OR` State ++ +The `module` list is filtered by a predicate composed of the provided parameters +chained together with the logical _or_ operator + +[#moduleFilterStateDiagram] +.Module Filter State Diagram +image::developer-guide/ModuleFilterStateDiagram.png[] + +*Displaying Filter State [PROPOSED]* + +An issue with the filtering of modules is that when the current state is not obvious, the +user might lose track of what the module list is filtering on. To solve this problem, +it would be an improvement to display the current state prominently to the user. + +//tag::module-done-dg[] + +==== Module Done + +Section by: https://github.com/nathanaelseen[Nathanael Seen] + +===== Overview + +This feature enables students to mark a module which they have completed with a certain grade. +Once a module is marked 'done', it would be counted to graduation requirements. + +===== Implementation + +Trivial as it might seem, there are actually quite a number of `coursebook` data which needs to +be updated when a module is marked 'done'. + +This includes the `Module` itself, the various `Requirements` in the `UniqueRequirementList`, +and the `CourseInfo`. + +The following diagram illustrates this: + +.Module Done Sequence Diagram +image::developer-guide/ModuleDoneActivityDiagram.png[] + +As from the above, there are two possible scenarios; either a `Module` belongs to at least one +`Requirement` or that it does not belong to any `Requirement`. + +In the latter case, calls to methods which update `CourseInfo` would be immediately invoked, +bypassing the updating of the `Requirement(s)`. + +//end::module-done-dg[] + +''' + +anchor:anchor-tag-c[] + +//end::requirement-yijie[] +=== Requirement Feature +Section by: https://github.com/yjskrs[Yijie] + +The `Requirement` feature bridges the connection between a `Module` and a `Course`. A `Requirement` represents +a category with a set amount of modular credits needed to be fulfilled in order to graduate. By +adding modules to a `Requirement`, these modules are tracked under the modular credits needed to fulfill +the `Requirement`, as well as the total modular credits needed to fulfill the `Course`. + +Multiple requirements can exist in a `Course`. When all requirements have been fulfilled, +we indicate that the `Course` has been completed. + +//tag::RequirementImplementation[] +==== Implementation +Section by: https://github.com/yjskrs[Yijie] + +The `Requirement` component contains 4 sub-components: `RequirementCode`, `Title`, `Credits` and `UniqueModuleList`. +All four sub-components are compulsory and must always be specified in a `Requirement`. The properties of these four +sub-components are specified in the table below: + +[#tableRequirementComponentProperties] +.Requirement Component Properties. +|=== +|Class Name |Properties |Example + +|`RequirementCode` |The *unique* identifier of a requirement. + +Implemented to allow users to easily specify the requirement they want to modify or remove. See xref:requirementCodeDesignConsiderations[Requirement Code Design Considerations]. + +|CSF0 + +|`Title` |The title of a requirement. + +Does not have to be unique. + +|Computer Science Foundation + +|`Credits` |The credits of a requirement, |40 +|`UniqueModuleList` |The list of modules assigned to a requirement. |List containing modules CS1101S, CS2101, CS2103T +|=== + +When a `Module` is added to a `Requirement`, the `UniqueModuleList` is updated with the new `Module`. +At the same time, the `creditsAssigned` property of the `Credits` class also updates accordingly. If +the `Module` is completed, the `creditsFulfilled` property of `Credits` also updates to add the +credits of the `Module`. For example, if a module with 4 modular credits was marked as done and assigned +to a `Requirement`, `creditsAssigned` and `creditsFulfilled` would both increase by 4. + +The class diagram below illustrates the relationship between `Requirement` components. + +[#requirementClassDiagram] +.Structure of the Requirement class. +image::developer-guide/RequirementClassDiagram.png[] + +`Requirement` commands that are available are: + +* `requirement add` - adds a new requirement to the course book +* `requirement edit` - edits an existing requirement in the course book +* `requirement delete` - deletes an existing requirement from the course book +* `requirement assign` - assigns module(s) to the requirement + +//tag::RequirementAdd[] +==== Requirement Add +Section by: https://github.com/yjskrs[Yijie] + +===== Overview +The `requirement add` command adds a `Requirement` to the `Course`. The `Credits` information held by the `Course` +is updated to reflect the total modular credits required to complete the course. + +===== Implementation +When a user enters a `requirement add` command, the parameters specified by the user, i.e. the requirement title +and the requirement credits required to fulfill the `Requirement`, are passed to the `LogicManager`, +`CourseBookParser` and subsequently into the `RequirementAddCommandParser` where the parameters are extracted +and parsed into `Title` and `Credits` objects. + +The `RequirementCode` is generated at this stage by using the first letter of every word in the +title parameter passed in, upper-cased. For example, if the title provided is "Computer Science Foundation", +the `RequirementCode` generated would be `CSF`. Similarly, if the title provided is "3Computer Science 4Foundation", +the `RequirementCode` generated would still be `CSF` because non-alphabets in the title are ignored. + +The parsed `Title`, `Credits` and the generated `RequirementCode` are used to create a `RequirementAddCommand` object, +which is later executed by the `LogicManager`, as shown in the +xref:requirementAddSequenceDiagram[Requirement Add Sequence Diagram] below. + +When the command is executed by the `LogicManager`, the new `Requirement` is created and +stored in the `CourseBook` through the `Model`. + +[#requirementAddSequenceDiagram] +.Sequence Diagram when adding a requirement. +image::developer-guide/RequirementAddSequenceDiagram.png[] + +===== Design Considerations + +[#requirementCodeDesignConsiderations] +====== Requirement Code + +Originally, we chose to use the requirement `Title` as the *unique* identifier for requirements, which means that +specifying a `Requirement` to be modified or deleted would be handled by entering the `Title`. However, we realised +that that was a big deterrent in users staying on our application in the long run. The reason is because requirement +titles are generally long, and often require more than one word to be expressed. For example, typing "Computer +Science Foundation" or "Computer Science Breadth and Depth" every time a module was to be assigned to a requirement +would require a relatively long time, and would violate our xref:nonFunctionalRequirements[Non-Functional Requirement] +of providing users with an application which can be navigated quickly through typing. + +Hence, we chose the design of providing users with a `RequirementCode`, the *unique* identifier which allows +users to quickly access the `Requirement` they want to modify or delete. + +In order to make the `RequirementCode` strictly *unique*, further parsing is performed on the `RequirementCode` +generated by the `RequirementAddCommandParser`. When the `RequirementAddCommand` is executed by the `LogicManager`, +a new `RequirementCode` is generated, as shown in the +xref:requirementAddSequenceDiagram[Requirement Add Sequence Diagram], by appending an integer to the back of +the original `RequirementCode`. This is necessary as multiple requirements with the same starting alphabets +may exist, so we need to allow users to differentiate amongst such requirements. Furthermore, users are also +allowed to add requirements with the same `Title` to enhance the flexibility of adding requirements, so the +`RequirementCode` also allows users to differentiate amongst these requirements. + +The use case for adding a requirement is as follows: + +System: iGrad + +Use case: UCR1 - Add requirement + +Actor: User + +MSS: + +1. User requests to add a requirement. + +2. iGrad requires user to enter a requirement title and credits. + +3. User enters the title and credits. + +4. iGrad creates the requirement. + +5. Use case ends. + +Extensions: + +3a. The requirement title is not provided. + +3a1. iGrad prompts user for requirement title. + +3a2. User enters a requirement title. + +Steps 3a1-3a2 are repeated until a valid requirement title is provided. + +Use case resumes at step 4. + +Below displays the activity diagram for adding a requirement. + +.Activity Diagram when adding a requirement. +image::developer-guide/RequirementAddActivityDiagram.png[] + +//end::requirement-yijie[] + +//tag::requirement-assign-dg[] + +==== Requirement Assign + +Section by: https://github.com/nathanaelseen[Nathanael Seen] + +===== Overview + +This feature allows `Module(s)` to be assigned or mapped under a `Requirement`. + +===== Implementation + +We note that as like the `module done` command, a few pieces of information in the +`coursebook` would have to be updated. + +The command-parsing-execute mechanism is largely similar to `requirement add` the above, however, +we would like to focus more on the activities (such as validations, etc) that happens +at the `Model` side. + +The following diagram details this: + +.Activity Diagram when assigning modules under a requirement. +image::developer-guide/RequirementAssignActivityDiagram.png[] + +Hence as per the diagram, we observe that modules are assigned to a `Requirement` +on the following two conditions: + +. All `Modules` to assign are existent in the `coursebook` (more specifically, the `UniqueModuleList`) +. `Modules` have not already been previously assigned to that `Requirement` + +//end::requirement-assign-dg[] + +''' + +=== Export Feature +Section by: https://github.com/waynewee[Wayne] + +==== Overview + +The export feature allows the user to export their data into a .csv file. + +==== Implementation + +The export feature is facilitated by the `CsvWriter`. The `ExportCommand` calls `exportModuleList()` on `ModelManager`, +which then performs a filter on the `filteredList` of modules in order to filter out all modules where the `Optional` object +`isEmpty()`. + +The `ModelManager` allows for `write()` to be called on `CsvWriter` only if the `filteredList` has at least one module. + +<> shows the process of exporting modules with semesters: + +[#exportSequenceDiagram] +.Export Sequence Diagram +image::developer-guide/ExportSequenceDiagram.png[] + +Once the `CsvWriter` returns from `write()`, a file titled _study_plan.csv_ will be created in the top-level directory. -image::UndoRedoState4.png[] +The top-level directory has two states concerning the generated file (see <>): -Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. We designed it this way because it no longer makes sense to redo the `add n/David ...` command. This is the behavior that most modern desktop applications follow. +1. Empty State ++ +- does not contain the file study_plan.csv + +2. Non-empty State ++ +- contains the file study_plan.csv -image::UndoRedoState5.png[] +[#exportStateDiagram] +.Export State Diagram +image::developer-guide/ExportStateDiagram.png[] -The following activity diagram summarizes what happens when a user executes a new command: +As seen in the figure, it is only possible to revert the state i.e. from Non-empty State to Empty State, by externally +deleting the file. + +Additionally, if `export` is issued when there is an existing _study_plan.csv_, the current file will be overwritten. -image::CommitActivityDiagram.png[] ==== Design Considerations -===== Aspect: How undo & redo executes +*Writing and Reading Issues* + +It is possible that the user has the _study_plan.csv_ file open while attempting to export data. The only known solution is +for the user to close the file and issuing the command again. + +''' + +=== Undo Feature +Section by: https://github.com/waynewee[Wayne] + +==== Overview + +The undo feature allows for the prior state of a `courseBook` to be saved and loaded from when needed. + +==== Implementation + +The undo mechanism is facilitated by the `ModelManager` and the `LogicManager`. + +The function `saveCourseBook()`, which composes the `storage` object, is used to save the previous state of the `coursebook` +in the file _backup_coursebook.json_ when a new command is executed. -* **Alternative 1 (current choice):** Saves the entire address book. +The function `undoCourseBook()`, implemented by the `ModelManager`, reads from the file _backup_coursebook.json_ and restores +the data by calling `setCourseBook()` + +Given below is an example usage scenario and how the undo mechanism behaves at each step: + +Step 1. The user starts up the application. + +image::developer-guide/UndoState0.png[] + +Step 2. The user issues the command `module delete CS2103T`. The previous state of the course book is stored into the file +at `backup_coursebook.json` by `saveCourseBook()`. This state still contains the module CS2103T. + +image::developer-guide/UndoState1.png[] + +NOTE: When the `undo` command is executed, the state of the `courseBook` is not saved. + +Step 3. The user issues the command `undo`. The file at `backup_coursebook.json` is read from and loaded as the main `courseBook` +to be read from. + +image::developer-guide/UndoState2.png[] + +Step 4. The `backupCourseBook` becomes the main `courseBook` and another instance of `courseBook` will be created as its +backup if another command is issued. + +image::developer-guide/UndoState3.png[] + +The following sequence diagram shows how the undo operation works: + +image::developer-guide/UndoSequenceDiagram.png[] + +==== Design Considerations + +*How undo executes* + +* Option 1 (current choice): Saves the entire course book. ** Pros: Easy to implement. ** Cons: May have performance issues in terms of memory usage. -* **Alternative 2:** Individual command knows how to undo/redo by itself. -** Pros: Will use less memory (e.g. for `delete`, just save the person being deleted). +* Option 2: Individual command knows how to undo/]] by itself. +** Pros: Will use less memory (e.g. for `delete`, just save the module being deleted). ** Cons: We must ensure that the implementation of each individual command are correct. -===== Aspect: Data structure to support the undo/redo commands +NOTE: While it is recognised that Option 1 may have performance issues in terms of memory, the actual implementation +of the feature is unlikely to cause any memory issues. This is due to the fact that modules, requirements and other data +users would require are limited to a degree which will not require large memory allocation. -* **Alternative 1 (current choice):** Use a list to store the history of address book states. -** Pros: Easy for new Computer Science student undergraduates to understand, who are likely to be the new incoming developers of our project. -** Cons: Logic is duplicated twice. For example, when a new command is executed, we must remember to update both `HistoryManager` and `VersionedAddressBook`. -* **Alternative 2:** Use `HistoryManager` for undo/redo -** Pros: We do not need to maintain a separate list, and just reuse what is already in the codebase. -** Cons: Requires dealing with commands that have already been undone: We must remember to skip these commands. Violates Single Responsibility Principle and Separation of Concerns as `HistoryManager` now needs to do two different things. -// end::undoredo[] +''' -// tag::dataencryption[] === [Proposed] Data Encryption _{Explain here how the data encryption feature will be implemented}_ @@ -244,7 +1155,8 @@ _{Explain here how the data encryption feature will be implemented}_ === Logging -We are using `java.util.logging` package for logging. The `LogsCenter` class is used to manage the logging levels and logging destinations. +We are using `java.util.logging` package for logging. +The `LogsCenter` class is used to manage the logging levels and logging destinations. * The logging level can be controlled using the `logLevel` setting in the configuration file (See <>) * The `Logger` for a class can be obtained using `LogsCenter.getLogger(Class)` which will log messages according to the specified logging level @@ -279,105 +1191,192 @@ Refer to the guide <>. *Target user profile*: -* has a need to manage a significant number of contacts -* prefer desktop apps over other types +* is a NUS undergraduate +* prefers desktop apps over other types * can type fast * prefers typing over mouse input * is reasonably comfortable using CLI apps -*Value proposition*: manage contacts faster than a typical mouse/GUI driven app +*Value proposition*: convenient course requirements tracker for NUS undergraduates [appendix] == User Stories -Priorities: High (must have) - `* * \*`, Medium (nice to have) - `* \*`, Low (unlikely to have) - `*` +*Priorities*: + +* High (must have) - `* * *` +* Medium (nice to have) - `* *` +* Low (unlikely to have) - `*` [width="59%",cols="22%,<23%,<25%,<30%",options="header",] |======================================================================= -|Priority |As a ... |I want to ... |So that I can... -|`* * *` |new user |see usage instructions |refer to instructions when I forget how to use the App +|Priority |As a ... |I want to ... |So that I can ... +|`* * *` |first-time user |create a course | + +|`* * *` |student |create a graduation requirement | + +|`* * *` |student |input modules under a graduation requirement |keep track of when a graduation requirement is fulfilled + +|`* * *` |careless user |change the graduation requirements which I assigned to a course |amend any mistakes made when entering data + +|`* * *` |fickle user |change the modules which I assigned to a graduation requirement |change my study plan + +|`* * *` |fickle user |have the option to defer adding modules to a graduation requirement |delay making up my mind on which modules I wish to take + +|`* * *` |basic user |see information regarding the course I created, including graduation requirements, modules and gaps (e.g. modules that are unassigned) that need to be filled | -|`* * *` |user |add a new person | +|`* * *` |user |see the latest updated information about any module |make informed decisions -|`* * *` |user |delete a person |remove entries that I no longer need +|`* * *` |basic user |mark when a module is completed | -|`* * *` |user |find a person by name |locate details of persons without having to go through the entire list +|`* * *` |basic user |input the grades of a module | -|`* *` |user |hide <> by default |minimize chance of someone else seeing them by accident +|`* *` |basic user |retrieve my CAP of any semester at a command |stay updated about my results -|`*` |user with many persons in the address book |sort persons by name |locate a person easily +|`* *` |user |input my desired CAP and have the program calculate what grades I need to achieve |find out how well I need to do in following semesters + +|`* *` |user |group modules by graduation requirement |view by requirement + +|`* *` |user |group modules by semester |view by semester + +|`*` |user who wants to take notes |record notes for each module |record why I took it + +|`*` |picky user |customize display settings |customize to my needs + +|`*` |advanced command line user |use familiar linux commands |navigate more easily + +|`*` |advanced command line user |I want certain keys to do the same things as they would in the terminal (e.g. arrowUp cycles through command history) |======================================================================= -_{More to be added}_ +_{All user stories can be viewed from our wiki page and from our issues tracker.}_ [appendix] == Use Cases +Section by: https://github.com/yjskrs[Yijie] -(For all use cases below, the *System* is the `AddressBook` and the *Actor* is the `user`, unless specified otherwise) +(For all use cases below, the *System* is `iGrad` and the *Actor* is the `user`, unless specified otherwise.) [discrete] -=== Use case: Delete person +=== Use case: U01 - Create Course -*MSS* +*MSS*: -1. User requests to list persons -2. AddressBook shows a list of persons -3. User requests to delete a specific person in the list -4. AddressBook deletes the person +1. iGrad starts up. +2. User requests to create a course. +3. iGrad creates the course. + Use case ends. -*Extensions* +*Extensions*: [none] -* 2a. The list is empty. +* 2a. +The course name is not provided. +** 2a1. iGrad prompts user for course name. +** 2a2. User enters a course name. ++ +Steps 2a1-2a2 are repeated until the a non-empty course name is provided. ++ +Use case resumes at step 3. + +[discrete] +=== Use case: U02 - Create Requirement + +*MSS*: + +1. User requests to create a course. +2. iGrad creates course (UC01). +3. User requests to create a requirement. +4. iGrad creates the requirement. + Use case ends. -* 3a. The given index is invalid. +*Extensions*: + +[none] +* 3a. +The requirement title is not provided. +** 3a1. iGrad prompts user for requirement title. +** 3a2. User enters a requirement title. ++ +Steps 3a1-3a2 are repeated until the a non-empty requirement title is provided. ++ +Use case resumes at step 4. + +[discrete] +=== Use case: U03 - Create Module + +*MSS*: + +1. User requests to create a module by providing a module code. +2. iGrad creates the module with its data pulled from NUSMods. ++ +Use case ends. + +*Extensions*: + +[none] +* 1a. +Module data fails to get pulled due to network error. +** 1a1. iGrad takes from its local module data copy. ++ +Use case ends. + +[none] +* 1b. +Module data does not exist on NUSMods. +** 1b1. iGrad creates a empty module with only the module code. ++ +Use case ends. + +[discrete] +=== Use case: U04 - Assign Module to Requirement + +*MSS*: + +1. User requests to assign a module to a requirement by specifying its module code. +2. iGrad assigns module to requirement. + +Use case ends. + +*Extensions*: + [none] -** 3a1. AddressBook shows an error message. +* 1a. +Module does not exist in system. +** 1a1. iGrad creates the module (UC03). + Use case resumes at step 2. -_{More to be added}_ +[none] +* 1b. +Module has already been assigned to the requirement. +** 1b1. iGrad generates a warning and stops the assignment. ++ +Use case ends. [appendix] +[#nonFunctionalRequirements] == Non Functional Requirements -. Should work on any <> as long as it has Java `11` or above installed. -. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage. -. A user with above average typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. +. Should work on any <> as long as it has Java `11` or above installed. +. Should be able to hold up to 100 modules without a noticeable sluggishness in performance (i.e. should take less than 1 second to load) +. A user with above 70 wpm typing speed for regular English text (i.e. not code, not system admin commands) should be able to accomplish most of the tasks faster using commands than using the mouse. +. The interface should be intuitive enough such that a user who has never seen the user guide is able to use the basic features. _{More to be added}_ [appendix] == Glossary -[[mainstream-os]] Mainstream OS:: +[[mainstream-os]] +Mainstream OS:: Windows, Linux, Unix, OS-X -[[private-contact-detail]] Private contact detail:: +[[private-contact-detail]] +Private contact detail:: A contact detail that is not meant to be shared with others -[appendix] -== Product Survey - -*Product Name* - -Author: ... - -Pros: - -* ... -* ... - -Cons: - -* ... -* ... - [appendix] == Instructions for Manual Testing @@ -393,33 +1392,31 @@ These instructions only provide a starting point for testers to work on; testers .. Download the jar file and copy into an empty folder .. Double-click the jar file + Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum. - . Saving window preferences .. Resize the window to an optimum size. Move the window to a different location. Close the window. .. Re-launch the app by double-clicking the jar file. + Expected: The most recent window size and location is retained. - _{ more test cases ... }_ -=== Deleting a person +=== Deleting a module -. Deleting a person while all persons are listed +. Deleting a module while all modules are listed -.. Prerequisites: List all persons using the `list` command. Multiple persons in the list. +.. Prerequisites: List all modules using the `list` command. Multiple modules in the list. .. Test case: `delete 1` + - Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated. + Expected: First module is deleted from the list. +Details of the deleted module shown in the status message. +Timestamp in the status bar is updated. .. Test case: `delete 0` + - Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. + Expected: No module is deleted. +Error details shown in the status message. +Status bar remains the same. .. Other incorrect delete commands to try: `delete`, `delete x` (where x is larger than the list size) _{give more}_ + Expected: Similar to previous. -_{ more test cases ... }_ - === Saving data . Dealing with missing/corrupted data files .. _{explain how to simulate a missing/corrupted file and the expected behavior}_ - -_{ more test cases ... }_ diff --git a/docs/LearningOutcomes.adoc b/docs/LearningOutcomes.adoc index 436c1777617..bda3507ac4b 100644 --- a/docs/LearningOutcomes.adoc +++ b/docs/LearningOutcomes.adoc @@ -33,9 +33,9 @@ What other user stories do you think AddressBook should support? Add those user === Exercise: Add a 'Rename tag' use case * Add a use case to the `DeveloperGuide.adoc` to cover the case of _renaming of an existing tag_. -e.g. rename the tag `friends` to `buddies` (i.e. all persons who had the `friends` tag will now have +e.g. rename the tag `friends` to `buddies` (i.e. all modules who had the `friends` tag will now have a `buddies` tag instead) -Assume that AddressBook confirms the change with the user before carrying out the operation. +Assume that CourseBook confirms the change with the user before carrying out the operation. == Use Non Functional Requirements `[LO-NFR]` @@ -108,7 +108,7 @@ image::PrintableInterface.png[width=400] String getPrintableString(Printable... printables) { ---- + -The above method can be used to get a printable string representing a bunch of person details. +The above method can be used to get a printable string representing a bunch of module details. For example, you should be able to call that method like this: + [source,java] diff --git a/docs/SettingUp.adoc b/docs/SettingUp.adoc index c0659782fab..db271c89a94 100644 --- a/docs/SettingUp.adoc +++ b/docs/SettingUp.adoc @@ -37,7 +37,7 @@ Do not disable them. If you have disabled them, go to `File` > `Settings` > `Plu == Verifying the setup -. Run the `seedu.address.Main` and try a few commands +. Run the `igrad.Main` and try a few commands . <> to ensure they all pass. == Configurations to do before writing code diff --git a/docs/Testing.adoc b/docs/Testing.adoc index 5767b92912c..c6a7644253c 100644 --- a/docs/Testing.adoc +++ b/docs/Testing.adoc @@ -35,12 +35,11 @@ See <> for more info on how to run tests using G We have three types of tests: . _Unit tests_ targeting the lowest level methods/classes. + -e.g. `seedu.address.commons.StringUtilTest` +e.g. `igrad.commons.StringUtilTest` . _Integration tests_ that are checking the integration of multiple code units (those code units are assumed to be working). + -e.g. `seedu.address.storage.StorageManagerTest` +e.g. `igrad.storage.StorageManagerTest` . Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together. + -e.g. `seedu.address.logic.LogicManagerTest` - +e.g. `igrad.logic.LogicManagerTest` == Troubleshooting Testing **Problem: Keyboard and mouse movements are not simulated on macOS Mojave, resulting in GUI Tests failure.** diff --git a/docs/UserGuide.adoc b/docs/UserGuide.adoc index 4e5d297a19f..f6e48d55f90 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -1,8 +1,9 @@ -= AddressBook Level 3 - User Guide += iGrad - User Guide :site-section: UserGuide :toc: :toc-title: :toc-placement: preamble +:toclevels: 3 :sectnums: :imagesDir: images :stylesDir: stylesheets @@ -11,167 +12,1350 @@ ifdef::env-github[] :tip-caption: :bulb: :note-caption: :information_source: +:important-caption: :heavy_exclamation_mark: +:caution-caption: :fire: +:warning-caption: :warning: +:icons: :font: endif::[] -:repoURL: https://github.com/se-edu/addressbook-level3 +:repoURL: https://github.com/AY1920S2-CS2103T-F09-3/main -By: `Team SE-EDU` Since: `Jun 2016` Licence: `MIT` +By: `Team-iGrad` Since: `Feb 2020` == Introduction -AddressBook Level 3 (AB3) is for those who *prefer to use a desktop app for managing contacts*. More importantly, AB3 is *optimized for those who prefer to work with a Command Line Interface* (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps. Interested? Jump to the <> to get started. Enjoy! +Welcome! Thanks for choosing to use iGrad. This official iGrad User Guide will help guide you as you explore the ways you can +track your graduation! == Quick Start -. Ensure you have Java `11` or above installed in your Computer. -. Download the latest `addressbook.jar` link:{repoURL}/releases[here]. -. Copy the file to the folder you want to use as the home folder for your Address Book. -. Double-click the file to start the app. The GUI should appear in a few seconds. -+ -image::Ui.png[width="790"] +*Follow the steps below to get started with iGrad:* + +1. Ensure that you have Java 11 installed on your computer. Java 11 is bundled together with the Java Development Kit and can be found link:https://www.oracle.com/java/technologies/javase-jdk11-downloads.html[here] + +2. Download our latest link:https://github.com/AY1920S2-CS2103T-F09-3/main/releases[release]! + +3. Copy or move the downloaded file into an *empty* folder. + -. Type the command in the command box and press kbd:[Enter] to execute it. + -e.g. typing *`help`* and pressing kbd:[Enter] will open the help window. -. Some example commands you can try: +IMPORTANT: Ensure that the folder is empty! Doing otherwise might result in unexpected errors. + +4. Simply double-click on the file to begin! We hope we make tracking your graduation a breeze! + -* *`list`* : lists all contacts -* **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : adds a contact named `John Doe` to the Address Book. -* **`delete`**`3` : deletes the 3rd contact shown in the current list -* *`exit`* : exits the app +== How to use this guide -. Refer to <> for details of each command. +You may proceed to <> if you would like to learn how to use each of the commands, and <> +if you would just like a list of all the commands for easy reference. -[[Features]] +The figure below explains the symbols used throughout the user guide. + +WARNING: Specifies the constraints of the command or situation. + +NOTE: Specifies expected command outcomes. + +TIP: Specifies extra tips you can use when navigating through our app. + +IMPORTANT: Specifies important things to take note of + +// tag::nat-ug[] == Features -==== -*Command Format* +Section by: https://github.com/nathanaelseen[Nathanael Seen] + +This segment highlights three key features iGrad offers to NUS students, namely; +a Course Planner, an MCs Tracker, and a CAP Tracker. + +If you would like a more in-depth overview of the actual components of our application, please +refer to the next section; <>, for more details. + +==== Course Planner +_iGrad_ was built with every NUS student in mind. Our flexible course planner allows you to plan +a course of your own dreams, be it those of you doing a single degree programme, +a double degree programme, and even a concurrent degree programme. + +With our course planner, you would be able to enter your current course details such as your +*modules* and the various degree *requirements* by which those modules are mapped. + +(For instance, the _Computer Science_ course has the various +*modules*, highlighted in [blue]#blue#, and degree *requirements*, boxed in [red]#red#): + +anchor:figure-a-anchor[] + +.Computer science degree requirements +image::../images/user-guide/components/graduation_degree_requirements.png[] + +==== MCs Tracker + +We are sick of counting our MCs at the beginning of every semester; be it counting the +total course MCs left before you can graduate, or tracking the number of MCs left +for those invidual degree requirements (boxed in [green]#green#, +in xref:figure-a-anchor[_Figure 1_]). + +With our MCs feature, you would be able to easily keep track of how close you are to +graduation, as all this information is automatically updated and recomputed, each time you have +completed a certain module. + +==== CAP Tracker +No more googling for CAP calculators. iGrad's CAP tracker helps you keeps track of your current CAP at +every step of your journey in your course. In addition, it even offers predictive features so you know how +well you have to do in order to achieve your dream CAP. + +==== Everything Integrated into One Application +But the best part is that these features are all integrated into our application; _iGrad_. +And with all these important pieces of information in one place, you would never go amiss keeping +track of all your graduation requirements. + +== Components +This segment details the various components of _iGrad_. As shown in _Figure 2_ below, +these components follow a hierachical structure, exactly like how an NUS course is structured. + +anchor:figure-b-anchor[] + +.Hierachical overview of iGrad components +image::../images/user-guide/components/hierachical_structure.png[] + +Here is how our application looks like (on a typical usage): + +.iGrad application screenshot +image::../images/user-guide/components/app_screenshot_ui.png[] + +The following is the same screenshot of our application, but with the various components +of our application highlighted: + +.iGrad components screenshot +image::../images/user-guide/components/app_screenshot_ui_components_highlighted.png[] + +As per the screenshot above (in _figure 4_): + +* xref:Course[Course] is indicated in [blue]#blue#, +* xref:Degree Requirements[Degree Requirements] is indicated in [red]#red#, and +* xref:Modules[Modules] is indicated in [yellow]#yellow# + +You may refer to xref:figure-b-anchor[_Figure 2_], if you would like a quick recap on the +hierarchical structuring of these components. + +==== Course + +A course is simply a group of degree requirements. + +It contains important information such as your current CAP, total number of MCs +you have completed thus far, and semesters left before you can graduate. + +In short, it helps you keep track of your overall degree progress. + +==== Degree Requirements + +Under a course are the various degree requirements, such as the ones shown in +xref:figure-b-anchor[_Figure 2_] above; _Computer Science Foundation_, +_Mathematics and Sciences_, and _Unrestricted Electives_. + +Each requirement comprises of the modules you need to complete in order to fulfill that particular +requirement. + +Additionally, each requirement consists of important information such as +the number of MCs you have already fulfilled. + +==== Modules + +Finally, modules are the basic building block of all the other components. + +These could be modules you have taken, modules you are currently taking and modules that +you plan to take. + +Each module allows recording of other optional information, such as indicating the grade you +have obtained for those modules. + +//end::nat-ug[] + +//tag::walkthrough[] +== Walkthrough + +Section by: https://github.com/dargohzy[Daryl] & https://github.com/teriaiw[Teri] + +This segment details a simple tutorial on how to use the application. It provides a step-by-step guide on how to +utilise the main components of the application, and covers the following: + +* Choosing an `Avatar` +* Adding a `Course` +* Adding a course `Requirement` +* Adding a `Module` +* Assigning a `Module` to a `Requirement` +* Adding additional details to a `Module` +* Marking as `Module` as done and assigning a `Grade` to it +* Tracking your academic progress: `MCs` and `CAP` +* Exporting your data + +Here is a 10-step guide on how to use `iGrad`. + +=== Start up the application + +Section by: https://github.com/dargohzy[Daryl] + +- Open up the application by opening the `iGrad.jar` file. +- Select an avatar by typing its name before pressing enter. +- The avatar will act as your guide for the application. ++ +image::../images/user-guide/walkthrough1.png[] + +=== Enter your course details + +Section by: https://github.com/dargohzy[Daryl] + +- Course refers to the name of the course you are currently enrolled in. +- Enter the name of your course in the format: `course add n/COURSE_NAME s/TOTAL_SEMESTERS` +- E.g. `course add n/Computer Science s/2` ++ +image::../images/user-guide/walkthrough2.1.png[] ++ +image::../images/user-guide/walkthrough2.2.png[] + +=== Key in your graduation requirements + +Section by: https://github.com/dargohzy[Daryl] + +- Requirements refer to degree requirements needed in the entered course. +- Enter your course graduation requirements in the format: `requirement add t/REQUIREMENT_TITLE u/MCS_REQUIRED` +- E.g. `requirement add n/General Education u/20` ++ +image::../images/user-guide/walkthrough3.1.png[] ++ +image::../images/user-guide/walkthrough3.2.png[] + +=== Add modules to the tracker + +Section by: https://github.com/dargohzy[Daryl] + +- Modules refer to modules that you have taken or are planning to take. +- Enter modules into the system in the format: `module add n/MODULE_CODE t/MODULE_TITLE u/MCs` +- E.g. `module add n/GER1000 t/Quantitative Reasoning u/4` ++ +image::../images/user-guide/walkthrough4.1.png[] ++ +image::../images/user-guide/walkthrough4.2.png[] + +=== Assign your modules + +Section by: https://github.com/dargohzy[Daryl] + +- Assign modules under their respective requirements. +- Enter assign in the format: `requirement assign REQUIREMENT_CODE n/MODULE_CODE` +- Note: Requirement codes are generated by the system. +- E.g. `requirement assign GE0 n/GER1000` ++ +image::../images/user-guide/walkthrough5.1.png[] ++ +image::../images/user-guide/walkthrough5.2.png[] + +=== Key in additional details for your modules + +Section by: https://github.com/teriaiw[Teri] + +- Edit modules with additional information such as Semester. Other information that has already be input can be + edited as well. +- Enter edit to be done to the module in the format: `module edit MODULE_CODE s/SEMESTER` +- Note: For Semester, it has to follow the format of `Y_S_` +- E.g. `module edit GER1000 s/Y1S1` ++ +image::../images/user-guide/walkthrough6.1.png[] ++ +image::../images/user-guide/walkthrough6.2.png[] + +=== Mark a module as done and assign a grade to it + +Section by: https://github.com/teriaiw[Teri] + +- A module is considered as done when a grade is assigned to it. +- Enter grade for the module in the format: `module done MODULE_CODE g/GRADE` +- E.g. `module done GER1000 g/A+` ++ +image::../images/user-guide/walkthrough7.1.png[] ++ +image::../images/user-guide/walkthrough7.2.png[] + +=== Track your MCs + +Section by: https://github.com/teriaiw[Teri] + +- MCs refer to Module Credits. +- MCs are automatically tracked and updated. +- Total MCs count is the total of all requirement MCs. +- MCs are fulfilled when modules that are within a requirement are marked done. ++ +image::../images/user-guide/walkthrough8.png[] + +=== View your CAP + +Section by: https://github.com/teriaiw[Teri] + +- CAP refers to Cumulative Average Points and is out of 5 (max). +- CAP is automatically tracked and updated. +- CAP is updated whenever a module within a requirement is marked done with a grade. ++ +image::../images/user-guide/walkthrough9.png[] + + +=== Export your data + +Section by: https://github.com/teriaiw[Teri] + +- Data of your entire study plan can to exported to a comma-separated values (.csv) file. +- Export your data in the format: `export` +- Note: Data file can be found in the same folder as this application. ++ +image::../images/user-guide/walkthrough10.1.png[] ++ +image::../images/user-guide/walkthrough10.2.png[] ++ +image::../images/user-guide/walkthrough10.3.png[] +//end::walkthrough[] + +== Command List +Section by: https://github.com/yjskrs[Yijie] + +This section provides a detailed breakdown of the various commands you may use in iGrad. +Please read <> to understand how our commands work! + +//tag::command-yijie[] +=== Command Format +Section by: https://github.com/yjskrs[Yijie] + +This section explains the syntax for the commands in iGrad. You may move onto xref:helpSection[] if you are already +familiar with our syntax which involves the command word(s), prefixes, parameters, specifiers and flags. + +The table below summarises the components of our syntax, using `module` commands as example. + +[#tableCommandFormatComponents] +.Command Format Components +|=== +|Component |Description |Example + +|Command Word(s) |Command words tell iGrad what command you are trying to perform. |E.g. `module add`. +|Prefix |Prefixes tell iGrad what kind of information you are trying to key in. +A prefix consists of an alphabet followed by a forward slash (i.e. `/`). +|E.g. `t/` is the prefix for `TITLE`. +|Parameter |Parameters tell iGrad the information you want to key in. Parameters are specified in *uppercase*. +Parameters come directly after a prefix, and you can chain prefix-parameters pairs. +|E.g. In `t/TITLE`, `TITLE` is the parameter where you can key in your desired title. +|Specifier |Specifiers inform iGrad of the item you want to edit or delete. To differentiate them from the +properties of the item you are trying to modify, they do not come with prefixes. +|E.g. In the `module edit CS2103T t/Hardware Engineering` command, `CS2103T` is the module we are trying to edit, +and `Hardware Engineering` is what we want to set as the new module title. +|Flag |Flags tell iGrad to use a different version of the command. +Flags consist of a dash (i.e. `-`) followed by an alphabet. +Flags can only be indicated at the end of the command. +|E.g. `module add n/CS2101 -a` adds a module by pulling its data from NUSMods. +|=== + +We have also listed all the parameters and their corresponding prefixes in the table below. +If square brackets (i.e. `[` `]`) are specified around a parameter-prefix pair, this means +that the parameter-prefix pair is optional. However, do note that if all parameter-prefix pairs +are indicated with square brackets, this means that at least one of them must be provided. Parameter-prefix +pairs which can be entered multiple times in a single command are also indicated by ellipses +(i.e. `...`) behind the parameter. + +[#tableParameterPrefixPairs] +.Parameter Prefix Pairs +|=== +|Parameter | Prefix + +|`NAME` or `CODE`|`n/` +|`TITLE`|`t/` +|`CREDITS`|`u/` +|`SEMESTER`|`s/` +|`GRADE`|`g/` +|`CAP`|`c/` +|=== + +The two flags used in iGrad are listed in the table below. + +[#tableFlags] +.Flags +|=== +|Flag | Purpose +|`-a`| Informs iGrad to use automated module adding by pulling data of modules from NUSMods. Only used in the xref:ModuleAutoAddCommand[ModuleAutoAdd] command. +|`-o`| Informs iGrad to use the or option when filtering modules. Only used in the xref:ModuleFilterCommand[ModuleFilter] command. +|=== + +//end::command-yijie[] + +[#helpSection] +=== Help +Section by: https://github.com/yjskrs[Yijie] + +This command opens up a help window for easy reference on the list of commands that can be used in iGrad. +A link is also provided to direct users to the user guide for more detailed explanations. + +[#tableHelpQuickReference] +.Help Quick Reference +|=== +|Purpose | Opens a help window with a list of commands +|Syntax| `help` +|Example | `help` + +|=== + +[#courseSection] +=== Course +Section by: https://github.com/yjskrs[Yijie] + +This section details each command used in manipulating the course. All course commands begin with the identifier +`course`, followed by the action, e.g. `set`. + +All course commands use the same parameters, as listed in the table below: +[#tableCourseParameters] +.Course Parameters +|=== +|Name| Description | Example | Restrictions + +|`COURSE_NAME`| The course name | Computer Science |- +|`SEMESTER`| The total number of semesters you will be spending in NUS | 8 |Must be a number less than 100. +|=== + +If the parameter restrictions are not strictly adhered to when issuing a course command, or if +iGrad cannot find what you're looking for, you might come across a common error. +The following error is generic and may be encountered when dealing with any course command: + +[#tableCourseParametersErrorReference] +.Course Parameters Error Reference +|=== +|Parameter |Error Name + +|`COURSE_CREDITS`| Invalid Course Credits +|=== + +This error can be resolved by adhering to the restriction detailed in <> + +==== Course Set + +This command sets the course. + +[#CourseSetQuickReference] +.Course Set Quick Reference +|=== +|Purpose | Sets the course +|Syntax| `course set n/COURSE_NAME s/SEMESTERS` +|Example | `course set n/Computer Science s/8` +|=== + +*How it Works* + +When you type in this command, we take the values given for the `COURSE_NAME` and `SEMESTERS` +and fill in those fields for your course. We do not check if the given course refers +to actual courses in NUS. However, restrictions stated in the xref:tableRequirementParameters[Requirement Parameters] +table still apply. + +<> lists errors you might encounter after issuing this command: + +[#CourseSetErrorReference] +.Course Set Error Reference +|=== +|Name | Message| Explanation| Solution + +|Parameters Not Provided Error |All fields to be filled, course set n/COURSE_NAME s/SEMESTERS +|Not all parameters needed to set the course have been provided +|Provide all parameters prepended with their prefixes +|=== + +*Tutorial* + +Follow these steps to get a clearer idea of how this command works. +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo changes made from this tutorial by using the appropriate command. + +1. Ensure that you do not have a course yet. You may do so by deleting the existing course +with the `course delete` command. + +2. Type the following into the command box: +`course set n/Computer Science s/8`, and press enter. + +3. The message in the response box should change and you should see the course name and semesters +updated in the top left corner panel. + +==== Course Edit + +This command edits the editable fields in a course which include the `COURSE_NAME` and `SEMESTERS`. + +IMPORTANT: Course name does not need to be specified. + +[#CourseEditQuickReference] +.Course Edit Quick Reference +|=== +|Purpose | Edits the course +|Syntax| `course edit [n/COURSE_NAME] [s/SEMESTERS]` +|Example | `course edit n/Engineering s/8` +|=== + +*How it Works* + +When you issue the command, we replace the fields provided with the given values. You are able to +change the values as you wish as long as they follow the restrictions as listed in the parameters table. + +<> lists the errors you might encounter after issuing this command: + +[#CourseEditErrorReference] +.Course Edit Error Reference +|=== +|Name| Message| Explanation |Solution + +|Parameters Not Provided Or Not Modified |At least one field to edit must be provided +|Parameters needed to edit the course are not provided +|Try specifying either the name or the credits, or provide a value that is different from the existing one +|=== + +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo or delete objects created from this tutorial by using the appropriate commands. + +1. Ensure that you have a course set. + +2. Type the following into the command box: +`course edit n/Computer Science s/8`, and press enter. + +3. The message in the response box should change and you should see the course name and semesters +updated in the top left corner panel. + +==== Course Delete + +This command *deletes the course as well as all other information stored* in iGrad. Please use with caution! + +IMPORTANT: Course name does not need to be specified. + +[#CourseDeleteQuickReference] +.Course Delete Quick Reference +|=== +|Purpose | Deletes the course +|Syntax| `course delete` +|Example | `course delete` +|=== + +*Tutorial* + +[NOTE] +You may undo changes made from this tutorial by using the appropriate command. + +1. Ensure that you have a course set. + +2. Type the following into the command box: +`course delete`, and press enter. + +3. The message in the response box should change and you should see the course name and semesters +disappear, as well as all other information in iGrad. + +//tag::requirement-yijie[] +[#requirementSection] +=== Requirement +Section by: https://github.com/yjskrs[Yijie] + +This section details each command used in manipulating requirements. All requirement commands begin with the identifier +`requirement`, followed by the action, e.g. `add`. + +All requirement commands use the same parameters, as listed in the table below: + +[#tableRequirementParameters] +.Requirement Parameters +|=== +|Name| Description | Example | Restrictions + +|`REQUIREMENT_CODE`| A requirement's unique identifier, automagically generated by iGrad based on the requirement title | CSF0 |- +|`REQUIREMENT_TITLE`| A requirement's title | Computer Science Foundation |Must contain at least one alphabet +|`REQUIREMENT_CREDITS`| The number of http://www.nus.edu.sg/registrar/academic-information-policies/graduate/modular-system[modular credits] needed to fulfill the requirement | 32 | Must be a positive number less than or equal to 10,000 +|`MODULE_CODE`| A module's module code, used when assigning or unassigning modules to and from a requirement | CS2103T | Detailed restrictions are specified xref:tableModuleParameters[here], but the requirement-specific restriction is that the module must already be added to iGrad. +|=== + +If the parameter restrictions are not strictly adhered to when issuing a requirement command, or if +iGrad cannot find what you're looking for, you might come across some common errors. +The following errors are generic and may be encountered when dealing with any requirement command: + +[#tableRequirementParametersErrorReference] +.Requirement Parameters Error Reference +|=== +|Parameter |Error Name + +|`REQUIREMENT_CODE`| Invalid Requirement Code +|`REQUIREMENT_TITLE`| Invalid Requirement Title +|`REQUIREMENT_CREDITS`| Invalid Requirement Credits +|=== + +These errors can all be resolved by adhering to the restrictions detailed in <> + +==== Requirement Add + +This command adds a requirement to the requirement list. + +[#RequirementAddQuickReference] +.Requirement Add Quick Reference +|=== +|Purpose | Adds a requirement +|Syntax| `requirement add t/REQUIREMENT_TITLE u/REQUIREMENT_CREDITS` +|Example | `requirement add t/Computer Science Foundation u/32` +|=== + +*How it Works* + +When you type in this command, we take the values given for the `REQUIREMENT_TITLE` and `REQUIREMENT_CREDITS` +and fill in those fields for your requirement. We do not check if the given requirement title or credits refer +to actual requirements as stated on NUS websites. However, restrictions stated in the +xref:tableRequirementParameters[Requirement Parameters] table still apply. + +<> lists errors you might encounter after issuing this command: + +[#RequirementAddErrorReference] +.Requirement Add Error Reference +|=== +|Name | Message| Explanation| Solution + +|Parameters Not Provided Error |Added requirement must be provided with arguments t/TITLE u/CREDITS +|Not all parameters needed to add a requirement are provided |Provide all parameters prepended with their prefixes +|=== + +*Tutorial* + +Follow these steps to get a clearer idea of how this command works. +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo changes made from this tutorial by using the appropriate command. + +1. Type the following into the command box: +`requirement add t/Computer Science Foundation u/32`, and press enter + +2. The message in the response box should change and you should see the following in the requirement panel: + ++ +.Requirement "Computer Science Foundation" successfully added +image::../images/user-guide/requirementCommand/requirementAddSuccess.png[] + +==== Requirement Edit + +This command edits the editable fields in a requirement which include the `REQUIREMENT_TITLE` and `REQUIREMENT_CREDITS`. +The `REQUIREMENT_CODE` is not editable as it is a unique identifier assigned by iGrad. + +[#RequirementEditQuickReference] +.Requirement Edit Quick Reference +|=== +|Purpose | Edits a requirement +|Syntax| `requirement edit REQUIREMENT_CODE [t/REQUIREMENT_TITLE] [u/REQUIREMENT_CREDITS]` +|Example | `requirement edit CSF0 t/Engineering Foundation u/40` +|=== + +*How it Works* + +IMPORTANT: Please type the requirement code in uppercase. -* Words in `UPPER_CASE` are the parameters to be supplied by the user e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`. -* Items in square brackets are optional e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`. -* Items with `…`​ after them can be used multiple times including zero times e.g. `[t/TAG]...` can be used as `{nbsp}` (i.e. 0 times), `t/friend`, `t/friend t/family` etc. -* Parameters can be in any order e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable. -==== +When you issue the command, we replace the fields provided with the given values. You are able to +change the values as you wish as long as they follow the restrictions as listed in the parameters table. -=== Viewing help : `help` +<> lists the errors you might encounter after issuing this command: -Format: `help` +[#RequirementEditErrorReference] +.Requirement Edit Error Reference +|=== +|Name| Message| Explanation |Solution -=== Adding a person: `add` +|Requirement Not Found Error |The requirement code provided is invalid +|The requirement you are attempting to edit does not exist +|Try changing the requirement code to one that you can find in the list, or add a new one instead +|Parameters Not Provided Or Not Modified |At least one field to edit must be provided +|Parameters needed to edit the requirement are not provided +|Try specifying either the title or the credits, or provide a value that is different from the existing one +|=== -Adds a person to the address book + -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]...` +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo or delete objects created from this tutorial by using the appropriate commands. + +1. Ensure that you have the requirement "Computer Science Foundation", coded CSF0, in the list. + +2. Type the following into the command box: `requirement edit CSF0 t/Engineering Foundation u/40`, and press enter. + +3. The message in the response box should change and you should see the following updated in the list: + ++ +.Requirement "Computer Science Foundation" successfully edited +image::../images/user-guide/requirementCommand/requirementEditSuccess.png[] + +==== Requirement Delete + +This command deletes a requirement from the list. + +[#RequirementDeleteQuickReference] +.Requirement Delete Quick Reference +|=== +|Purpose | Deletes a requirement +|Syntax| `requirement delete REQUIREMENT_CODE` +|Example | `module delete CSF0` +|=== + +*How it Works* + +The requirement that you wish to delete is completely removed from the list. +[WARNING] +Restoring the requirement is only possible using the `undo` command which would only work if `delete` was the last issued command. + +<> lists the errors you might encounter after issuing this command: + +[#RequirementDeleteErrorReference] +.Requirement Delete Error Reference +|=== +|Name| Message| Explanation |Solution + +|Requirement Not Found Error |The requirement code provided is invalid +| The requirement you are attempting to delete does not exist in the list +| Your problem is your solution! +|=== + +*Tutorial* +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo objects deleted from this tutorial by using the appropriate command. + +1. Ensure that you have the requirement with requirement code "CSF0" in the list. + +2. Type the following into the command box: `requirement delete CSF0`, and hit enter. + +2. The message in the response box should change and you should see that the requirement CSF0 +disappears from the list. +//end::requirement-yijie[] + +==== Requirement Assign + +This command assigns one or more than one module to a requirement. + +[#RequirementAssignQuickReference] +.Requirement Assign Quick Reference +|=== +|Purpose | Assigns module(s) to a requirement +|Syntax| `requirement assign REQUIREMENT_CODE n/MODULE_CODE ...` +|Example | `requirement assign CSF0 n/CS2103T n/CS2101` +|=== + +*How it Works* + +IMPORTANT: The module must already be added in iGrad for this command to work! +Refer to <> to find out how to add a module. + +<> lists the errors you might encounter after issuing this command: + +[#RequirementAssignErrorReference] +.Requirement Assign Error Reference +|=== +|Name |Message| Explanation |Solution + +|Requirement Not Found Error |The requirement code provided is invalid +|The requirement you are attempting to assign to does not exist +|Try changing the requirement code to one that you can find in the list +|Module Not Found Error |The module does not exit in system +|The module you are attempting to assign does not exist +|You need to first add the module! +|Module Already Assigned Error |The module is already assigned under the requirement +|The module has been assigned to the requirement +|Try assigning a different module instead +|=== + +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo changes made from this tutorial by using the appropriate command. + +1. Ensure that you have the requirement "Computer Science Foundation", coded CSF0, in the list. + +2. Type the following into the command box: `requirement assign CSF0 n/CS2103T n/CS2101`, and press enter. + +3. The message in the response box should change and you should see the following updated in the list: + ++ +.Modules successfully assigned to requirement "Computer Science Foundation" +image::../images/user-guide/requirementCommand/requirementAssignSuccess.png[] + +==== Requirement Unassign + +This command unassigns one or more than one module from a requirement. + +[#RequirementUnassignQuickReference] +.Requirement Unassign Quick Reference +|=== +|Purpose | Unassign module(s) from a requirement +|Syntax| `requirement unassign REQUIREMENT_CODE n/MODULE_CODE ...` +|Example | `requirement unassign CSF0 n/CS2103T n/CS2101` +|=== + +*How it Works* + +IMPORTANT: The module must already be assigned to the requirement for this command to work! + +<> lists the errors you might encounter after issuing this command: + +[#RequirementUnassignErrorReference] +.Requirement Unassign Error Reference +|=== +|Name |Message| Explanation |Solution + +|Requirement Not Found Error |The requirement code provided is invalid +|The requirement you are attempting to unassign from does not exist +|Try changing the requirement code to one that you can find in the list +|Module Not Found Error |The module does not exit in system +|The module you are attempting to unassign does not exist +|You can add the module if you want +|=== + +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. +You may undo changes made from this tutorial by using the appropriate command. + +1. Ensure that you have the requirement "Computer Science Foundation", coded CSF0, in the list, with modules CS2103T and CS2101 assigned to it. + +2. Type the following into the command box: `requirement unassign CSF0 n/CS2103T n/CS2101`, and press enter. + +3. The message in the response box should change and you should see the modules disappear from the requirement. + +// tag::module[] + +=== Module +Section by: https://github.com/waynewee[Wayne] + +This section details each command used to manipulate modules. All module commands begin with the identifier +`module` followed by the action e.g. `add`. + +All module commands use the same parameters, listed in the table below: + +[#tableModuleParameters] +.Module Parameters +|=== +|Name| Description | Example | Restrictions + +|`MODULE_CODE` | A module's unique identifier | CS2103T | Must have two letters in the front, four numbers in the middle with an optional letter at the back +|`MODULE_TITLE`| A module's title | Software Engineering |- +|`MODULE_CREDITS`| The number of http://www.nus.edu.sg/registrar/academic-information-policies/graduate/modular-system[modular credits] a module is worth | 4 | Must be a number +|`SEMESTER`| An academic semester. There are two semesters in a year | Y1S1 | Must be in the format Y?S* where ? represents a digit from 0 - 4 and * represents a digit from 1 -2 +|`GRADE` | A module's grade | A+ | Must be one of the following: A+, A, A-, B+, B-, C+, C, D, D+, F, S, U | +|=== + +If, when issuing a command, the parameter restrictions are not strictly adhered to, +you might come across some common errors. +The following errors are generic and may be encountered when dealing with any module command: + +[#tableModuleParametersErrorReference] +.Module Parameters Error Reference +|=== +|Parameter|Error Message + +|`MODULE_CODE`| The Module Code provided for the module is invalid! +|`MODULE_CREDITS`| The Module Credits provided for the module is invalid! +|`SEMESTER`| The Semester provided for the module is invalid! +|`GRADE`| The Grade provided for the module is invalid! +|=== + +These errors can all be resolved by adhering to the restrictions detailed in <> + +[#ModuleAddCommand] +==== Module Add +Section by: https://github.com/waynewee[Wayne] + +This command adds a module to the module list. + +[#ModuleAddQuickReference] +.Module Add Quick Reference +|=== +|Purpose | Adds a module +|Syntax| `module add n/MODULE_CODE t/MODULE_TITLE u/MODULE_CREDITS [s/SEMESTER]` +|Example | `module add n/CS2103T t/Software Engineering u/4 s/Y1S1` +|=== + +*How it Works* + +When you type in this command, we take the given values for the `MODULE_CODE`, `MODULE_TITLE`, `MODULE_CREDITS` and optionally, the `SEMESTER`, +and fill in those fields. We do not check if the given `MODULE_CODE` or `MODULE_TITLE` refer to actual modules offered by NUS. However, the restrictions stated in the module parameters table still apply. + +<> lists errors you might encounter after issuing this command: + +[#ModuleAddErrorReference] +.Module Add Error Reference +|=== +|Name | Message| Explanation| Solution + +|Duplicate Module Error |Sorry, this module already exists in the course book. | The module you are attempting to add already exists in the module list| Delete the existing module in the list and try again| +|=== + + +*Tutorial* + +Follow these steps to get a clearer idea of how this command works +[NOTE] +For this tutorial, actual values will be given instead of placeholders. Undo or Delete objects created from this tutorial by using the appropriate commands + + +1. Check that you do not have the modules with `MODULE_CODE` CS2103T and CS2101 in your list of modules + +2. Type the following into the command box +`module add n/CS2103T u/4 t/Software Engineering` and press enter + +3. Type the following into the command box +`module add n/CS2101 u/4 t/Effective Communication for Computing Professionals` and press enter + +4. The message in the response box should change and you should see the following in the module panel: + ++ +.Modules CS2103T and CS2101 successfully added +image::../images/user-guide\moduleAutoAddCommand\two_modules.png[] + +//tag::wayne-ug[] +[#ModuleAutoAddCommand] +==== Module Auto Add +Section by: https://github.com/waynewee[Wayne] + +This command adds a module to the module list. The module information is taken +from the https://api.nusmods.com/[NUSMods API] and includes the `MODULE_CODE`, `MODULE_TITLE` +and `MODULE_CREDITS`. + +[#ModuleAutoAddQuickReference] +.Module Auto Add Quick Reference +|=== +|Purpose | Adds a module from NUSMods +|Syntax| `module add n/MODULE_CODE_A n/MODULE_CODE_B -a` +|Example | `module add n/CS2103T n/CS2101 -a` +|=== + +*How it Works* + +IMPORTANT: Do not miss out the `-a` flag + +When you type in this command, a request is made to https://api.nusmods.com/[NUSMods API]. More specifically, we visit the +module page and ask for the information provided there. An example page can be found https://api.nusmods.com/2018-2019/modules/CS2103T/[here]. + +[NOTE] +We try to get the module information from the current academic year. However, +this might not always be possible as NUS might not have released +the module details. As a contingency, we retrieve the module information from the +previous academic year. + +In general, using this command speeds up the process of module addition greatly. However, as we have to make +a request to an external webpage, the time taken to process the request might be considerably longer. + +[WARNING] +After issuing the command, the app might seem to freeze. Not to worry! It is merely processing your request. Please be patient when executing this command, especially when attempting to add a large number of modules. + +This command also supports _batch processing_ and you can add multiple modules, with the necessary information all +filled in, by issuing a single command. In the case where adding a single module in a batch of modules raises an error, +we skip that module and let you know what went wrong. [TIP] -A person can have any number of tags (including 0) +You can add up to 10 modules at once! Try this: `module add n/CS1101 n/CS1231 n/CS2030 n/CS2040 n/CS2100 n/CS2103T n/CS2105 n/CS2106 n/CS3230 n/CS3219 -a` + +<> lists the errors you might encounter after issuing this command: + +[#ModuleAutoAddErrorReference] +.Module Auto Add Error Reference +|=== +|Name| Message| Explanation |Solution + +|Duplicate Module Error | Duplicate Detected| Sorry, this module already exists in the course book.| Delete the existing module in the list and try again +|Module Not Found Error| Module Not Found| Sorry, I was unable to find this module. Is your internet down? | Use the command <> instead +|Module Overload Error | Module Overload Error| Please do not attempt to add more then 10 modules. | Divide the list of modules into smaller batches of size less than 10 and try again +|Connection Error| Connection Error| Sorry, I was unable to find this module. Is your internet down? | Whilst all other commands work offline. You need an internet connection to issue this command. Go online before trying again +|=== + +*Tutorial* + +Follow these steps to get a clearer idea of how this command works + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. Undo or Delete objects created from this tutorial by using the appropriate commands + +1. Check that you do not have the modules with `MODULE_CODE` CS2103T and CS2101 in your list of modules + +2. Type the following into the command box +`module add n/CS2103T n/CS2101 -a` and press enter + +3. Wait for up to 5 seconds + +4. The message in the response box should change and you should see the following in the module panel + ++ +.Modules CS2103T and CS2101 successfully added from NUSMods +image::../images/user-guide\moduleAutoAddCommand\two_modules.png[] + +*Additional Information* + +We are also able to retrieve information pertaining to a module's prerequisites and preclusions. However, as our app can function as a module planner +in addition to tracking your graduation requirements, we do not prevent you from adding modules that have unfulfilled prerequisites but instead, simply show a warning. + +WARNING: As the prerequisites and preclusions from NUSMods do not follow any standard formatting, the warning messages shown might not +always be accurate. This is due to a difficulty of interpreting +the data given by NUSMods. This remains a BETA feature and we hope to upgrade it in time. +// end::wayne-ug[] +==== Module Done +Section by: https://github.com/waynewee[Wayne] + +This command marks a module as done by giving it a grade and optionally, a semester. + +.Module Done Quick Reference +|=== +|Purpose | Marks a module as done +|Syntax| `module done MODULE_CODE g/GRADE [s/SEMESTER]` +|Example | `module done CS2103T g/A s/Y1S1` +|=== + +*How it Works* + +When you issue the command, we give your module the grade, and optionally the semester, that you provided. This helps us keep track of both your CAP and the number +of semesters you have left before graduating. + +In order to calculate your CAP, we use a known algorithm which is guaranteed to be accurate. To see what semester you are currently at, we +take the latest semester given to a module which has been marked as done. From that, we are able to tell you how many semesters you have left. + +[NOTE] +We do not currently allow the input of special terms. As a workaround, for modules taken +during special term, you could input the most recent semester instead + +<> lists the errors you might encounter after issuing this command: + +[#ModuleDoneErrorReference] +.Module Done Error Reference +|=== +|Name| Message| Explanation |Solution + +|Module Not Found Error | Sorry, I was unable to find this module. | The module you are attempting to mark as done does not exist in the module list| Add the module you wish to mark as done and try again +|=== + +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. Undo or Delete objects created from this tutorial by using the appropriate commands + +Ensure that you have the module CS2103T in the module list + +1. Type the following into the command box `module done CS2103T g/A s/Y4S1` + +2. The message in the response box should change and you should see the following + ++ +.Modules CS2103T successfully given a grade and a semester +image::../images/user-guide\moduleAutoAddCommand\one_module.png[] + +==== Module Edit +Section by: https://github.com/waynewee[Wayne] + +This command edits the editable fields in a module which include the `MODULE_TITLE`, `MODULE_CREDITS`, `SEMESTER`. +Although it is possible to edit the fields as listed, it is unadvisable unless you made a mistake while keying +in the values. + +.Module Edit Quick Reference +|=== +|Purpose | Edits a module +|Syntax| `module edit MODULE_CODE [t/MODULE_TITLE] [u/MODULE_CREDITS] [s/SEMESTER]` +|Example | `module edit CS2103T t/Hardware Engineering u/8 s/Y1S2` +|=== + +*How it Works* + +When you issue the command, we replace the fields provided with the given values. You are able to +change the values as you wish as long as they follow the restrictions as listed in the parameters table. + +<> lists the errors you might encounter after issuing this command: + +[#ModuleEditErrorReference] +.Module Edit Error Reference +|=== +|Name| Message| Explanation |Solution + +|Module Not Found Error | Sorry, I was unable to find this module | The module you are attempting to edit does not exist in the module list| Instead of editing a module that does not exist, try adding a new one! +|=== + +*Tutorial* + +[NOTE] +For this tutorial, actual values will be given instead of placeholders. Undo or Delete objects created from this tutorial by using the appropriate commands + +Ensure that you have the module CS2103T in the module list + +1. Type the following into the command box `module edit CS2103T t/Hardware Engineering s/Y1S1 u/8` + +2. The message in the response box should change and you should see the following + ++ +.Modules CS2103T successfully given a grade and a semester +image::../images/user-guide\moduleAutoAddCommand\module_edit.png[] + +==== Module Delete +Section by: https://github.com/waynewee[Wayne] + +This command deletes a module from the module list. + +.Delete Quick Reference +|=== +|Purpose | Deletes a module +|Syntax| `module delete MODULE_CODE`https://xxx[] +|Example | `module delete CS2103T` +|=== + +*How it Works* + +The module that you wish to delete is completely removed from the module list. +[WARNING] +Restoring the module is only possible using the `undo` command which would only work if `delete` was the last issued command. + +<> lists the errors you might encounter after issuing this command: + +[#ModuleDeleteErrorReference] +.Module Delete Error Reference +|=== +|Name| Message| Explanation |Solution + +|Module Not Found Error | Sorry, I was unable to find this module| The module you are attempting to delete does not exist in the module list| Your problem is your solution! +|=== + +*Tutorial* +[NOTE] +For this tutorial, actual values will be given instead of placeholders. Undo or Delete objects created from this tutorial by using the appropriate commands + +Ensure that you have the module CS2103T in the module list + +1. Type the following into the command box `module delete CS2103T` + +2. The message in the response box should change and you should see that the module CS2103T disappears from the module list + +[#ModuleFilterCommand] +==== Module Filter +Section by: https://github.com/waynewee[Wayne] + +This command allows you to find your modules by various parameters. You can filter the +complete module list by `SEMESTER`, `MODULE_CREDITS` and `GRADE`. + +.Filter Quick Reference +|=== +|Purpose | Displays a module list filtered based on the given parameters +|Syntax| `module filter [s/SEMESTER] [u/MODULE_CREDITS] [g/GRADE] [-o]` +|Example | `module filter s/Y1S1 u/4 g/A -o` +|=== + +*How it Works* + +Two options are provided for you: + +[Option 1] Displays modules that match all provided parameters + +or + +[Option 2] Displays modules that match at least one of the provided parameters. + +If the flag `-o` is included at the end of the command, Option 2 will be chosen. Otherwise, the default option is Option 1. + +IMPORTANT: In order to display all modules once again, simply type `module filter`. This will display an unfiltered module list containing all modules. + +There are no notable errors to list. If wrong parameters are given, the app will simply +display the unfiltered module list. However, you should always take note of what filters are currently in place. If you +are unable to find some modules after using this command, please reset the display by typing in `module filter`. + +WARNING: If you +are unable to find some modules after using this command, please reset the display by typing in `module filter`. + +*Tutorial* + +Ensure that the following modules are in the module list: +|=== +|Module Code| Credits|Semester| Grade + +|CS2103T|4|Y1S1|A +|CS2101|4|Y1S2|B +|CS2040|6|Y2S1|C +|=== + + .. Retrieving modules which have 4 `CREDITS` + . Type `module filter u/4` into the command box + . The message in the response box should change and you should see the modules CS2103T and CS2101 in the module panel + + .. Retrieving modules which have either `SEMESTER` Y1S2 or `GRADE` C +. Type `module filter s/Y1S1 g/B -o` +. The message in the response box should change and you should see the modules CS2101 and CS2040 in the module panel + + +*Additional Information* + +[NOTE] +This section contains information which requires prior knowledge of discrete mathematics or more specifically, logical operators + +The flag `-o`, is present, sets the logical operator used in concatenating the parameters as _"or"_. The default logical operator used is _"and"_. + +''' + +=== Export +Section by: https://github.com/waynewee[Wayne] + +This command exports your data to a comma-separated values (.csv) file. This file can then be submitted to the relevant +administration for processing of Leave of Absence (LOA), exchange programmes or internship applications. + +.Export Quick Reference +|=== +|Purpose | Exports your data to a .csv file +|Syntax| `export` +|Example | `export` +|=== + +*How it Works* + +We write your data to a .csv file _study_plan.csv_ using the modules you have added and include the fields `MODULE_CODE`, `MODULE_TITLE`, `SEMESTER` and `CREDITS`. + +.Study Plan Example CSV +image::../images/user-guide\exportCommand\export_csv_example.png[] + +NOTE: Modules that have not been tagged with a semester will not be written + +After issuing the command, you will be able to find the file in the same folder as the app's executable. + +NOTE: For example, if the app is stored in your Desktop folder, the file _study_plan.csv_ will be created in the Desktop folder as well + +<> lists the errors you might encounter after issuing this command: + +[#ExportErrorReference] +.Export Error Reference +|=== +|Name| Message| Explanation |Solution + +|Write Error | Unable to write to file| Sorry, I was unable to export data to CSV file. Please ensure that you do not have the file 'study_plan.csv' open | Close the file and try again +|Data Not Found Error |Sorry, I couldn't find any modules that are tagged to a semester! I can only export modules that are tagged with a semester. | You do not have any modules tagged with a semester | Tag at least one module with a semester and try again +|=== + +''' + +=== Exit +Section by: https://github.com/waynewee[Wayne] + +This command assists you in exiting the program. + +.Exit Quick Reference +|=== +|Purpose | Exits the program +|Syntax| `exit` +|Example | `exit` +|=== + +*Additional Information* + +You can also exit the program by clicking the close icon on the top right hand corner of the application's window. + +## Version 2.0 +Section by: https://github.com/waynewee[Wayne] + +This sections details features that would be packaged with the next release + +=== Module Suggester +Section by: https://github.com/waynewee[Wayne] + +Using tried and tested recommendation algorithms such as https://en.wikipedia.org/wiki/Collaborative_filtering[collborative filtering], we would be able to automatically suggest +to you what modules to take next. + +.Suggest Quick Reference +|=== +|Purpose | Suggests modules to take +|Syntax| `suggest NUMBER_OF_MODULES` +|Example | `suggest 4` +|=== + +=== Integration with NUSMods +Section by: https://github.com/waynewee[Wayne] -Examples: +We plan to integrate with popular timetabling application NUSMods so that you can manage all aspects of your academics +in one place. -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` +## FAQs -=== Listing all persons : `list` -Shows a list of all persons in the address book. + -Format: `list` -=== Editing a person : `edit` +_I'm not an NUS student. Can I still use iGrad?_ -Edits an existing person in the address book. + -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]...` +As long as your university follows a similar <>! +However, we will be unable to provide features such as validation from NUSMods. -**** -* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index *must be a positive integer* 1, 2, 3, ... -* At least one of the optional fields must be provided. -* Existing values will be updated to the input values. -* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -* You can remove all the person's tags by typing `t/` without specifying any tags after it. -**** +_Do I require an online connection to use iGrad?_ -Examples: +Nope! iGrad may be used offline. However, our validation feature which utilises NUSMods would be unavailable, +and you'll have to key in your module details manually. -* `edit 1 p/91234567 e/johndoe@example.com` + -Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. -* `edit 2 n/Betsy Crower t/` + -Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. +_Where can I get the icons for the avatars?_ -=== Locating persons by name: `find` +The avatar icons were obtained from https://www.freepik.com/free-vector/hand-drawn-kawaii-characters-collection_4098554.htm#page=1&query=cute%20animals&position=2[Freepik]. +All credits go to the original creator. -Finds persons whose names contain any of the given keywords. + -Format: `find KEYWORD [MORE_KEYWORDS]` +//tag::cheatsheet[] +== Cheat Sheet -**** -* The search is case insensitive. e.g `hans` will match `Hans` -* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. -* Only full words will be matched e.g. `Han` will not match `Hans` -* Persons matching at least one keyword will be returned (i.e. `OR` search). e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` -**** +Section by: https://github.com/dargohzy[Daryl] -Examples: +This segment contains a consolidated view of all the commands utilised in `iGrad`. Commands are split into the following +categories: -* `find John` + -Returns `john` and `John Doe` -* `find Betsy Tim John` + -Returns any person having names `Betsy`, `Tim`, or `John` +* Essential Commands +* Course Commands +* Requirement Commands +* Module Commands -// tag::delete[] -=== Deleting a person : `delete` -Deletes the specified person from the address book. + -Format: `delete INDEX` +=== Essential Commands +.Essential Commands +|=== +|Description | Command -**** -* Deletes the person at the specified `INDEX`. -* The index refers to the index number shown in the displayed person list. -* The index *must be a positive integer* 1, 2, 3, ... -**** +|Open the help window | `help` +|Undo last command | `undo` +|Export data | `export` +|Exit the application | `exit` +|=== -Examples: +=== Course Commands +.Course Commands +|=== +|Description | Command -* `list` + -`delete 2` + -Deletes the 2nd person in the address book. -* `find Betsy` + -`delete 1` + -Deletes the 1st person in the results of the `find` command. +|Add a `Course` | `course set n/COURSE_NAME s/TOTAL_SEMESTERS` +|Edit the `Course`| `course edit n/COURSE_NAME s/TOTAL_SEMESTERS` +|Delete the `Course` | `course delete` +|Find out `CAP` required per semester for desired `CAP` | `course achieve c/DESIRED_CAP s/SEMESTERS_LEFT` -// end::delete[] -=== Clearing all entries : `clear` +|=== -Clears all entries from the address book. + -Format: `clear` +=== Requirement Commands +.Requirement Commands +|=== +|Description | Command -=== Exiting the program : `exit` +|Add a `Requirement` | `requirement add t/REQUIREMENT_TITLE u/MCS_REQUIRED` +|Edit a `Requirement` | `requirement edit REQUIREMENT_CODE u/MCS_REQUIRED` +|Delete a `Requirement` | `requirement delete REQUIREMENT_CODE` +|Assigns the `Module`(s) under the requirement. |`requirement assign REQUIREMENT_CODE [n/MODULE_CODE...]` -Exits the program. + -Format: `exit` +|=== -=== Saving the data +=== Module Commands +.Module Commands +|=== +|Description | Command -Address book data are saved in the hard disk automatically after any command that changes the data. + -There is no need to save manually. +| Add a `Module` | `module add n/MODULE_CODE t/MODULE_TITLE u/MCs [n/DESCRIPTION] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES]` +| Edit a `Module`| `module edit MODULE_CODE [n/MODULE_CODE] [t/MODULE_TITLE] [u/MCs] [s/SEMESTER] [g/GRADE]` +| Delete a `Module` | `module delete MODULE_CODE` +| Mark a `Module` as done. Counts the modular credits towards academic progress. | `module done MODULE_CODE [g/GRADE] [s/SEMESTER]` -// tag::dataencryption[] -=== Encrypting data files `[coming in v2.0]` +//end::cheatsheet[] -_{explain how the user can enable/disable data encryption}_ -// end::dataencryption[] +|=== -== FAQ +## Glossary -*Q*: How do I transfer my data to another Computer? + -*A*: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder. +|=== +|Terms |Definition -== Command Summary +|Course |A course is the entire programme of studies required to complete a university degree +|Graduation requirement |Requirements specified by the university in order for a student to graduate +|Module |Each module of study has a unique module code consisting of a two- or three-letter prefix that generally denotes the discipline, and four digits, the first of which indicates the level of the module +|Cumulative Average Point (CAP) |The Cumulative Average Point (CAP) is the weighted average grade point of the letter grades of all the modules taken by the students. +|Semester |A semester is a part of the academic year. Each semester typically lasts 13 weeks in NUS. +|Modular Credits (MCs) |A modular credit (MC) is a unit of the effort, stated in terms of time, expected of a typical student in managing his/her workload. +|NUSMods |A timetabling application built for NUS students, by NUS students. Much like this iGrad! -* *Add* `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]...` + -e.g. `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague` -* *Clear* : `clear` -* *Delete* : `delete INDEX` + -e.g. `delete 3` -* *Edit* : `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]...` + -e.g. `edit 2 n/James Lee e/jameslee@example.com` -* *Find* : `find KEYWORD [MORE_KEYWORDS]` + -e.g. `find James Jake` -* *List* : `list` -* *Help* : `help` +|=== diff --git a/docs/UsingAppVeyor.adoc b/docs/UsingAppVeyor.adoc index 12a7a89ac68..043200c3b90 100644 --- a/docs/UsingAppVeyor.adoc +++ b/docs/UsingAppVeyor.adoc @@ -91,4 +91,4 @@ The asciidoc code should look similar to: https://ci.appveyor.com/project/damithc/addressbook-level3[image:https://ci.appveyor.com/api/projects/status/3boko2x2vr5cc3w2?svg=true[Build status]] ---- + -Copy and paste the asciidoc code to your `README.adoc` file. +Copy and paste the asciidoc code to your `README.md` file. diff --git a/docs/backup.adoc b/docs/backup.adoc new file mode 100644 index 00000000000..59c70384a9b --- /dev/null +++ b/docs/backup.adoc @@ -0,0 +1,144 @@ +Section by: https://github.com/waynewee[Wayne] & https://github.com/yjskrs[Yijie] + +This segment contains a list of commands with examples that you can use to make full use of iGrad. + +Take note of the following when using our commands: + +WARNING: Commands with fields wrapped within square brackets (i.e. []) require at least one of these fields to be specified +when using the command. +This means that you need just specify one of these fields while others may be optional based on your usage. + + +==== help + +Displays a help message to the user. Lists all possible commands +and provides a link to the user guide online. + +Command Format + +---- +help +---- + +Expected Outcome +[NOTE] +A popup for the list of all commands as well as the link to the user guide is shown. +`INSERT POPUP PHOTO` + +''' + +==== course + +Add, edit or delete your course. Find out how much CAP you need to maintain +each semester to achieve your desired CAP. + +Command Format + +---- +course add n/COURSE_NAME + +course edit [n/COURSE_NAME] [u/MCs] + +course delete n/COURSE_NAME + +course achieve c/DESIRED_CAP s/SEMESTERS_LEFT +---- + +Command Sample + +Creating a course named "Computer Science" +---- +course add n/Computer Science +---- + + +Renaming your current course to "Information Systems" +---- +course edit n/Information Systems +---- + +Removing your current course +---- +course delete +---- + +Calculating the average grade needed to achieve a CAP of 4.50 with +2 semesters left +---- +course achieve c/4.50 s/2 +---- + +Constraints +[WARNING] +==== +1. `(all)`: You can only have at most one course at any one time +2. `course delete`: Removing a course deletes all data from the system (including modules, requirements, etc) +==== + +Expected Outcome +[NOTE] +You should be able to see the added and/or modified course name in the +top panel. For delete course, all data would be reset + +''' + +==== requirement + +Add, edit or delete a graduation requirement. + +Command Format + +---- +requirement add n/REQUIREMENT_TITLE u/MCS_REQUIRED + +requirement edit REQUIREMENT_CODE [n/NEW_REQUIREMENT_TITLE] [u/NEW_MCS_REQUIRED] + +requirement delete REQUIREMENT_CODE + +requirement assign REQUIREMENT_CODE [n/MODULE_CODE ...] +---- + +Command Sample + +Adding a requirement named "Unrestricted Electives" which requires 32 MCs. +---- +requirement add n/Unrestricted Electives u/32 +---- + +Renaming requirement "Unrestricted Electives" to "Maths and Sciences", and changing the number of MCs required to 20. + +---- +requirement edit Unrestricted Electives n/Maths and Sciences u/32 +---- + +Renaming requirement "Unrestricted Electives" to "Maths and Sciences". +---- +requirement edit Unrestricted Electives n/Maths and Sciences +---- + +Changing number of required MCs for requirement "Unrestricted Electives" to 20. +---- +requirement edit Unrestricted Electives u/20 +---- + +Removing requirement named "Unrestricted Electives". +---- +requirement delete Unrestricted Electives +---- + +Assigning modules to requirement. +---- +requirement assign UE0 n/CS1101S n/CS1231S n/CS2030S n/CS2040S +---- + +Constraints +[WARNING] +==== +1. None. +==== + +Expected Outcome +[NOTE] +You should be able to see the requirement created and/or edited in the main panel. + +''' diff --git a/docs/diagrams/ArchitectureDiagram.puml b/docs/diagrams/ArchitectureDiagram.puml index d021b3992ed..c6c3e12be89 100644 --- a/docs/diagrams/ArchitectureDiagram.puml +++ b/docs/diagrams/ArchitectureDiagram.puml @@ -9,8 +9,10 @@ Package " "<>{ Class Logic LOGIC_COLOR Class Storage STORAGE_COLOR Class Model MODEL_COLOR + Class Services SERVICES_COLOR Class Main MODEL_COLOR_T1 Class Commons LOGIC_COLOR_T2 + Class Services SERVICES_COLOR_T1 Class "Log Center" as Logs UI_COLOR_T2 Class Hidden #FFFFFF Class HiddenUI #FFFFFF @@ -29,6 +31,7 @@ Main -left-> HiddenModel UI -> Logic UI -right-> Model Logic -> Storage +Logic -down-> Services Logic -down-> Model Logs -right- Commons diff --git a/docs/diagrams/ArchitectureSequenceDiagram.puml b/docs/diagrams/ArchitectureSequenceDiagram.puml index d1e2ae93675..34305e2c287 100644 --- a/docs/diagrams/ArchitectureSequenceDiagram.puml +++ b/docs/diagrams/ArchitectureSequenceDiagram.puml @@ -7,19 +7,19 @@ Participant ":Logic" as logic LOGIC_COLOR Participant ":Model" as model MODEL_COLOR Participant ":Storage" as storage STORAGE_COLOR -user -[USER_COLOR]> ui : "delete 1" +user -[USER_COLOR]> ui : "module delete CS1010" activate ui UI_COLOR -ui -[UI_COLOR]> logic : execute("delete 1") +ui -[UI_COLOR]> logic : execute("module delete CS1010") activate logic LOGIC_COLOR -logic -[LOGIC_COLOR]> model : deletePerson(p) +logic -[LOGIC_COLOR]> model : deleteModule(p) activate model MODEL_COLOR model -[MODEL_COLOR]-> logic deactivate model -logic -[LOGIC_COLOR]> storage : saveAddressBook(addressBook) +logic -[LOGIC_COLOR]> storage : saveCourseBook(courseBook) activate storage STORAGE_COLOR storage -[STORAGE_COLOR]> storage : Save to file diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml index 7790472da52..539de4ccaef 100644 --- a/docs/diagrams/BetterModelClassDiagram.puml +++ b/docs/diagrams/BetterModelClassDiagram.puml @@ -4,8 +4,8 @@ skinparam arrowThickness 1.1 skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR -AddressBook *-right-> "1" UniquePersonList -AddressBook *-right-> "1" UniqueTagList +CourseBook *-right-> "1" UniquePersonList +CourseBook *-right-> "1" UniqueTagList UniqueTagList -[hidden]down- UniquePersonList UniqueTagList -[hidden]down- UniquePersonList diff --git a/docs/diagrams/CommandReceivedSetCommand.puml b/docs/diagrams/CommandReceivedSetCommand.puml new file mode 100644 index 00000000000..de7a07eac94 --- /dev/null +++ b/docs/diagrams/CommandReceivedSetCommand.puml @@ -0,0 +1,25 @@ +@startuml +!include style.puml +autoactivate on + +box UI UI_COLOR_T1 +participant ":MainWindow" as MainWindow UI_COLOR +participant ":CommandReceivedPanel" as CommandReceivedPanel UI_COLOR +end box + +[-> MainWindow : executeCommand("course delete") +activate MainWindow + +MainWindow -> MainWindow : refreshCommandReceived("course delete") + +MainWindow -> CommandReceivedPanel : setCommandReceived("course delete") +activate CommandReceivedPanel + +return +deactivate +deactivate + +[<-- MainWindow +deactivate MainWindow +@enduml + diff --git a/docs/diagrams/ComputeCapSequenceDiagram.puml b/docs/diagrams/ComputeCapSequenceDiagram.puml new file mode 100644 index 00000000000..e666b406f2a --- /dev/null +++ b/docs/diagrams/ComputeCapSequenceDiagram.puml @@ -0,0 +1,34 @@ +@startuml +!include style.puml +autoactivate on + +box MODEL MODEL_COLOR_T1 +participant "<>\n:CourseInfo" as CourseInfo MODEL_COLOR +participant ":Requirement" as Requirement MODEL_COLOR +participant ":Module" as Module MODEL_COLOR +participant ":Grade" as Grade MODEL_COLOR +end box + +[-> CourseInfo : computeCap(moduleList, reqList) +activate CourseInfo + +loop for each module in moduleList + loop for each req in reqList + CourseInfo -> Requirement: hasModule(module) + return returns true if module belongs to req + end + + opt if module belongs to any req in reqList + CourseInfo -> Module: getGrade() + return grade of module + opt if grade is not SU grade + CourseInfo->Grade: getGradeCredits() + return grade credits + end + end +end + +[<-- CourseInfo : return newly updated and computed cap +deactivate CourseInfo +@enduml + diff --git a/docs/diagrams/ComputeCreditsSequenceDiagram.puml b/docs/diagrams/ComputeCreditsSequenceDiagram.puml new file mode 100644 index 00000000000..d51999e50f6 --- /dev/null +++ b/docs/diagrams/ComputeCreditsSequenceDiagram.puml @@ -0,0 +1,26 @@ +@startuml +!include style.puml +autoactivate on + +box MODEL MODEL_COLOR_T1 +participant "<>\n:CourseInfo" as CourseInfo MODEL_COLOR +participant ":Requirement" as Requirement MODEL_COLOR +end box + +[-> CourseInfo : computeCredits(reqList) +activate CourseInfo + +loop for each req in reqList +CourseInfo -> Requirement: getCreditsFulfilled() +return credits fulfilled +end + +loop for each req in reqList +CourseInfo -> Requirement: getCreditsRequired() +return credits required +end + +[<-- CourseInfo : return total updated credits required and fulfilled +deactivate CourseInfo +@enduml + diff --git a/docs/diagrams/CourseAchieveActivityDiagram.puml b/docs/diagrams/CourseAchieveActivityDiagram.puml new file mode 100644 index 00000000000..2729776554a --- /dev/null +++ b/docs/diagrams/CourseAchieveActivityDiagram.puml @@ -0,0 +1,19 @@ +@startuml +start +:User executes command; + +if (has valid desired Cap) then (no) + :Show Cap constraints; +else (yes) + :Compute estimated Cap; + if(computed Cap is Valid) then (no) + :Throw capOverflowException; + else (yes) + :create new computed Cap; + endif +endif + +:Result displayed; +stop +@enduml + diff --git a/docs/diagrams/CourseAchieveSequenceDiagram.puml b/docs/diagrams/CourseAchieveSequenceDiagram.puml new file mode 100644 index 00000000000..5b47caca269 --- /dev/null +++ b/docs/diagrams/CourseAchieveSequenceDiagram.puml @@ -0,0 +1,69 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant ":CourseAchieve\nCommandParser" as CourseAchieveCommandParser LOGIC_COLOR +participant "c:CourseAchieve\nCommand" as CourseAchieveCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":CourseInfo" as CourseInfo MODEL_COLOR +end box + +[-> LogicManager : execute(\ncourse achieve) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(\ncourse achieve) +activate CourseBookParser + +create CourseAchieveCommandParser +CourseBookParser -> CourseAchieveCommandParser : new CourseAchieveCommandParser(\nCap) +activate CourseAchieveCommandParser + +create CourseAchieveCommand +CourseAchieveCommandParser -> CourseAchieveCommand : new CourseAchieveCommand(\nCap) +activate CourseAchieveCommand + +CourseAchieveCommand --> CourseAchieveCommandParser +deactivate CourseAchieveCommand + +CourseAchieveCommandParser --> CourseBookParser : c +deactivate CourseAchieveCommandParser +destroy CourseAchieveCommandParser + +CourseBookParser --> LogicManager : c +deactivate CourseBookParser + +LogicManager -> CourseAchieveCommand : execute() +activate CourseAchieveCommand + +CourseAchieveCommand -> Model : getCourseInfo() +activate Model + +Model --> CourseAchieveCommand +deactivate Model + +CourseAchieveCommand --> CourseInfo : computeEstimatedCap(Course info, Cap) +activate CourseInfo + +CourseInfo --> CourseAchieveCommand +deactivate CourseInfo + +create CommandResult +CourseAchieveCommand --> CommandResult +activate CommandResult +CommandResult --> CourseAchieveCommand +deactivate CommandResult + +CourseAchieveCommand --> LogicManager : result +deactivate CourseAchieveCommand +CourseAchieveCommand -[hidden]-> LogicManager : result +destroy CourseAchieveCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/CourseAchieveSequenceDiagram2.puml b/docs/diagrams/CourseAchieveSequenceDiagram2.puml new file mode 100644 index 00000000000..6ab3be62314 --- /dev/null +++ b/docs/diagrams/CourseAchieveSequenceDiagram2.puml @@ -0,0 +1,53 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant "r:CourseAchieveCommand" as CourseAchieveCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":CourseBook" as CourseBook MODEL_COLOR +participant ":CourseInfo" as CourseInfo MODEL_COLOR +end box + +[-> CourseAchieveCommand : execute() +activate CourseAchieveCommand + +CourseAchieveCommand -> Model : getCourseInfo() +activate Model + +Model -> CourseBook : getCourseInfo() +activate CourseBook + +CourseBook --> Model +deactivate CourseBook + +Model --> CourseAchieveCommand +deactivate Model + +CourseAchieveCommand --> CourseInfo : computeEstimatedCap(Course info, Cap) +activate CourseInfo + +CourseInfo --> CourseInfo : getSemesters() +activate CourseInfo +CourseInfo --> CourseInfo : Semesters +deactivate CourseInfo +CourseInfo --> CourseInfo : getCap() +activate CourseInfo +CourseInfo --> CourseInfo : Cap +deactivate CourseInfo + +CourseInfo --> CourseAchieveCommand +deactivate CourseInfo + +create CommandResult +CourseAchieveCommand --> CommandResult +activate CommandResult +CommandResult --> CourseAchieveCommand +deactivate CommandResult + +[<--CourseAchieveCommand : result +deactivate CourseAchieveCommand +@enduml diff --git a/docs/diagrams/CourseCreditsClassDiagram.puml b/docs/diagrams/CourseCreditsClassDiagram.puml new file mode 100644 index 00000000000..b32ebb0857f --- /dev/null +++ b/docs/diagrams/CourseCreditsClassDiagram.puml @@ -0,0 +1,16 @@ +@startuml +hide circle +class Credits { + -creditsRequired: int + -creditsFulfilled: int + +Credits(creditsRequired: int, creditsFulfilled: int) + +isValidCreditsRequired(): boolean + +isValidCreditsFulfilled(): boolean + +getValidCreditsRequired(): boolean + +getValidCreditsFulfilled(): boolean + +toString(): String + +equals(): boolean + +hashcode(): int +} +@enduml + diff --git a/docs/diagrams/CourseEditSequenceDiagram.puml b/docs/diagrams/CourseEditSequenceDiagram.puml new file mode 100644 index 00000000000..de25923da95 --- /dev/null +++ b/docs/diagrams/CourseEditSequenceDiagram.puml @@ -0,0 +1,68 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant ":CourseEdit\nCommandParser" as CourseEditCommandParser LOGIC_COLOR +participant "n:CourseEdit\nCommand" as CourseEditCommand LOGIC_COLOR +participant ":CommandResult" as CommandResult LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":CourseBook" as CourseBook MODEL_COLOR +end box + +[-> LogicManager : execute(\ncourse edit) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(\ncourse edit) +activate CourseBookParser + +create CourseEditCommandParser +CourseBookParser -> CourseEditCommandParser : new CourseEditCommandParser(\nname, semesters) +activate CourseEditCommandParser + +create CourseEditCommand +CourseEditCommandParser -> CourseEditCommand : new CourseEditCommand(\nname, semesters) +activate CourseEditCommand + +CourseEditCommand --> CourseEditCommandParser +deactivate CourseEditCommand + +CourseEditCommandParser --> CourseBookParser : n +deactivate CourseEditCommandParser + +CourseBookParser --> LogicManager : n +deactivate CourseBookParser + +LogicManager -> CourseEditCommand : execute() +activate CourseEditCommand + +CourseEditCommand -> Model : setCourseInfo() +activate Model + +Model -> CourseBook : setCourseInfo() +activate CourseBook + +CourseBook --> Model +deactivate CourseBook + +Model --> CourseEditCommand +deactivate Model + +create CommandResult +CourseEditCommand --> CommandResult +activate CommandResult +CommandResult --> CourseEditCommand +deactivate CommandResult + +CourseEditCommand --> LogicManager : result +deactivate CourseEditCommand +CourseEditCommand -[hidden]-> LogicManager : result +destroy CourseEditCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/CourseInfoClassDiagram.puml b/docs/diagrams/CourseInfoClassDiagram.puml new file mode 100644 index 00000000000..b4e100ddab2 --- /dev/null +++ b/docs/diagrams/CourseInfoClassDiagram.puml @@ -0,0 +1,24 @@ +@startuml +hide circle +class CourseInfo { + +getName(): Name + +getCap(): Cap + +getCredits(): Credits + +getSemesters(): Semesters + +{static} computeCredits(requirements: Requirement[]): Credits + +{static} computeCap(modules: Module[], requirements: Requirement[]): Cap + +{static} computeSemesters(semesters: Semesters, modules: Module[]): Semesters + +equals(): boolean + +hashCode(): int + +toString(): String +} +class Name {} + +CourseInfo o--> "1" Name +CourseInfo o--> "1" Cap +CourseInfo o--> "1" Credits +CourseInfo o--> "1" Semesters +CourseInfo ..> "*" Requirement +CourseInfo ..> "*" Module + +@enduml diff --git a/docs/diagrams/CourseSemestersClassDiagram.puml b/docs/diagrams/CourseSemestersClassDiagram.puml new file mode 100644 index 00000000000..885050c3850 --- /dev/null +++ b/docs/diagrams/CourseSemestersClassDiagram.puml @@ -0,0 +1,16 @@ +@startuml +hide circle +class Semesters { + +totalSemesters: int + +remainingSemesters: int + +isValidSemesters() + +isValidTotalSemesters() + +isValidRemainingSemesters() + +getTotalSemesters() + +getRemainingSemesters() + +toString() + +equals() + +hashcode() +} +@enduml + diff --git a/docs/diagrams/DeleteSequenceDiagram.puml b/docs/diagrams/DeleteSequenceDiagram.puml index 1dc2311b245..56fb0e08cf1 100644 --- a/docs/diagrams/DeleteSequenceDiagram.puml +++ b/docs/diagrams/DeleteSequenceDiagram.puml @@ -3,7 +3,7 @@ box Logic LOGIC_COLOR_T1 participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR participant ":DeleteCommandParser" as DeleteCommandParser LOGIC_COLOR participant "d:DeleteCommand" as DeleteCommand LOGIC_COLOR participant ":CommandResult" as CommandResult LOGIC_COLOR @@ -16,17 +16,17 @@ end box [-> LogicManager : execute("delete 1") activate LogicManager -LogicManager -> AddressBookParser : parseCommand("delete 1") -activate AddressBookParser +LogicManager -> CourseBookParser : parseCommand("delete 1") +activate CourseBookParser create DeleteCommandParser -AddressBookParser -> DeleteCommandParser +CourseBookParser -> DeleteCommandParser activate DeleteCommandParser -DeleteCommandParser --> AddressBookParser +DeleteCommandParser --> CourseBookParser deactivate DeleteCommandParser -AddressBookParser -> DeleteCommandParser : parse("1") +CourseBookParser -> DeleteCommandParser : parse("1") activate DeleteCommandParser create DeleteCommand @@ -36,14 +36,14 @@ activate DeleteCommand DeleteCommand --> DeleteCommandParser : d deactivate DeleteCommand -DeleteCommandParser --> AddressBookParser : d +DeleteCommandParser --> CourseBookParser : d deactivate DeleteCommandParser 'Hidden arrow to position the destroy marker below the end of the activation bar. -DeleteCommandParser -[hidden]-> AddressBookParser +DeleteCommandParser -[hidden]-> CourseBookParser destroy DeleteCommandParser -AddressBookParser --> LogicManager : d -deactivate AddressBookParser +CourseBookParser --> LogicManager : d +deactivate CourseBookParser LogicManager -> DeleteCommand : execute() activate DeleteCommand diff --git a/docs/diagrams/ExportCommand/ExportSequenceDiagram.puml b/docs/diagrams/ExportCommand/ExportSequenceDiagram.puml new file mode 100644 index 00000000000..312d4d7b3b8 --- /dev/null +++ b/docs/diagrams/ExportCommand/ExportSequenceDiagram.puml @@ -0,0 +1,55 @@ +@startuml +!include ../style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant "e:ExportCommand" as ExportCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +box CsvWriter CSV_WRITER_COLOR_T1 +participant ":CsvWriter" as CsvWriter CSV_WRITER_COLOR +end box + +[-> LogicManager : execute(export) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(export) +activate CourseBookParser + +create ExportCommand +CourseBookParser -> ExportCommand +activate ExportCommand + +ExportCommand --> CourseBookParser + +CourseBookParser --> LogicManager : u +deactivate CourseBookParser + +LogicManager -> ExportCommand : execute() +activate ExportCommand + +ExportCommand -> Model : exportModuleList() +activate Model + +Model -> CsvWriter: write() +activate CsvWriter + +CsvWriter--> Model : +deactivate CsvWriter + +Model --> ExportCommand +deactivate Model + +ExportCommand --> LogicManager : result +deactivate ExportCommand +ExportCommand -[hidden]-> LogicManager : result +destroy ExportCommand + +<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ExportCommand/ExportStateDiagram.puml b/docs/diagrams/ExportCommand/ExportStateDiagram.puml new file mode 100644 index 00000000000..5361dcd7228 --- /dev/null +++ b/docs/diagrams/ExportCommand/ExportStateDiagram.puml @@ -0,0 +1,12 @@ +@startuml +hide empty description + +EmptyState : Initial state of the root directory +EmptyState : Does not contain the file study_plan.csv + +EmptyState -> NonEmptyState: export() +NonEmptyState: Contains study_plan.csv with latest module data + +NonEmptyState -> EmptyState: manual deletion +NonEmptyState -> NonEmptyState: export() +@enduml diff --git a/docs/diagrams/LogicClassDiagram.puml b/docs/diagrams/LogicClassDiagram.puml index 016ef33e2e2..5df23198c2d 100644 --- a/docs/diagrams/LogicClassDiagram.puml +++ b/docs/diagrams/LogicClassDiagram.puml @@ -8,7 +8,7 @@ package Logic { package Parser { Interface Parser <> -Class AddressBookParser +Class CourseBookParser Class XYZCommandParser Class CliSyntax Class ParserUtil @@ -35,8 +35,8 @@ Class HiddenOutside #FFFFFF HiddenOutside ..> Logic LogicManager .up.|> Logic -LogicManager -->"1" AddressBookParser -AddressBookParser .left.> XYZCommandParser: creates > +LogicManager -->"1" CourseBookParser +CourseBookParser .left.> XYZCommandParser: creates > XYZCommandParser ..> XYZCommand : creates > XYZCommandParser ..|> Parser @@ -53,7 +53,7 @@ LogicManager .left.> Command : executes > LogicManager --> Model Command .right.> Model -note right of XYZCommand: XYZCommand = AddCommand, \nFindCommand, etc +note right of XYZCommand: XYZCommand = CourseAddCommand, \nExportCommand, etc Logic ..> CommandResult LogicManager .down.> CommandResult diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml index e85a00d4107..c11a56fe42f 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -5,52 +5,74 @@ skinparam arrowColor MODEL_COLOR skinparam classBackgroundColor MODEL_COLOR Package Model <>{ -Interface ReadOnlyAddressBook <> +Interface ReadOnlyCourseBook <> Interface Model <> Interface ObservableList <> -Class AddressBook -Class ReadOnlyAddressBook +Class CourseBook +Class ReadOnlyCourseBook Class Model Class ModelManager Class UserPrefs Class ReadOnlyUserPrefs +Class CourseInfo +Class "Name" as n2 -Package Person { -Class Person -Class Address -Class Email -Class Name -Class Phone -Class UniquePersonList +Package Requirement { +Class Requirement +Class "Name" as n1 +Class "Credits" as c1 +Class UniqueRequirementList } -Package Tag { -Class Tag -} +Package Module { +Class Module +Class "Credits" as c2 +Class Grade +Class ModuleCode +Class Semester +Class Title +Class UniqueModuleList } + Class HiddenOutside #FFFFFF HiddenOutside ..> Model -AddressBook .up.|> ReadOnlyAddressBook +CourseBook .up.|> ReadOnlyCourseBook ModelManager .up.|> Model Model .right.> ObservableList -ModelManager o--> "1" AddressBook +ModelManager o-down-> "1" CourseBook ModelManager o-left-> "1" UserPrefs UserPrefs .up.|> ReadOnlyUserPrefs -AddressBook *--> "1" UniquePersonList -UniquePersonList o--> "*" Person -Person *--> Name -Person *--> Phone -Person *--> Email -Person *--> Address -Person *--> "*" Tag +CourseBook ---> "1" UniqueRequirementList +CourseBook ---> "1" UniqueModuleList +CourseBook ---> "1" CourseInfo + +UniqueRequirementList o--> "*" Requirement +Requirement *--> "1" n1 +Requirement *--> "1" c1 +Requirement *--> "1" UniqueModuleList + +UniqueModuleList o--> "*" Module +Module *--> "1" Title +Module *--> "1" ModuleCode +Module *--> "1" c2 +Module o--> "1" Semester +Module o--> "1" Grade + +CourseInfo o--> "1" n2 +CourseInfo o--> "1" Cap +CourseInfo o--> "1" Credits +CourseInfo o--> "1" Semesters + + +Title -[hidden]right-> ModuleCode +ModuleCode -[hidden]right-> c2 +Semester -[hidden]right-> Grade -Name -[hidden]right-> Phone -Phone -[hidden]right-> Address -Address -[hidden]right-> Email -ModelManager -->"1" Person : filtered list +ModelManager -->"1" Module : filtered list +ModelManager -->"1" Requirement : filtered list @enduml diff --git a/docs/diagrams/Module/ModuleClassDiagram.puml b/docs/diagrams/Module/ModuleClassDiagram.puml new file mode 100644 index 00000000000..2512eebdb27 --- /dev/null +++ b/docs/diagrams/Module/ModuleClassDiagram.puml @@ -0,0 +1,58 @@ +@startuml +hide circle + +class Module { + +isDone() + +hasModuleCodeOf() +} +class Title { + +value: String + +isValidTitle() +} +class ModuleCode { + +value: String + +isValidModuleCode() +} +class Credits { + -creditsRequired: int + -creditsFulfilled: int + +isValidCredits() + +isValidCreditsFulfilled() + +isValidCreditsRequired() +} + +class Semester { + +value: String + +isValidSemester() +} + +class Grade { + -SU_GRADE_CAP_MAP: HashMap> + -GRADE_CAP_MAP: Map> + +isValidGrade() + +isSuGrade() +} + +class ModulePrerequisites {} + +class ModulePreclusions {} + +class ModulePrerequisitesOrPreclusions { + #moduleCodes: List + +isEmpty() +} + +Module *-- "1" Title +Module *-- "1" ModuleCode +Module *-- "1" Credits + +Module o-- "1" Semester +Module o-- "1" Grade + +ModulePrerequisitesOrPreclusions <|--- ModulePrerequisites +ModulePrerequisitesOrPreclusions <|--- ModulePreclusions + +Module *-- "1" ModulePrerequisites +Module *-- "1" ModulePreclusions + +@enduml diff --git a/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoBatchActivityDiagram.puml b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoBatchActivityDiagram.puml new file mode 100644 index 00000000000..5616272e3fc --- /dev/null +++ b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoBatchActivityDiagram.puml @@ -0,0 +1,31 @@ +@startuml +start +:User executes command\nwith multiple module codes; + +'Since the beta syntax does not support placing the condition outside the +'diamond we place it as the true branch instead. +repeat + :Makes a get request to NUSMods for current academic year; +repeat while () is (more modules to add) +->; + +:Stores all modules in a list; + +fork + :Filters out duplicate modules; +fork again + :Begin generating response message to user based on module list; + repeat + if(is duplicate?) then (no) + if(has prerequisite/ does not have preclusion?) then (no) + :add prerequisite/ preclusion warning; + endif + else () + :add duplicate error to message; + endif + repeat while () is (more modules to parse)->; +endfork + +:Creates mulitple modules with response message; +stop +@enduml diff --git a/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoSequenceDiagram.puml b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoSequenceDiagram.puml new file mode 100644 index 00000000000..d838ac15ff4 --- /dev/null +++ b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoSequenceDiagram.puml @@ -0,0 +1,97 @@ +@startuml +!include ../style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant "a:ModuleAddAutoCommand" as ModuleAddAutoCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":Coursebook" as Coursebook MODEL_COLOR +participant ":AddAutoCommandParser" as AddAutoCommandParser MODEL_COLOR +participant ":Module" as Module MODEL_COLOR +end box + +box Services SERVICES_COLOR_T1 +participant ":NusModsRequester" as NusModsRequester SERVICES_COLOR +participant ":GetRequestManager" as GetRequestManager SERVICES_COLOR +participant ":JsonParsedModule" as JsonParsedModule SERVICES_COLOR +end box + +[-> LogicManager : execute(auto add) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(auto add) +activate CourseBookParser + +CourseBookParser -> AddAutoCommandParser:parse() + +activate AddAutoCommandParser + +AddAutoCommandParser -> NusModsRequester:getModule() + +activate NusModsRequester + +NusModsRequester -> GetRequestManager + +activate GetRequestManager + +GetRequestManager -> GetRequestManager: makeRequest() + +GetRequestManager --> NusModsRequester + +deactivate GetRequestManager + +NusModsRequester -> JsonParsedModule:initJsonParsedModule + +activate JsonParsedModule + +JsonParsedModule --> NusModsRequester: + +deactivate JsonParsedModule + +deactivate GetRequestManager +NusModsRequester --> AddAutoCommandParser: jsonParsedModule + +deactivate NusModsRequester + +AddAutoCommandParser -> Module + +activate Module + +Module --> AddAutoCommandParser + +deactivate Module + +AddAutoCommandParser --> CourseBookParser: addAutoCommand(module) + +deactivate AddAutoCommandParser + +CourseBookParser --> LogicManager : commandResult +deactivate CourseBookParser + +LogicManager -> ModuleAddAutoCommand : execute() +activate ModuleAddAutoCommand + +ModuleAddAutoCommand -> Model : addModule() +activate Model + +Model -> Coursebook : addModule() +activate Coursebook + +Coursebook --> Model : +deactivate Coursebook + +Model --> ModuleAddAutoCommand +deactivate Model + +ModuleAddAutoCommand --> LogicManager : result +deactivate ModuleAddAutoCommand +ModuleAddAutoCommand -[hidden]-> LogicManager : result +destroy ModuleAddAutoCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoUseCaseDiagram.puml b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoUseCaseDiagram.puml new file mode 100644 index 00000000000..d04e5ef14f8 --- /dev/null +++ b/docs/diagrams/ModuleAddAutoCommand/ModuleAddAutoUseCaseDiagram.puml @@ -0,0 +1,13 @@ +@startuml +left to right direction +skinparam packageStyle rectangle +actor user +actor NUSMods +rectangle iGrad { + user -- (request for module information) + (request for module information) .> (adds module to module list) : include + (manually add module) .> (request for module information) : extends + (request for module information) -- NUSMods +} +@enduml + diff --git a/docs/diagrams/ModuleDoneActivityDiagram.puml b/docs/diagrams/ModuleDoneActivityDiagram.puml new file mode 100644 index 00000000000..e2ab1d37c03 --- /dev/null +++ b/docs/diagrams/ModuleDoneActivityDiagram.puml @@ -0,0 +1,18 @@ +@startuml +start +:User executes 'module done' command; + +:Module is updated in coursebook; + +if (Module belongs to at least one Requirement) then ([no]) +else ([yes]) + :All Requirements in the UniqueRequirementList consisting the module is updated (e.g, total credits (MCs) fulfilled); +endif + +:Calls to methods responsible for updating CourseInfo (e.g, computeCap(...)); + +:Success command message is displayed; + +stop +@enduml + diff --git a/docs/diagrams/ModuleFilterCommand/ModuleFilterActivityDiagram.puml b/docs/diagrams/ModuleFilterCommand/ModuleFilterActivityDiagram.puml new file mode 100644 index 00000000000..76db9dade49 --- /dev/null +++ b/docs/diagrams/ModuleFilterCommand/ModuleFilterActivityDiagram.puml @@ -0,0 +1,19 @@ +@startuml +start +:User executes command; + +if(has parameters) then (no) + :Refresh the module list; +else + if(operator == AND) then (no) + :Filter modules which have at least one\nof the specified values given; + else (yes) + :Filter modules which have all the specified values given; + endif +endif + +:Updates the module list; + +:Displays filtered module list; +stop +@enduml diff --git a/docs/diagrams/ModuleFilterCommand/ModuleFilterSequenceDiagram.puml b/docs/diagrams/ModuleFilterCommand/ModuleFilterSequenceDiagram.puml new file mode 100644 index 00000000000..5f0a924a76f --- /dev/null +++ b/docs/diagrams/ModuleFilterCommand/ModuleFilterSequenceDiagram.puml @@ -0,0 +1,49 @@ +@startuml +!include ../style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant "e:ModuleFilterCommand" as ModuleFilterCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +end box + +[-> LogicManager : execute(filter) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(filter) +activate CourseBookParser + +create ModuleFilterCommand +CourseBookParser -> ModuleFilterCommand +activate ModuleFilterCommand + +ModuleFilterCommand --> CourseBookParser + +CourseBookParser --> LogicManager : u +deactivate CourseBookParser + +LogicManager -> ModuleFilterCommand : execute() +activate ModuleFilterCommand + +ModuleFilterCommand -> Model : updateFilteredModuleList() +activate Model + +Model--> ModuleFilterCommand + +ModuleFilterCommand -> Model : getFilteredModuleList() + +Model --> ModuleFilterCommand +deactivate Model + +ModuleFilterCommand --> LogicManager : result +deactivate ModuleFilterCommand +ModuleFilterCommand -[hidden]-> LogicManager : result +destroy ModuleFilterCommand + +<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/ModuleFilterCommand/ModuleFilterStateDiagram.puml b/docs/diagrams/ModuleFilterCommand/ModuleFilterStateDiagram.puml new file mode 100644 index 00000000000..6e7623c0f9a --- /dev/null +++ b/docs/diagrams/ModuleFilterCommand/ModuleFilterStateDiagram.puml @@ -0,0 +1,14 @@ +@startuml + +[*] --> InitialState + +InitialState : Unfiltered module list + +InitialState -> FilteredByAndState: filter(predicates, AND) +FilteredByAndState: Module list with modules\nmatching all predicates +FilteredByOrState: Module list with module\nmatching one or more predictates + +InitialState -> FilteredByOrState: filter(predicates, OR) +FilteredByAndState --> InitialState: filter() +FilteredByOrState --> InitialState: filter() +@enduml diff --git a/docs/diagrams/ProgressPanelUpdateProgress.puml b/docs/diagrams/ProgressPanelUpdateProgress.puml new file mode 100644 index 00000000000..1d373438d55 --- /dev/null +++ b/docs/diagrams/ProgressPanelUpdateProgress.puml @@ -0,0 +1,68 @@ +@startuml +!include style.puml +autoactivate on + +box UI UI_COLOR_T1 +participant ":MainWindow" as MainWindow UI_COLOR +participant ":ProgressSidePanel" as ProgressSidePanel UI_COLOR +end box + +box MODEL MODEL_COLOR_T1 +participant ":ModelManager" as ModelManager MODEL_COLOR +participant ":Name" as Name MODEL_COLOR +participant ":Credits" as Credits MODEL_COLOR +participant ":Cap" as Cap MODEL_COLOR +participant ":Semesters" as Semesters MODEL_COLOR +end box + +[-> MainWindow : executeCommand("module done n/CS1101S g/A") +activate MainWindow + +MainWindow -> ModelManager : update model +activate ModelManager +return done +deactivate ModelManager + +MainWindow -> MainWindow : refreshProgressPanel(model) + +MainWindow -> ProgressSidePanel : updateProgress(model) +activate ProgressSidePanel + +ProgressSidePanel -> ModelManager : getCourseInfo() +activate ModelManager +return courseInfo +deactivate + +ProgressSidePanel -> Name : courseInfo.getName() +return courseName + +ProgressSidePanel -> Credits : courseInfo.getCredits() +return creditsCount + +ProgressSidePanel -> Cap : courseInfo.getCap() +return cap + +ProgressSidePanel -> Semesters : courseInfo.getSemesters() +return semesters + +ProgressSidePanel -> ProgressSidePanel : setProgress(percentage) +return + +ProgressSidePanel -> ProgressSidePanel : currentCapLabel.setText(currentCap) +return + +ProgressSidePanel -> ProgressSidePanel : creditsCount.setText(creditsCount) +return + +ProgressSidePanel -> ProgressSidePanel : semesterLabel.setText(semesters) +return + +deactivate ProgressSidePanel +return + +deactivate + +[<-- MainWindow +deactivate MainWindow +@enduml + diff --git a/docs/diagrams/Requirement/RequirementAddActivityDiagram.puml b/docs/diagrams/Requirement/RequirementAddActivityDiagram.puml new file mode 100644 index 00000000000..85686bb24f5 --- /dev/null +++ b/docs/diagrams/Requirement/RequirementAddActivityDiagram.puml @@ -0,0 +1,11 @@ +@startuml +start +:User executes\nRequirement Add command; + +if () then (invalid or missing prefixes\n and/or parameters) + :iGrad displays an error message\nand asks user to enter the\nnecessary parameters; +else ( valid prefixes\nand parameters) + :Requirement is added; +endif +stop +@enduml diff --git a/docs/diagrams/Requirement/RequirementAddSequenceDiagram.puml b/docs/diagrams/Requirement/RequirementAddSequenceDiagram.puml new file mode 100644 index 00000000000..ded203a64bf --- /dev/null +++ b/docs/diagrams/Requirement/RequirementAddSequenceDiagram.puml @@ -0,0 +1,69 @@ +@startuml +!include ../style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant ":RequirementAddCommandParser" as RequirementAddCommandParser LOGIC_COLOR +participant "r:RequirementAddCommand" as RequirementAddCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant ":CourseBook" as CourseBook MODEL_COLOR +end box + +[-> LogicManager : execute(add requirement) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(add requirement) +activate CourseBookParser + +create RequirementAddCommandParser +CourseBookParser -> RequirementAddCommandParser +activate RequirementAddCommandParser + +create RequirementAddCommand +RequirementAddCommandParser -> RequirementAddCommand +activate RequirementAddCommand + +RequirementAddCommand --> RequirementAddCommandParser +deactivate RequirementAddCommand +RequirementAddCommandParser --> CourseBookParser : r +deactivate RequirementAddCommandParser +destroy RequirementAddCommandParser + +CourseBookParser --> LogicManager : r +deactivate CourseBookParser + +LogicManager -> RequirementAddCommand : execute() +activate RequirementAddCommand + +RequirementAddCommand -> RequirementAddCommand : generateRequirementCode() +activate RequirementAddCommand +RequirementAddCommand -> Model : getRequirementList() +activate Model +Model -> RequirementAddCommand +deactivate Model +RequirementAddCommand -> RequirementAddCommand : requirementCode +deactivate RequirementAddCommand + +RequirementAddCommand -> Model : addRequirement() +activate Model + +Model -> CourseBook : addRequirement() +activate CourseBook + +CourseBook --> Model +deactivate CourseBook + +Model --> RequirementAddCommand +deactivate Model + +RequirementAddCommand --> LogicManager : result +deactivate RequirementAddCommand +destroy RequirementAddCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/Requirement/RequirementClassDiagram.puml b/docs/diagrams/Requirement/RequirementClassDiagram.puml new file mode 100644 index 00000000000..a1f0bfed2df --- /dev/null +++ b/docs/diagrams/Requirement/RequirementClassDiagram.puml @@ -0,0 +1,52 @@ +@startuml +hide circle +skinparam classAttributeIconSize 0 + +interface ReadOnlyRequirement { + +isFulfilled() + +isSameRequirement() + +equals() +} + +class Requirement { + +addModule() + +setModule() + +removeModule() + -computeCredits() +} + +class RequirementCode { + -value + +isValidRequirementCode() +} + +class Title { + -value + +isValidTitle() +} + +class Credits { + -creditsRequired + -creditsAssigned + -creditsFulfilled + +isValidCredits() + +isFulfilled() +} + +class UniqueModuleList { + -internalList + -internalUnmodifiableList + +add() + +set() + +remove() + +contains() + +getByModuleCode() + +asUnmodifiableObservableList() +} + +ReadOnlyRequirement <|-- Requirement +Requirement *-- "1" RequirementCode +Requirement *-- "1" Title +Requirement *-- "1" Credits +Requirement *-- "1" UniqueModuleList +@enduml diff --git a/docs/diagrams/RequirementAssignActivityDiagram.puml b/docs/diagrams/RequirementAssignActivityDiagram.puml new file mode 100644 index 00000000000..9f176ceaa40 --- /dev/null +++ b/docs/diagrams/RequirementAssignActivityDiagram.puml @@ -0,0 +1,18 @@ +@startuml +start +:User executes 'requirement assign' command; + +if (Modules to assign are all existent in the coursebook) then ([no]) +: Throw an exception preventing any of them to be assigned; +else +: Filter out Modules which are already assigned to that requirement; +: Assigned Modules under that Requirement; +endif + +:Calls to methods responsible for updating CourseInfo (e.g, computeCap(...)); + +:Result message is displayed (error/success); + +stop +@enduml + diff --git a/docs/diagrams/ResultDisplayHandleCommand.puml b/docs/diagrams/ResultDisplayHandleCommand.puml new file mode 100644 index 00000000000..ebe3d58a45b --- /dev/null +++ b/docs/diagrams/ResultDisplayHandleCommand.puml @@ -0,0 +1,32 @@ +@startuml +!include style.puml +autoactivate on + +box UI UI_COLOR_T1 +participant ":MainWindow" as MainWindow UI_COLOR +participant ":ResultDisplay" as ResultDisplay UI_COLOR +end box + +[-> MainWindow : executeCommand("course delete") +activate MainWindow + +MainWindow -> MainWindow : refreshResultDisplayAvatar(avatar) + +MainWindow -> ResultDisplay : setAvatar(avatar) +activate ResultDisplay +return +deactivate ResultDisplay +deactivate + +MainWindow -> MainWindow : refreshResultDisplay(feedbackToUser) + +MainWindow -> ResultDisplay : setFeedbackToUser(feedbackToUser) +activate ResultDisplay +return +deactivate ResultDisplay +deactivate + +[<-- MainWindow : return CommandResult +deactivate MainWindow +@enduml + diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml index 6adb2e156bf..b8e1527658b 100644 --- a/docs/diagrams/StorageClassDiagram.puml +++ b/docs/diagrams/StorageClassDiagram.puml @@ -6,19 +6,22 @@ skinparam classBackgroundColor STORAGE_COLOR Interface Storage <> Interface UserPrefsStorage <> -Interface AddressBookStorage <> +Interface CourseBookStorage <> Class StorageManager Class JsonUserPrefsStorage -Class JsonAddressBookStorage +Class JsonCourseBookStorage StorageManager .left.|> Storage StorageManager o-right-> UserPrefsStorage -StorageManager o--> AddressBookStorage +StorageManager o--> CourseBookStorage JsonUserPrefsStorage .left.|> UserPrefsStorage -JsonAddressBookStorage .left.|> AddressBookStorage -JsonAddressBookStorage .down.> JsonSerializableAddressBookStorage -JsonSerializableAddressBookStorage .right.> JsonSerializablePerson -JsonSerializablePerson .right.> JsonAdaptedTag +JsonCourseBookStorage .left.|> CourseBookStorage +JsonCourseBookStorage .down.> JsonSerializableCourseBookStorage + +JsonSerializableCourseBookStorage .down.> JsonAdaptedCourseInfo +JsonSerializableCourseBookStorage .down.> JsonAdaptedRequirement +JsonSerializableCourseBookStorage .down.> JsonAdaptedModule +JsonAdaptedModule .right.> JsonAdaptedTag @enduml diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml index 92746f9fcf7..b6323538286 100644 --- a/docs/diagrams/UiClassDiagram.puml +++ b/docs/diagrams/UiClassDiagram.puml @@ -11,10 +11,16 @@ Class UiManager Class MainWindow Class HelpWindow Class ResultDisplay -Class PersonListPanel -Class PersonCard -Class StatusBarFooter +Class CommandReceivedPanel +Class ProgressSidePanel +Class RequirementListPanel +Class StatusBar Class CommandBox +Class ModuleCard +Class AvatarImage +Class ModuleListPanel +Class RequirementCard +Class AvatarSelectionPanel } package Model <> { @@ -30,31 +36,41 @@ HiddenOutside ..> Ui UiManager .left.|> Ui UiManager -down-> MainWindow -MainWindow --> HelpWindow -MainWindow *-down-> CommandBox -MainWindow *-down-> ResultDisplay -MainWindow *-down-> PersonListPanel -MainWindow *-down-> StatusBarFooter - -PersonListPanel -down-> PersonCard +MainWindow *-down-> "1" CommandBox +MainWindow *-down-> "1" ResultDisplay +MainWindow *-down-> "1" StatusBar +MainWindow *-down-> "1" ProgressSidePanel +MainWindow *-down-> "1" CommandReceivedPanel +MainWindow *-down-> "1" RequirementListPanel +MainWindow *-down-> "1" ModuleListPanel +MainWindow *-down-> "1" AvatarSelectionPanel +ModuleListPanel o-down-> "*" ModuleCard +RequirementListPanel o-down-> "*" RequirementCard +AvatarSelectionPanel o-down-> "6" AvatarImage MainWindow -left-|> UiPart ResultDisplay --|> UiPart CommandBox --|> UiPart -PersonListPanel --|> UiPart -PersonCard --|> UiPart -StatusBarFooter --|> UiPart -HelpWindow -down-|> UiPart +ModuleListPanel --|> UiPart +ModuleCard --|> UiPart +StatusBar --|> UiPart +CommandReceivedPanel --|> UiPart +ProgressSidePanel --|> UiPart +RequirementListPanel --|> UiPart +RequirementCard --|> UiPart +AvatarSelectionPanel --|> UiPart +HelpWindow --|> UiPart -PersonCard ..> Model -UiManager -right-> Logic +UiManager -right-> "1" Logic +UiManager -left-> Model +MainWindow ..> Model MainWindow -left-> Logic -PersonListPanel -[hidden]left- HelpWindow -HelpWindow -[hidden]left- CommandBox +ProgressSidePanel -[hidden]left- CommandReceivedPanel +CommandReceivedPanel -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay -ResultDisplay -[hidden]left- StatusBarFooter +ResultDisplay -[hidden]left- StatusBar MainWindow -[hidden]-|> UiPart @enduml diff --git a/docs/diagrams/UndoCommand/UndoSequenceDiagram.puml b/docs/diagrams/UndoCommand/UndoSequenceDiagram.puml new file mode 100644 index 00000000000..29c9a0f4f71 --- /dev/null +++ b/docs/diagrams/UndoCommand/UndoSequenceDiagram.puml @@ -0,0 +1,54 @@ +@startuml +!include ../style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant "u:UndoCommand" as UndoCommand LOGIC_COLOR +end box + +box Model MODEL_COLOR_T1 +participant ":Model" as Model MODEL_COLOR +participant "b:BackupCourseBook" as BackupCourseBook MODEL_COLOR +end box + +[-> LogicManager : execute(undo) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(undo) +activate CourseBookParser + +create UndoCommand +CourseBookParser -> UndoCommand +activate UndoCommand + +UndoCommand --> CourseBookParser + +CourseBookParser --> LogicManager : u +deactivate CourseBookParser + +LogicManager -> UndoCommand : execute() +activate UndoCommand + +UndoCommand -> Model : undoCourseBook() +activate Model + +Model -> BackupCourseBook +activate BackupCourseBook + +BackupCourseBook --> Model : +deactivate BackupCourseBook + +Model -> Model: setCourseBook(b) + +Model --> UndoCommand +deactivate Model + +UndoCommand --> LogicManager : result +deactivate UndoCommand +UndoCommand -[hidden]-> LogicManager : result +destroy UndoCommand + +<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/UndoCommand/UndoState0.puml b/docs/diagrams/UndoCommand/UndoState0.puml new file mode 100644 index 00000000000..db923969361 --- /dev/null +++ b/docs/diagrams/UndoCommand/UndoState0.puml @@ -0,0 +1,21 @@ +@startuml +!include ../style.puml +skinparam ClassFontColor #000000 +skinparam ClassBorderColor #000000 + +title Initial state + + +package States <> { + class State1 as "__courseBook:CourseBook__" + class State2 as "__backupCourseBook:CourseBook__" +} + +State1 -[hidden]right-> State2 +State2 -[hidden]right-> State3 +hide State2 +hide State3 + +class Pointer as "Current State" #FFFFF +Pointer -up-> State1 +@enduml diff --git a/docs/diagrams/UndoCommand/UndoState1.puml b/docs/diagrams/UndoCommand/UndoState1.puml new file mode 100644 index 00000000000..ee6413e472e --- /dev/null +++ b/docs/diagrams/UndoCommand/UndoState1.puml @@ -0,0 +1,22 @@ +@startuml +!include ../style.puml + +skinparam ClassFontColor #000000 +skinparam ClassBorderColor #000000 + +title After command "module delete CS2103T" + +package States <> { + class State1 as "__courseBook:CourseBook__" + class State2 as "__backupCourseBook:CourseBook__" +} + +State2 -[hidden]right-> State1 +State1 -[hidden]right-> State3 + +hide State3 + +class Pointer as "Current State" #FFFFF + +Pointer -up-> State1 +@enduml diff --git a/docs/diagrams/UndoCommand/UndoState2.puml b/docs/diagrams/UndoCommand/UndoState2.puml new file mode 100644 index 00000000000..09f74d21d53 --- /dev/null +++ b/docs/diagrams/UndoCommand/UndoState2.puml @@ -0,0 +1,22 @@ +@startuml +!include ../style.puml + +skinparam ClassFontColor #000000 +skinparam ClassBorderColor #000000 + +title After command "undo" + +package States <> { + class State1 as "__courseBook:CourseBook__" + class State2 as "__backupCourseBook:CourseBook__" +} + +State2 -[hidden]right-> State1 +State1 -[hidden]right-> State3 + +hide State3 + +class Pointer as "Current State" #FFFFF + +Pointer -up-> State2 +@enduml diff --git a/docs/diagrams/UndoCommand/UndoState3.puml b/docs/diagrams/UndoCommand/UndoState3.puml new file mode 100644 index 00000000000..65c96b8176e --- /dev/null +++ b/docs/diagrams/UndoCommand/UndoState3.puml @@ -0,0 +1,21 @@ +@startuml +!include ../style.puml +skinparam ClassFontColor #000000 +skinparam ClassBorderColor #000000 + +title After command "undo" + +package States <> { + class State1 as "__courseBook:CourseBook__" + class State2 as "__backupCourseBook:CourseBook__" +} + +State1 -[hidden]right-> State2 +State2 -[hidden]right-> State3 +hide State1 +hide State3 + + +class Pointer as "Current State" #FFFFF +Pointer -up-> State2 +@enduml diff --git a/docs/diagrams/UndoRedoState0.puml b/docs/diagrams/UndoRedoState0.puml index 96e30744d24..a7140a734c9 100644 --- a/docs/diagrams/UndoRedoState0.puml +++ b/docs/diagrams/UndoRedoState0.puml @@ -6,9 +6,9 @@ skinparam ClassBorderColor #000000 title Initial state package States { - class State1 as "__ab0:AddressBook__" - class State2 as "__ab1:AddressBook__" - class State3 as "__ab2:AddressBook__" + class State1 as "__cb0:CourseBook__" + class State2 as "__cb1:CourseBook__" + class State3 as "__cb2:CourseBook__" } State1 -[hidden]right-> State2 State2 -[hidden]right-> State3 @@ -17,4 +17,4 @@ hide State3 class Pointer as "Current State" #FFFFF Pointer -up-> State1 -@end +@enduml diff --git a/docs/diagrams/UndoRedoState1.puml b/docs/diagrams/UndoRedoState1.puml index 01fcb9b2b96..f4966f8a068 100644 --- a/docs/diagrams/UndoRedoState1.puml +++ b/docs/diagrams/UndoRedoState1.puml @@ -1,14 +1,15 @@ @startuml !include style.puml + skinparam ClassFontColor #000000 skinparam ClassBorderColor #000000 -title After command "delete 5" +title After command "module add n/CS2103T -a" package States <> { - class State1 as "__ab0:AddressBook__" - class State2 as "__ab1:AddressBook__" - class State3 as "__ab2:AddressBook__" + class State1 as "__cb0:CourseBook__" + class State2 as "__cb1:CourseBook__" + class State3 as "__cb2:CourseBook__" } State1 -[hidden]right-> State2 @@ -19,4 +20,4 @@ hide State3 class Pointer as "Current State" #FFFFF Pointer -up-> State2 -@end +@enduml diff --git a/docs/diagrams/UndoRedoState2.puml b/docs/diagrams/UndoRedoState2.puml index bccc230a5d1..952cecd46cb 100644 --- a/docs/diagrams/UndoRedoState2.puml +++ b/docs/diagrams/UndoRedoState2.puml @@ -3,12 +3,12 @@ skinparam ClassFontColor #000000 skinparam ClassBorderColor #000000 -title After command "add n/David" +title After command "module add n/CS2101 -a" package States <> { - class State1 as "__ab0:AddressBook__" - class State2 as "__ab1:AddressBook__" - class State3 as "__ab2:AddressBook__" + class State1 as "__cb0:CourseBook__" + class State2 as "__cb1:CourseBook__" + class State3 as "__cb2:CourseBook__" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoRedoState3.puml b/docs/diagrams/UndoRedoState3.puml index ea29c9483e4..7bf5fe33b23 100644 --- a/docs/diagrams/UndoRedoState3.puml +++ b/docs/diagrams/UndoRedoState3.puml @@ -6,9 +6,9 @@ skinparam ClassBorderColor #000000 title After command "undo" package States <> { - class State1 as "__ab0:AddressBook__" - class State2 as "__ab1:AddressBook__" - class State3 as "__ab2:AddressBook__" + class State1 as "__cb0:CourseBook__" + class State2 as "__cb1:CourseBook__" + class State3 as "__cb2:CourseBook__" } State1 -[hidden]right-> State2 diff --git a/docs/diagrams/UndoSequenceDiagram.puml b/docs/diagrams/UndoSequenceDiagram.puml deleted file mode 100644 index 410aab4e412..00000000000 --- a/docs/diagrams/UndoSequenceDiagram.puml +++ /dev/null @@ -1,53 +0,0 @@ -@startuml -!include style.puml - -box Logic LOGIC_COLOR_T1 -participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR -participant "u:UndoCommand" as UndoCommand LOGIC_COLOR -end box - -box Model MODEL_COLOR_T1 -participant ":Model" as Model MODEL_COLOR -participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR -end box -[-> LogicManager : execute(undo) -activate LogicManager - -LogicManager -> AddressBookParser : parseCommand(undo) -activate AddressBookParser - -create UndoCommand -AddressBookParser -> UndoCommand -activate UndoCommand - -UndoCommand --> AddressBookParser -deactivate UndoCommand - -AddressBookParser --> LogicManager : u -deactivate AddressBookParser - -LogicManager -> UndoCommand : execute() -activate UndoCommand - -UndoCommand -> Model : undoAddressBook() -activate Model - -Model -> VersionedAddressBook : undo() -activate VersionedAddressBook - -VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook) -VersionedAddressBook --> Model : -deactivate VersionedAddressBook - -Model --> UndoCommand -deactivate Model - -UndoCommand --> LogicManager : result -deactivate UndoCommand -UndoCommand -[hidden]-> LogicManager : result -destroy UndoCommand - -[<--LogicManager -deactivate LogicManager -@enduml diff --git a/docs/diagrams/style.puml b/docs/diagrams/style.puml index fad8b0adeaa..0892776622b 100644 --- a/docs/diagrams/style.puml +++ b/docs/diagrams/style.puml @@ -31,6 +31,13 @@ !define STORAGE_COLOR_T3 #806600 !define STORAGE_COLOR_T2 #544400 +!define SERVICES_COLOR #f995c6 +!define SERVICES_COLOR_T1 #ff34b3 + +!define CSV_WRITER_COLOR #5b8c00 +!define CSV_WRITER_COLOR_T1 #7cb305 +!define CSV_WRITER_COLOR_T2 #eaff8f + !define USER_COLOR #000000 skinparam BackgroundColor #FFFFFFF diff --git a/docs/diagrams/tracing/LogicSequenceDiagram.puml b/docs/diagrams/tracing/LogicSequenceDiagram.puml index fdcbe1c0ccc..1bdf8bedd1e 100644 --- a/docs/diagrams/tracing/LogicSequenceDiagram.puml +++ b/docs/diagrams/tracing/LogicSequenceDiagram.puml @@ -13,7 +13,7 @@ create ecp abp -> ecp abp -> ecp ++: parse(arguments) create ec -ecp -> ec ++: index, editPersonDescriptor +ecp -> ec ++: index, editModuleDescriptor ec --> ecp -- ecp --> abp --: command abp --> logic --: command diff --git a/docs/images/ArchitectureDiagram.png b/docs/images/ArchitectureDiagram.png deleted file mode 100644 index aa2d337d932..00000000000 Binary files a/docs/images/ArchitectureDiagram.png and /dev/null differ diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png deleted file mode 100644 index aa198138f8f..00000000000 Binary files a/docs/images/ArchitectureSequenceDiagram.png and /dev/null differ diff --git a/docs/images/BetterModelClassDiagram.png b/docs/images/BetterModelClassDiagram.png deleted file mode 100644 index bc7ed18ae29..00000000000 Binary files a/docs/images/BetterModelClassDiagram.png and /dev/null differ diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png deleted file mode 100644 index fa327b39618..00000000000 Binary files a/docs/images/DeleteSequenceDiagram.png and /dev/null differ diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png deleted file mode 100644 index b9e853cef12..00000000000 Binary files a/docs/images/LogicClassDiagram.png and /dev/null differ diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png deleted file mode 100644 index 280064118cf..00000000000 Binary files a/docs/images/ModelClassDiagram.png and /dev/null differ diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png deleted file mode 100644 index d87c1216820..00000000000 Binary files a/docs/images/StorageClassDiagram.png and /dev/null differ diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 5bd77847aa2..61b92a0abec 100644 Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ diff --git a/docs/images/UiClassDiagram.png b/docs/images/UiClassDiagram.png deleted file mode 100644 index 7b4b3dbea45..00000000000 Binary files a/docs/images/UiClassDiagram.png and /dev/null differ diff --git a/docs/images/UndoSequenceDiagram.png b/docs/images/UndoSequenceDiagram.png deleted file mode 100644 index 6addcd3a8d9..00000000000 Binary files a/docs/images/UndoSequenceDiagram.png and /dev/null differ diff --git a/docs/images/dargohzy.png b/docs/images/dargohzy.png new file mode 100644 index 00000000000..0a434e40d4c Binary files /dev/null and b/docs/images/dargohzy.png differ diff --git a/docs/images/developer-guide/ArchitectureDiagram.png b/docs/images/developer-guide/ArchitectureDiagram.png new file mode 100644 index 00000000000..400f9166fee Binary files /dev/null and b/docs/images/developer-guide/ArchitectureDiagram.png differ diff --git a/docs/images/developer-guide/ArchitectureSequenceDiagram.png b/docs/images/developer-guide/ArchitectureSequenceDiagram.png new file mode 100644 index 00000000000..27803bca047 Binary files /dev/null and b/docs/images/developer-guide/ArchitectureSequenceDiagram.png differ diff --git a/docs/images/developer-guide/BetterModelClassDiagram.png b/docs/images/developer-guide/BetterModelClassDiagram.png new file mode 100644 index 00000000000..890a778ae59 Binary files /dev/null and b/docs/images/developer-guide/BetterModelClassDiagram.png differ diff --git a/docs/images/developer-guide/CommandReceivedSetCommand.png b/docs/images/developer-guide/CommandReceivedSetCommand.png new file mode 100644 index 00000000000..c9662607874 Binary files /dev/null and b/docs/images/developer-guide/CommandReceivedSetCommand.png differ diff --git a/docs/images/CommitActivityDiagram.png b/docs/images/developer-guide/CommitActivityDiagram.png similarity index 100% rename from docs/images/CommitActivityDiagram.png rename to docs/images/developer-guide/CommitActivityDiagram.png diff --git a/docs/images/developer-guide/ComputeCapSequenceDiagram.png b/docs/images/developer-guide/ComputeCapSequenceDiagram.png new file mode 100644 index 00000000000..1ddfdb69be1 Binary files /dev/null and b/docs/images/developer-guide/ComputeCapSequenceDiagram.png differ diff --git a/docs/images/developer-guide/ComputeCreditsSequenceDiagram.png b/docs/images/developer-guide/ComputeCreditsSequenceDiagram.png new file mode 100644 index 00000000000..6d8b6320476 Binary files /dev/null and b/docs/images/developer-guide/ComputeCreditsSequenceDiagram.png differ diff --git a/docs/images/developer-guide/CourseAchieveActivityDiagram.png b/docs/images/developer-guide/CourseAchieveActivityDiagram.png new file mode 100644 index 00000000000..6199c2a1f01 Binary files /dev/null and b/docs/images/developer-guide/CourseAchieveActivityDiagram.png differ diff --git a/docs/images/developer-guide/CourseAchieveSequenceDiagram.png b/docs/images/developer-guide/CourseAchieveSequenceDiagram.png new file mode 100644 index 00000000000..00e0fa6c551 Binary files /dev/null and b/docs/images/developer-guide/CourseAchieveSequenceDiagram.png differ diff --git a/docs/images/developer-guide/CourseAchieveSequenceDiagram2.png b/docs/images/developer-guide/CourseAchieveSequenceDiagram2.png new file mode 100644 index 00000000000..5c65e2e9773 Binary files /dev/null and b/docs/images/developer-guide/CourseAchieveSequenceDiagram2.png differ diff --git a/docs/images/developer-guide/CourseCreditsClassDiagram.png b/docs/images/developer-guide/CourseCreditsClassDiagram.png new file mode 100644 index 00000000000..5fbc26244a2 Binary files /dev/null and b/docs/images/developer-guide/CourseCreditsClassDiagram.png differ diff --git a/docs/images/developer-guide/CourseEditSequenceDiagram.png b/docs/images/developer-guide/CourseEditSequenceDiagram.png new file mode 100644 index 00000000000..b6999a3b4cb Binary files /dev/null and b/docs/images/developer-guide/CourseEditSequenceDiagram.png differ diff --git a/docs/images/developer-guide/CourseInfoClassDiagram.png b/docs/images/developer-guide/CourseInfoClassDiagram.png new file mode 100644 index 00000000000..7ada6b60d30 Binary files /dev/null and b/docs/images/developer-guide/CourseInfoClassDiagram.png differ diff --git a/docs/images/developer-guide/CourseSemestersClassDiagram.png b/docs/images/developer-guide/CourseSemestersClassDiagram.png new file mode 100644 index 00000000000..7df68971bfd Binary files /dev/null and b/docs/images/developer-guide/CourseSemestersClassDiagram.png differ diff --git a/docs/images/developer-guide/DeleteSequenceDiagram.png b/docs/images/developer-guide/DeleteSequenceDiagram.png new file mode 100644 index 00000000000..0f616e5425e Binary files /dev/null and b/docs/images/developer-guide/DeleteSequenceDiagram.png differ diff --git a/docs/images/developer-guide/ExportSequenceDiagram.png b/docs/images/developer-guide/ExportSequenceDiagram.png new file mode 100644 index 00000000000..7588d279ff4 Binary files /dev/null and b/docs/images/developer-guide/ExportSequenceDiagram.png differ diff --git a/docs/images/developer-guide/ExportStateDiagram.png b/docs/images/developer-guide/ExportStateDiagram.png new file mode 100644 index 00000000000..e550422c33f Binary files /dev/null and b/docs/images/developer-guide/ExportStateDiagram.png differ diff --git a/docs/images/developer-guide/LogicClassDiagram.png b/docs/images/developer-guide/LogicClassDiagram.png new file mode 100644 index 00000000000..2d31433b380 Binary files /dev/null and b/docs/images/developer-guide/LogicClassDiagram.png differ diff --git a/docs/images/developer-guide/ModelClassDiagram.png b/docs/images/developer-guide/ModelClassDiagram.png new file mode 100644 index 00000000000..f5f090a46be Binary files /dev/null and b/docs/images/developer-guide/ModelClassDiagram.png differ diff --git a/docs/images/developer-guide/ModuleAddAutoActivityDiagram.png b/docs/images/developer-guide/ModuleAddAutoActivityDiagram.png new file mode 100644 index 00000000000..002183f84d6 Binary files /dev/null and b/docs/images/developer-guide/ModuleAddAutoActivityDiagram.png differ diff --git a/docs/images/developer-guide/ModuleAddAutoBatchActivityDiagram.png b/docs/images/developer-guide/ModuleAddAutoBatchActivityDiagram.png new file mode 100644 index 00000000000..67f8c232c74 Binary files /dev/null and b/docs/images/developer-guide/ModuleAddAutoBatchActivityDiagram.png differ diff --git a/docs/images/developer-guide/ModuleAddAutoSequenceDiagram.png b/docs/images/developer-guide/ModuleAddAutoSequenceDiagram.png new file mode 100644 index 00000000000..5d55c971dd3 Binary files /dev/null and b/docs/images/developer-guide/ModuleAddAutoSequenceDiagram.png differ diff --git a/docs/images/developer-guide/ModuleAutoAddUseCaseDiagram.png b/docs/images/developer-guide/ModuleAutoAddUseCaseDiagram.png new file mode 100644 index 00000000000..5869464d695 Binary files /dev/null and b/docs/images/developer-guide/ModuleAutoAddUseCaseDiagram.png differ diff --git a/docs/images/developer-guide/ModuleClassDiagram.png b/docs/images/developer-guide/ModuleClassDiagram.png new file mode 100644 index 00000000000..50eef988d00 Binary files /dev/null and b/docs/images/developer-guide/ModuleClassDiagram.png differ diff --git a/docs/images/developer-guide/ModuleDoneActivityDiagram.png b/docs/images/developer-guide/ModuleDoneActivityDiagram.png new file mode 100644 index 00000000000..7f932584d46 Binary files /dev/null and b/docs/images/developer-guide/ModuleDoneActivityDiagram.png differ diff --git a/docs/images/developer-guide/ModuleFilterActivityDiagram.png b/docs/images/developer-guide/ModuleFilterActivityDiagram.png new file mode 100644 index 00000000000..905a8a3f452 Binary files /dev/null and b/docs/images/developer-guide/ModuleFilterActivityDiagram.png differ diff --git a/docs/images/developer-guide/ModuleFilterSequenceDiagram.png b/docs/images/developer-guide/ModuleFilterSequenceDiagram.png new file mode 100644 index 00000000000..754b8b3de8e Binary files /dev/null and b/docs/images/developer-guide/ModuleFilterSequenceDiagram.png differ diff --git a/docs/images/developer-guide/ModuleFilterStateDiagram.png b/docs/images/developer-guide/ModuleFilterStateDiagram.png new file mode 100644 index 00000000000..83bdc22170f Binary files /dev/null and b/docs/images/developer-guide/ModuleFilterStateDiagram.png differ diff --git a/docs/images/developer-guide/ProgressPanelUpdateProgress.png b/docs/images/developer-guide/ProgressPanelUpdateProgress.png new file mode 100644 index 00000000000..abc9012c70e Binary files /dev/null and b/docs/images/developer-guide/ProgressPanelUpdateProgress.png differ diff --git a/docs/images/ReadOnlyAddressBookUsage.png b/docs/images/developer-guide/ReadOnlyAddressBookUsage.png similarity index 100% rename from docs/images/ReadOnlyAddressBookUsage.png rename to docs/images/developer-guide/ReadOnlyAddressBookUsage.png diff --git a/docs/images/developer-guide/RequirementAddActivityDiagram.png b/docs/images/developer-guide/RequirementAddActivityDiagram.png new file mode 100644 index 00000000000..7392408082a Binary files /dev/null and b/docs/images/developer-guide/RequirementAddActivityDiagram.png differ diff --git a/docs/images/developer-guide/RequirementAddSequenceDiagram.png b/docs/images/developer-guide/RequirementAddSequenceDiagram.png new file mode 100644 index 00000000000..770f180a723 Binary files /dev/null and b/docs/images/developer-guide/RequirementAddSequenceDiagram.png differ diff --git a/docs/images/developer-guide/RequirementAssignActivityDiagram.png b/docs/images/developer-guide/RequirementAssignActivityDiagram.png new file mode 100644 index 00000000000..35cbd30d7d2 Binary files /dev/null and b/docs/images/developer-guide/RequirementAssignActivityDiagram.png differ diff --git a/docs/images/developer-guide/RequirementClassDiagram.png b/docs/images/developer-guide/RequirementClassDiagram.png new file mode 100644 index 00000000000..8f077eca33d Binary files /dev/null and b/docs/images/developer-guide/RequirementClassDiagram.png differ diff --git a/docs/images/developer-guide/ResultDisplayHandleCommand.png b/docs/images/developer-guide/ResultDisplayHandleCommand.png new file mode 100644 index 00000000000..84c3b5fd2de Binary files /dev/null and b/docs/images/developer-guide/ResultDisplayHandleCommand.png differ diff --git a/docs/images/developer-guide/StorageClassDiagram.png b/docs/images/developer-guide/StorageClassDiagram.png new file mode 100644 index 00000000000..0ccbee6b51c Binary files /dev/null and b/docs/images/developer-guide/StorageClassDiagram.png differ diff --git a/docs/images/developer-guide/UiClassDiagram.png b/docs/images/developer-guide/UiClassDiagram.png new file mode 100644 index 00000000000..0c1765f08f5 Binary files /dev/null and b/docs/images/developer-guide/UiClassDiagram.png differ diff --git a/docs/images/UndoRedoState0.png b/docs/images/developer-guide/UndoRedoState0.png similarity index 100% rename from docs/images/UndoRedoState0.png rename to docs/images/developer-guide/UndoRedoState0.png diff --git a/docs/images/UndoRedoState1.png b/docs/images/developer-guide/UndoRedoState1.png similarity index 100% rename from docs/images/UndoRedoState1.png rename to docs/images/developer-guide/UndoRedoState1.png diff --git a/docs/images/UndoRedoState2.png b/docs/images/developer-guide/UndoRedoState2.png similarity index 100% rename from docs/images/UndoRedoState2.png rename to docs/images/developer-guide/UndoRedoState2.png diff --git a/docs/images/UndoRedoState3.png b/docs/images/developer-guide/UndoRedoState3.png similarity index 100% rename from docs/images/UndoRedoState3.png rename to docs/images/developer-guide/UndoRedoState3.png diff --git a/docs/images/UndoRedoState4.png b/docs/images/developer-guide/UndoRedoState4.png similarity index 100% rename from docs/images/UndoRedoState4.png rename to docs/images/developer-guide/UndoRedoState4.png diff --git a/docs/images/UndoRedoState5.png b/docs/images/developer-guide/UndoRedoState5.png similarity index 100% rename from docs/images/UndoRedoState5.png rename to docs/images/developer-guide/UndoRedoState5.png diff --git a/docs/images/developer-guide/UndoSequenceDiagram.png b/docs/images/developer-guide/UndoSequenceDiagram.png new file mode 100644 index 00000000000..47f7519238e Binary files /dev/null and b/docs/images/developer-guide/UndoSequenceDiagram.png differ diff --git a/docs/images/developer-guide/UndoState0.png b/docs/images/developer-guide/UndoState0.png new file mode 100644 index 00000000000..44fe6cd0609 Binary files /dev/null and b/docs/images/developer-guide/UndoState0.png differ diff --git a/docs/images/developer-guide/UndoState1.png b/docs/images/developer-guide/UndoState1.png new file mode 100644 index 00000000000..f4b417a43df Binary files /dev/null and b/docs/images/developer-guide/UndoState1.png differ diff --git a/docs/images/developer-guide/UndoState2.png b/docs/images/developer-guide/UndoState2.png new file mode 100644 index 00000000000..173c1c5f499 Binary files /dev/null and b/docs/images/developer-guide/UndoState2.png differ diff --git a/docs/images/developer-guide/UndoState3.png b/docs/images/developer-guide/UndoState3.png new file mode 100644 index 00000000000..be9151cad48 Binary files /dev/null and b/docs/images/developer-guide/UndoState3.png differ diff --git a/docs/images/eezee-screenshot.png b/docs/images/eezee-screenshot.png new file mode 100644 index 00000000000..2542ca5fde7 Binary files /dev/null and b/docs/images/eezee-screenshot.png differ diff --git a/docs/images/nathanaelseen.png b/docs/images/nathanaelseen.png new file mode 100644 index 00000000000..5d19d8ed2ed Binary files /dev/null and b/docs/images/nathanaelseen.png differ diff --git a/docs/images/teriaiw.png b/docs/images/teriaiw.png new file mode 100644 index 00000000000..8ebc367c254 Binary files /dev/null and b/docs/images/teriaiw.png differ diff --git a/docs/images/user-guide/components/app_screenshot_ui.png b/docs/images/user-guide/components/app_screenshot_ui.png new file mode 100644 index 00000000000..9fd9edc728c Binary files /dev/null and b/docs/images/user-guide/components/app_screenshot_ui.png differ diff --git a/docs/images/user-guide/components/app_screenshot_ui_components_highlighted.png b/docs/images/user-guide/components/app_screenshot_ui_components_highlighted.png new file mode 100644 index 00000000000..e5dc5d2e786 Binary files /dev/null and b/docs/images/user-guide/components/app_screenshot_ui_components_highlighted.png differ diff --git a/docs/images/user-guide/components/graduation_degree_requirements.png b/docs/images/user-guide/components/graduation_degree_requirements.png new file mode 100644 index 00000000000..21dcd2dd8c2 Binary files /dev/null and b/docs/images/user-guide/components/graduation_degree_requirements.png differ diff --git a/docs/images/user-guide/components/hierachical_structure.png b/docs/images/user-guide/components/hierachical_structure.png new file mode 100644 index 00000000000..7be685abde3 Binary files /dev/null and b/docs/images/user-guide/components/hierachical_structure.png differ diff --git a/docs/images/user-guide/exportCommand/export_csv_example.png b/docs/images/user-guide/exportCommand/export_csv_example.png new file mode 100644 index 00000000000..7ae50ec4c47 Binary files /dev/null and b/docs/images/user-guide/exportCommand/export_csv_example.png differ diff --git a/docs/images/user-guide/moduleAutoAddCommand/module_edit.png b/docs/images/user-guide/moduleAutoAddCommand/module_edit.png new file mode 100644 index 00000000000..2d23b90fefe Binary files /dev/null and b/docs/images/user-guide/moduleAutoAddCommand/module_edit.png differ diff --git a/docs/images/user-guide/moduleAutoAddCommand/module_filter.png b/docs/images/user-guide/moduleAutoAddCommand/module_filter.png new file mode 100644 index 00000000000..b216d2ff732 Binary files /dev/null and b/docs/images/user-guide/moduleAutoAddCommand/module_filter.png differ diff --git a/docs/images/user-guide/moduleAutoAddCommand/one_module.png b/docs/images/user-guide/moduleAutoAddCommand/one_module.png new file mode 100644 index 00000000000..440dafef4ff Binary files /dev/null and b/docs/images/user-guide/moduleAutoAddCommand/one_module.png differ diff --git a/docs/images/user-guide/moduleAutoAddCommand/two_modules.png b/docs/images/user-guide/moduleAutoAddCommand/two_modules.png new file mode 100644 index 00000000000..8179cd903d8 Binary files /dev/null and b/docs/images/user-guide/moduleAutoAddCommand/two_modules.png differ diff --git a/docs/images/user-guide/requirementCommand/requirementAddSuccess.png b/docs/images/user-guide/requirementCommand/requirementAddSuccess.png new file mode 100644 index 00000000000..4b2b8d38e95 Binary files /dev/null and b/docs/images/user-guide/requirementCommand/requirementAddSuccess.png differ diff --git a/docs/images/user-guide/requirementCommand/requirementAssignSuccess.png b/docs/images/user-guide/requirementCommand/requirementAssignSuccess.png new file mode 100644 index 00000000000..ae381ccac76 Binary files /dev/null and b/docs/images/user-guide/requirementCommand/requirementAssignSuccess.png differ diff --git a/docs/images/user-guide/requirementCommand/requirementEditSuccess.png b/docs/images/user-guide/requirementCommand/requirementEditSuccess.png new file mode 100644 index 00000000000..f5c9f4219cf Binary files /dev/null and b/docs/images/user-guide/requirementCommand/requirementEditSuccess.png differ diff --git a/docs/images/user-guide/walkthrough1.png b/docs/images/user-guide/walkthrough1.png new file mode 100644 index 00000000000..7d270c0c986 Binary files /dev/null and b/docs/images/user-guide/walkthrough1.png differ diff --git a/docs/images/user-guide/walkthrough10.1.png b/docs/images/user-guide/walkthrough10.1.png new file mode 100644 index 00000000000..1a81256eef1 Binary files /dev/null and b/docs/images/user-guide/walkthrough10.1.png differ diff --git a/docs/images/user-guide/walkthrough10.2.png b/docs/images/user-guide/walkthrough10.2.png new file mode 100644 index 00000000000..24ea6eac454 Binary files /dev/null and b/docs/images/user-guide/walkthrough10.2.png differ diff --git a/docs/images/user-guide/walkthrough10.3.png b/docs/images/user-guide/walkthrough10.3.png new file mode 100644 index 00000000000..ee802e1548c Binary files /dev/null and b/docs/images/user-guide/walkthrough10.3.png differ diff --git a/docs/images/user-guide/walkthrough2.1.png b/docs/images/user-guide/walkthrough2.1.png new file mode 100644 index 00000000000..66d95b690ae Binary files /dev/null and b/docs/images/user-guide/walkthrough2.1.png differ diff --git a/docs/images/user-guide/walkthrough2.2.png b/docs/images/user-guide/walkthrough2.2.png new file mode 100644 index 00000000000..8b991d395ff Binary files /dev/null and b/docs/images/user-guide/walkthrough2.2.png differ diff --git a/docs/images/user-guide/walkthrough3.1.png b/docs/images/user-guide/walkthrough3.1.png new file mode 100644 index 00000000000..1c40c840dc5 Binary files /dev/null and b/docs/images/user-guide/walkthrough3.1.png differ diff --git a/docs/images/user-guide/walkthrough3.2.png b/docs/images/user-guide/walkthrough3.2.png new file mode 100644 index 00000000000..3898dc18912 Binary files /dev/null and b/docs/images/user-guide/walkthrough3.2.png differ diff --git a/docs/images/user-guide/walkthrough4.1.png b/docs/images/user-guide/walkthrough4.1.png new file mode 100644 index 00000000000..d61eacda907 Binary files /dev/null and b/docs/images/user-guide/walkthrough4.1.png differ diff --git a/docs/images/user-guide/walkthrough4.2.png b/docs/images/user-guide/walkthrough4.2.png new file mode 100644 index 00000000000..661eb889b08 Binary files /dev/null and b/docs/images/user-guide/walkthrough4.2.png differ diff --git a/docs/images/user-guide/walkthrough5.1.png b/docs/images/user-guide/walkthrough5.1.png new file mode 100644 index 00000000000..1308e5ddd2b Binary files /dev/null and b/docs/images/user-guide/walkthrough5.1.png differ diff --git a/docs/images/user-guide/walkthrough5.2.png b/docs/images/user-guide/walkthrough5.2.png new file mode 100644 index 00000000000..147e01c5152 Binary files /dev/null and b/docs/images/user-guide/walkthrough5.2.png differ diff --git a/docs/images/user-guide/walkthrough6.1.png b/docs/images/user-guide/walkthrough6.1.png new file mode 100644 index 00000000000..0395586c4e8 Binary files /dev/null and b/docs/images/user-guide/walkthrough6.1.png differ diff --git a/docs/images/user-guide/walkthrough6.2.png b/docs/images/user-guide/walkthrough6.2.png new file mode 100644 index 00000000000..3dd36e5d6b3 Binary files /dev/null and b/docs/images/user-guide/walkthrough6.2.png differ diff --git a/docs/images/user-guide/walkthrough7.1.png b/docs/images/user-guide/walkthrough7.1.png new file mode 100644 index 00000000000..4f1eaa9af73 Binary files /dev/null and b/docs/images/user-guide/walkthrough7.1.png differ diff --git a/docs/images/user-guide/walkthrough7.2.png b/docs/images/user-guide/walkthrough7.2.png new file mode 100644 index 00000000000..a0070c26c29 Binary files /dev/null and b/docs/images/user-guide/walkthrough7.2.png differ diff --git a/docs/images/user-guide/walkthrough8.png b/docs/images/user-guide/walkthrough8.png new file mode 100644 index 00000000000..4b10350e4d0 Binary files /dev/null and b/docs/images/user-guide/walkthrough8.png differ diff --git a/docs/images/user-guide/walkthrough9.png b/docs/images/user-guide/walkthrough9.png new file mode 100644 index 00000000000..3a9fc126e3c Binary files /dev/null and b/docs/images/user-guide/walkthrough9.png differ diff --git a/docs/images/waynewee.png b/docs/images/waynewee.png new file mode 100644 index 00000000000..99c5f697a06 Binary files /dev/null and b/docs/images/waynewee.png differ diff --git a/docs/images/yjskrs.png b/docs/images/yjskrs.png new file mode 100644 index 00000000000..1c24f7f71f1 Binary files /dev/null and b/docs/images/yjskrs.png differ diff --git a/docs/team/dargohzy.adoc b/docs/team/dargohzy.adoc new file mode 100644 index 00000000000..1d24a1332d4 --- /dev/null +++ b/docs/team/dargohzy.adoc @@ -0,0 +1,62 @@ += Daryl Goh - Project Portfolio + +:site-section: AboutUs +:imagesDir: ../images +:stylesDir: ../stylesheets + +== PROJECT: iGrad +--- +image::../images/Ui.png[] + +== Overview + +iGrad is a desktop module management and graduation tracking application. The user interacts with it using a CLI, and it has a GUI +created with JavaFX, FXML and CSS. + +== Summary of contributions + +* *Major Enhancement*: added *backend to frontend functionality* +** What it does: allows for visible change on the GUI upon user input. +** Justification: This feature allows the user to view data that they have input into the system, such that they are able to view their data in a cohesive window. +** Highlights: This feature was done mainly by adding and refactoring existing code from AB3. + +* *Major Enhancement*: added and designed *a clean and user-friendly Graphical User Interface (GUI)* +** What it does: improves user experience greatly. +** Justification: Greatly improves usability by ensuring that the user experience is good when using the application. +** Highlights: Did up initial mock-ups on Photoshop as well as revamping the initial from AB3 to provide a template for the current UI. Also did up initial skeletons for various UI components. +** Credits: Skeleton code for multiple GUI components before handing over to https://github.com/waynewee[Wayne] for future iterations. + +* *Major Enhancement*: added *module validation* when adding from NUSMods. +** What it does: added modules are validated to check if prerequisites or preclusions already exist in the current data. +** Justification: Important to ensure that modules added do not clash for the user, which may affect module planning. +** Credits: Adding modules based on NUSMods data functionality by https://github.com/waynewee[Wayne], further improvements also by https://github.com/waynewee[Wayne]. + +* *Minor Enhancement*: added multiple JUnit tests in testing the code. + +* *Minor Enhancement*: did mock-ups and image designs for the interface, using Photoshop. + +* *Code contributed*: [https://github.com/AY1920S2-CS2103T-F09-3/main/commits?author=dargohzy[All commits]] [https://nus-cs2103-ay1920s2.github.io/tp-dashboard/#=undefined&search=dargohzy[Project Code Dashboard]] + +* *Other contributions*: +** Project Presentation +*** Was part of the team that did the product pitch + +== Contributions to the User Guide +|=== +|_Given below are the sections I contributed to the User Guide. They showcase my ability to communicate with end-users +of the product in question. Worked in conjunction with https://github.com/teriaiw[Teri]._ +|=== +include::../UserGuide.adoc[tag=walkthrough] + +include::../UserGuide.adoc[tag=cheatsheet] +|=== + +== Contributions to the Developer Guide +|=== +|_Given below are the sections I contributed to the Developer Guide. They showcase my ability to communicate technical +information into documentation as well as my contributions to the project._ +|=== + + +include::../DeveloperGuide.adoc[tag=ui] + diff --git a/docs/team/johndoe.adoc b/docs/team/johndoe.adoc index f39e76e49b2..cefd021b1fe 100644 --- a/docs/team/johndoe.adoc +++ b/docs/team/johndoe.adoc @@ -9,7 +9,7 @@ == Overview -AddressBook - Level 3 is a desktop address book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. +AddressBook - Level 3 is a desktop courseInfo book application used for teaching Software Engineering principles. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC. == Summary of contributions diff --git a/docs/team/nathanaelseen.adoc b/docs/team/nathanaelseen.adoc new file mode 100644 index 00000000000..9fa3509028e --- /dev/null +++ b/docs/team/nathanaelseen.adoc @@ -0,0 +1,116 @@ += Nathanael Seen Zhong Qi - Project Portfolio +:site-section: AboutUs +:imagesDir: ../images +:stylesDir: ../stylesheets + +== PROJECT: iGrad +--- +image::../images/Ui.png[] + +== Overview + +iGrad is a desktop module management and graduation tracking application. The user interacts with it using a CLI, and it has a GUI created with JavaFX, FXML and CSS. + +== Summary of contributions + +* *Code contributed*: [https://github.com/AY1920S2-CS2103T-F09-3/main/commits?author=nathanaelseen[All commits]] [https://nus-cs2103-ay1920s2.github.io/tp-dashboard/#=undefined&search=nathanaelseen[Project Code Dashboard]] + +* *Major enhancement*: Added *course management* feature. +** _What it does_: Allows the user to create/edit/delete a course, through which various modules, +and requirements (degree requirements) are 'housed'. Also allows users to track overall +degree progress information, such as overal MCs completed for the course, and current CAP. +** _Justification_: Without a course, it does not make sense to +have modules and degree requirements (by which those modules are mapped under), as standalone +features. In fact, this feature could be said to be the most important feature. +** _Credits_: The original AB3 codebase which provided the necessary 'backing' + +* *Major enhancement*: Integrate *course management*, *requirement management*, and *module management* +feature together, by implementing the `module done`, `requirement assign`, and `requirement unassign`, +commands. +** _What it does_: + +*** `module done`: allows the user to record down the grade she has obtained for a particular +module she has completed + +*** `requirement assign`: allows the user to assign certain modules under a requirement + +*** `requirement unassign`: opposite of requirement assign + +** _Justification_: Again this feature is particularly important, in helping one track her graduation +requirements and overall degree progress. + +** _Highlights_: This three commands function helps to 'glue' the three components of the app altogether. + +*** For instance, in the `module done` command, when a module is marked as 'done', the +_module manager_ is involved to update that module. +Also, _requirement manager_ helps to update all requirements which contains +this module. +Finally, the _course manager_ helps to update information such as the total overal MCs fulfilled, +and CAP. +** _Credits_: Here, I would like to credit the rest of my teamates for implementing the module +management and requirement management feature, without which this feature would not have +been able to make sense. + +* *Minor enhancement*: remodularise some UI logic (avatar, Progress Side Panel, etc), +https://github.com/waynewee[Wayne], has initially written. + +* *Contribution to Team Based Tasks*: +** In-charge of merging any PRs request, this involves critically reviewing the code, +and fixing it if necessary. + +*** Things I checked/helped my teamates fix when merging PRs were; +violating checkstyle, obvious logic bug errors, design/implementation considerations and concerns, +remodularising of code. + +*** Also, helped resolve merge conflicts; +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/320[#320], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/307[#307], and +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/295[#295]. + +** Set-up Reposense, and Nelify for my team, for tracking code contributions and easy reviewing of +UG/DG docs. + +** Managed the issue tracker for the first-half of this project. + +** Designed the initial application UI prototype for the first draft UG submission. + +* *Review/Mentoring Contributions*: +** Assisted https://github.com/teriaiw[Teri], in her initial difficulties understanding and +adapting to such a large code-base, by creating stubs for her implementation. She feedbacked that +she liked my way of mentoring and found it to be really helpful. + +** Provided PR code reviews to my team members on code aspects I felt could be be improved, as I +was merging their PRs +(https://github.com/AY1920S2-CS2103T-F09-3/main/pull/313[#313], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/295[#295], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/281[#281], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/276[#276], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/269[#269], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/188[#188], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/193[#193], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/177[#177], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/89[#89], +https://github.com/AY1920S2-CS2103T-F09-3/main/pull/80[#80], and many more!) + +== Contributions to the User Guide + +|=== +|_Given below are sections I contributed to the User Guide. They showcase my ability in +written communication, in the form of documentation, with possibly non-technical end-users._ +|=== + +include::../UserGuide.adoc[tag=nat-ug] + + +== Contributions to the Developer Guide + +|=== +|_Sections contributed to DG_ +|=== + +include::../DeveloperGuide.adoc[tag=course-feature-dg] +include::../DeveloperGuide.adoc[tag=course-compute-credits-cap-dg] +''' +include::../DeveloperGuide.adoc[tag=module-done-dg] +''' +include::../DeveloperGuide.adoc[tag=requirement-assign-dg] diff --git a/docs/team/teriaiw.adoc b/docs/team/teriaiw.adoc new file mode 100644 index 00000000000..581a766382b --- /dev/null +++ b/docs/team/teriaiw.adoc @@ -0,0 +1,63 @@ += Teri Aiw - Project Portfolio +:site-section: AboutUs +:imagesDir: ../images +:stylesDir: ../stylesheets + +== PROJECT: iGrad +image::../images/Ui.png[] + +== Overview + +iGrad is a desktop module management and graduation tracking application. The user interacts with it using a CLI, and +it has a GUI created with JavaFX, FXML and CSS. + +== Summary of contributions + +* *Major Enhancement*: added feature to *calculate C.A.P. to achieve desired C.A.P.* +** What it does: allows the user to get an estimate of what C.A.P. they should expect to maintain per semester to +achieve the desired C.A.P. that they want. +** Justification: This feature allows users to better keep track and aim for better grades. +It provides added convenience for users as it uses existing data that user has already input. +** Highlights: Consideration for unachievable C.A.P. was included + +* *Major Enhancement*: Integrate *Semesters tracking* under course management feature +** What it does: tracking of how many semesters a user has left for their course of study, calculated based +on total semesters that user has input and completed semesters based on modules completed. +** Justification: This feature provides convenience to users as it allows the user to know of such information without +additional calculations. Therefore, it adds to user experience. This feature is also necessary for the calculation +of C.A.P. feature. +** Highlights: Tracking does not require any additional input by user, and is updated automatically on the UI. +** Credits: http://github.com/waynewee[Wayne] for integrating backend to frontend functionality + +* *Minor Enhancement*: assisted https://github.com/nathanaelseen[Nathanael] in adding feature of Course editing and +deletion in initial phase of project. + +* *Code contributed*: [https://github.com/AY1920S2-CS2103T-F09-3/main/commits?author=teriaiw[All commits]][https://nus-cs2103-ay1920s2.github.io/tp-dashboard/#=undefined&search=teriaiw[Project Code Dashboard]] + +* *Contribution to Team Based Tasks*: +** Added personalization to messages that are feedback to user while using the application. +** Standardized overall messages to be shown to user while using the application. +** Presented project as part of the product pitch team. + +<<< + +== Contributions to the User Guide +|=== +|_Given below are the sections I contributed to the User Guide. They showcase my ability to communicate with end-users +of the product in question. Worked in conjunction with https://github.com/dargohzy[Daryl]._ +|=== + +include::../UserGuide.adoc[tag=walkthrough] + +<<< + +== Contributions to the Developer Guide + +|=== +|_Given below are the sections I contributed to the Developer Guide. They showcase my ability to communicate technical +information into documentation as well as my contributions to the project._ +|=== + +include::../DeveloperGuide.adoc[tag=semesters] +include::../DeveloperGuide.adoc[tag=courseedit] +include::../DeveloperGuide.adoc[tag=courseachieve] diff --git a/docs/team/waynewee.adoc b/docs/team/waynewee.adoc new file mode 100644 index 00000000000..861e07cd838 --- /dev/null +++ b/docs/team/waynewee.adoc @@ -0,0 +1,90 @@ += Wayne Wee - Project Portfolio + +:site-section: AboutUs +:imagesDir: ../images +:stylesDir: ../stylesheets + +== PROJECT: iGrad + +== Overview + +iGrad is a desktop module management and graduation tracking application. The user interacts with it using a CLI, and it has a GUI created with JavaFX, FXML and CSS. + +== Summary of contributions + +* *Major enhancement*: added *the ability to add, edit and delete modules* +** _What it does_: allows the user to add, edit and delete modules. +** _Justification_: This feature is crucial in allowing the application to run as intended. A user can add a module with +a module code, title and module credits. They can also tag the module with a semester. +** _Highlights_: This feature was done mainly by refactoring existing code. +** _Credits_: The original AB3 for laying down most of the code. + +* *Major enhancement*: added *the ability to add modules based on information from NUSMods* +** _What it does_: allows the user to add multiple modules at one time based on information from NUSMods. +** _Justification_: This feature improves the product significantly because a user can make mistakes +while typing in module information and getting the information directly from NUSMods solves this problem. In addition, the user is now able to add up to 10 modules +at a time without having to specify more details other than the module code. This speeds things up significantly from having not only to key in modules one by one, but +also to fill up all the details. Finally, this feature also allows to check for module prerequisites and preclusions that the user might not be aware of. +** _Highlights_: The only HTTP request made in the whole application. +** _Credits_: NUSMods (for making all the data public and free to use) + +* *Major enhancement*: added *the ability to undo a previous command* +** _What it does_: allows the user to undo a previous command. +** _Justification_: This feature improves the product significantly because a user can make mistakes in commands and the app should provide a convenient way to rectify them. +** _Highlights_: Had to choose between different implementations of this command. + +* *Major enhancement*: added *the ability to filter modules* +** _What it does_: allows the user to filter modules based on certain parameters. +** _Justification_: This feature improves the product significantly because a user can face difficulty when attempting to look for a certain module. +** _Highlights_: Added the option to chain parameters by different logical operators, allowing users maximum flexibility + +* *Major enhancement*: added and designed *a clean and user-friendly Graphical User Interface (GUI)* +** _What it does_: improves the user experience greatly +** _Justification_: This feature improves the product significantly because no matter how well an application functions, nothing matters if +the user experience is poor. +** _Highlights_: Inclusion of an animal guide, displaying inspirational quotes and a progress bar. +** _Credits_: https://github.com/dargohzy[Daryl] for the first few iterations and implementations of the GUI, help panel and image +designs. + +* *Major enhancement*: added *the ability to export module data* +** _What it does_: exports modules tagged with a semester to a .csv file titled study_plan.csv +** _Justification_: This feature improves the product significantly because it saves the user a lot of time should they wish to +copy the data somewhere else. The file generated by this command can be used to submit to school administration +for exchange programme, leave of absence and internship applications. +** _Highlights_: Only command to write to a .csv file. + +* *Minor enhancement*: did the logic and interface to select an animal guide + +* *Minor enhancement*: added a quote generator that displays a random quote each time a command is entered + +* *Code contributed*: [https://github.com/AY1920S2-CS2103T-F09-3/main/tree/master/src/main[Functional code]] [https://github.com/AY1920S2-CS2103T-F09-3/main/tree/master/src/test[Test code]] +* *Other contributions*: + +** Project presentation: +*** Designed the theme used for the project presentation +** Bug fixes: +*** Helped fix some bugs (https://github.com/AY1920S2-CS2103T-F09-3/main/pull/301[#301], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/269[#269], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/185[#185], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/158[#158], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/108[#108], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/96[#96], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/95[#95]) +*** Removed unnecessary fields (https://github.com/AY1920S2-CS2103T-F09-3/main/pull/284[#284], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/210[#210) +** Community: +*** Reported bugs and suggestions for other teams in the class + +<<< + +== Contributions to the User Guide + +|=== +|_Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users._ +|=== + +include::../UserGuide.adoc[tag=wayne-ug] + +<<< + +== Contributions to the Developer Guide + +|=== +|_Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project._ +|=== + +include::../DeveloperGuide.adoc[tag=wayne-ug] + diff --git a/docs/team/yjskrs.adoc b/docs/team/yjskrs.adoc new file mode 100644 index 00000000000..76175bf771c --- /dev/null +++ b/docs/team/yjskrs.adoc @@ -0,0 +1,66 @@ += Zhu Yijie - Project Portfolio +:site-section: AboutUs +:imagesDir: ../images +:stylesDir: ../stylesheets + +== PROJECT: iGrad +image::../images/Ui.png[] + +== Overview + +iGrad is a desktop module management and graduation tracking application. The user interacts with it using a CLI, and it has a GUI created with JavaFX, FXML and CSS. + +== Summary of contributions + +* *Major enhancement*: Added the *architecture for requirements and integrating the requirement feature with the course and module features*. +** _What it does_: Provides the requirement structure where modules can be assigned to, to keep track of the progress of a requirement. +** _Justification_: This feature is crucial in providing the ability for users to keep track of their graduation status through smaller categories known as requirements, instead of directly under a course. +** _Highlights_: This enhancement greatly increases the usability of the application because it makes course completion easier to track. It was also difficult to integrate this together with the course feature and the module feature since the code for this feature had to be written from scratch. +** _Credits_: The original Address Book 3 code which I referenced from the AddressBook structure as well as the Person structure to create this feature. + +* *Major enhancement*: Added the *ability to add, edit and delete requirements*. +** _What it does_: Allows the user to add, edit and delete requirements. +** _Justification_: This feature improves the product significantly because it provides the flexibility for users to add their own requirement categories, edit them, and delete them if no longer needed. +** _Highlights_: Ensured that all the requirement properties, such as credits, are up-to-date after every command. The feature initially prioritized efficiency over modularity, but this caused issues as new requirement instances required manual calculations of the properties, prompting the change to a more modular implementation of the code. +** _Credits_: The original Address Book 3 code which I referenced to create the commands. + +* *Minor enhancement*: Added the *ability to keep track of requirements being fulfilled*. + +* *Code contributed*: [https://github.com/AY1920S2-CS2103T-F09-3/main/commits?author=yjskrs[All commits]] [https://nus-cs2103-ay1920s2.github.io/tp-dashboard/#=undefined&search=yjskrs[Project Code Dashboard]] + +* *Contribution to Team Based Tasks*: +** Refactored the entire Address Book 3 into iGrad at the initial stage, while making sure the tests still pass so that my teammates can work on the refactored code without any issues. +** Managed the issue tracker throughout the semester, helping the team add issues and document bugs found along the way. +** Helped set up Coveralls and Codacy for the team. + +* *Other contributions*: + +** Project management: +*** Wrote the first draft of the User Guide with all the commands that our application would use. This was crucial in setting the direction of our application. +*** In charge of delegation of work and ensuring that the team completes their work on time. +*** Managed the issue tracker to reflect project progress at least once a week, assigning issues or bugs to the relevant teammate and closing issues when they have been resolved. + +** Community: +*** PRs reviewed: https://github.com/AY1920S2-CS2103T-F09-3/main/pull/89[#89], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/110[#110], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/160[#160], https://github.com/AY1920S2-CS2103T-F09-3/main/pull/170[#170] +*** Reported bugs and suggestions for other teams in the class (examples: https://github.com/nus-cs2103-AY1920S2/addressbook-level3/pull/18#pullrequestreview-370037005[#18], https://github.com/nus-cs2103-AY1920S2/addressbook-level3/pull/45#pullrequestreview-382526605[#45]) + +== Contributions to the User Guide +|=== +_Given below are the sections I contributed to the User Guide. They showcase my ability to communicate with end-users +of the product in question._ +|=== + +include::../UserGuide.adoc[tag=command-yjskrs] +include::../UserGuide.adoc[tag=requirement-yjskrs] + +<<< + +== Contributions to the Developer Guide + +|=== +|_Given below are the sections I contributed to the Developer Guide. They showcase my ability to communicate technical +information into documentation as well as my contributions to the project._ +|=== + +include::../DeveloperGuide.adoc[tag=requirement-yijie] + diff --git a/docs/templates/_header.html.slim b/docs/templates/_header.html.slim index 3c2d5aed43c..c8268f89010 100644 --- a/docs/templates/_header.html.slim +++ b/docs/templates/_header.html.slim @@ -49,7 +49,7 @@ #header - if has_header? - unless notitle - h1 =header.title + h1 =header.name - if [:author, :revnumber, :revdate, :revremark].any? {|a| attr? a } .details - if attr? :author diff --git a/docs/templates/document.html.slim b/docs/templates/document.html.slim index 3e1961d4afa..7fcc439eb3c 100644 --- a/docs/templates/document.html.slim +++ b/docs/templates/document.html.slim @@ -12,7 +12,7 @@ html lang=(attr :lang, 'en' unless attr? :nolang) = html_meta_if 'copyright', (attr :copyright) = html_meta_if 'description', (attr :description) = html_meta_if 'keywords', (attr :keywords) - title=((doctitle sanitize: true) || (attr 'untitled-label')) + name=((doctitle sanitize: true) || (attr 'untitled-label')) = styles_and_scripts - unless (docinfo_content = docinfo).empty? =docinfo_content diff --git a/docs/tutorials/AddRemark.adoc b/docs/tutorials/AddRemark.adoc index ea388068303..4d8511c699d 100644 --- a/docs/tutorials/AddRemark.adoc +++ b/docs/tutorials/AddRemark.adoc @@ -16,7 +16,7 @@ toc::[] In this tutorial, we'll walk you through the implementation of a new command -- `remark`. -This command allows users of the AddressBook application to add optional remarks to people in their address book and edit it if required. +This command allows users of the CourseBook application to add optional remarks to people in their courseInfo book and edit it if required. The command should have the format of `remark INDEX r/REMARK`. An example of the command is `remark 2 r/Likes baseball`. @@ -28,7 +28,7 @@ Looking in the `logic.command` package, you will notice that each existing comma All the commands inherit from the abstract class `Command` which means that they must override `execute()`. Each `Command` returns an instance of `CommandResult` upon success and `CommandResult#feedbackToUser` is printed to the `ResultDisplay`. -Let's start by creating a new `RemarkCommand` class in the `src/main/java/seedu/address/logic/command` directory. +Let's start by creating a new `RemarkCommand` class in the `src/main/java/igrad/logic/command` directory. For now, let's keep `RemarkCommand` as simple as possible and print some output. We accomplish that by returning a `CommandResult` with an accompanying message. @@ -36,12 +36,12 @@ We accomplish that by returning a `CommandResult` with an accompanying message. .RemarkCommand.java [source, java] ---- -package seedu.address.logic.commands; +package igrad.logic.commands; -import seedu.address.model.Model; +import igrad.model.Model; /** - * Changes the remark of an existing person in the address book. + * Changes the remark of an existing module in the courseInfo book. */ public class RemarkCommand extends Command { @@ -82,8 +82,8 @@ Following the convention in other commands, we add relevant messages as constant .RemarkCommand.java [source, java] ---- - public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the person identified " - + "by the index number used in the last person listing. " + public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the remark of the module identified " + + "by the index number used in the last module listing. " + "Existing remark will be overwritten by the input.\n" + "Parameters: INDEX (must be a positive integer) " + "r/ [REMARK]\n" @@ -110,7 +110,7 @@ While this is not a replacement for tests, it is an obvious way to tell if our c [source, java] ---- -import static seedu.address.commons.util.CollectionUtil.requireAllNonNull; +import static igrad.commons.util.CollectionUtil.requireAllNonNull; //... public class RemarkCommand extends Command { //... @@ -120,8 +120,8 @@ public class RemarkCommand extends Command { private final String remark; /** - * @param index of the person in the filtered person list to edit the remark - * @param remark of the person to be updated to + * @param index of the module in the filtered module list to edit the remark + * @param remark of the module to be updated to */ public RemarkCommand(Index index, String remark) { requireAllNonNull(index, remark); @@ -160,8 +160,8 @@ Your code should look something like link:https://github.com/nus-cs2103-AY1920S1 Now let's move on to writing a parser that will extract the index and remark from the input provided by the user. -Create a `RemarkCommandParser` class in the `seedu.address.logic.parser` package. -The class must implement the `Parser` interface. +Create a `RemarkCommandParser` class in the `igrad.logic.parser` package. +The class must extend the `Parser` interface. .The relationship between Parser and RemarkCommandParser image::ParserInterface.png[] @@ -245,13 +245,13 @@ If you are stuck, check out the sample link:https://github.com/nus-cs2103-AY1920 == Add `Remark` to the model Now that we have all the information that we need, let's lay the groundwork for some _persistent_ changes. -We achieve that by working with the `Person` model. -Each field in a Person is implemented as a separate class (e.g. a `Name` object represents the person's name). -That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a person. +We achieve that by working with the `Module` model. +Each field in a Module is implemented as a separate class (e.g. a `Name` object represents the module's name). +That means we should add a `Remark` class so that we can use a `Remark` object to represent a remark given to a module. === Add a new `Remark` class -Create a new `Remark` in `seedu.address.model.person`. Since a `Remark` is a field that is similar to `Address`, we can reuse a significant bit of code. +Create a new `Remark` in `igrad.model.module`. Since a `Remark` is a field that is similar to `Module`, we can reuse a significant bit of code. A copy-paste and search-replace later, you should have something like link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/b7a47c50c8e5f0430d343a23d2863446b6ce9298#diff-af2f075d24dfcd333876f0fbce321f25[this]. Note how `Remark` has no constrains and thus does not require input validation. @@ -263,17 +263,17 @@ These should be relatively simple changes. == Add a placeholder element for remark to the UI -Without getting too deep into `fxml`, let's go on a 5 minute adventure to get some placeholder text to show up for each person. +Without getting too deep into `fxml`, let's go on a 5 minute adventure to get some placeholder text to show up for each module. Simply add [source, java] -.PersonCard.java +.ModuleCard.java ``` @FXML private Label remark; ``` -to link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/2758455583f0101ed918a318fc75679270843a0d#diff-0c6b6abcfac8c205e075294f25e851fe[`seedu.address.ui.PersonCard`]. +to link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/2758455583f0101ed918a318fc75679270843a0d#diff-0c6b6abcfac8c205e075294f25e851fe[`igrad.ui.ModuleCard`]. `@FXML` is an annotation that marks a private or protected field and makes it accessible to FXML. It might sound like Greek to you right now, don't worry -- we will get back to it later. @@ -313,22 +313,22 @@ Let's update `JsonAdaptedPerson` to work with our new `Person`! While the changes to code may be minimal, the test data will have to be updated as well. -WARNING: You must delete AddressBook's storage file located at `/data/addressbook.json` before running it! -Not doing so will cause AddressBook to default to an empty address book! +WARNING: You must delete CourseBook's storage file located at `/data/coursebook.json` before running it! +Not doing so will cause CourseBook to default to an empty courseInfo book! Check out link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/ce4f9b70f524d2395948861d80d57fda9ae6e82e#diff-07708562699e2436c717f3330bafae1e[this commit] to see what the changes entail. == Finalizing the UI -Now that we have finalized the `Person` class and its dependencies, we can now bind the `Remark` field to the UI. +Now that we have finalized the `Module` class and its dependencies, we can now bind the `Remark` field to the UI. Just add link:https://github.com/nus-cs2103-AY1920S1/addressbook-level3/commit/56d5cb662c31dd38b02f6a5301ba6ab3c667d6a3#diff-0c6b6abcfac8c205e075294f25e851fe[this one line of code!] [source, java] -.PersonCard.java +.ModuleCard.java ---- -public PersonCard(Person person, int displayedIndex) { +public ModuleCard(Module module, int displayedIndex) { //... - remark.setText(person.getRemark().value); + remark.setText(module.getRemark().value); } ---- diff --git a/docs/tutorials/RemovingFields.adoc b/docs/tutorials/RemovingFields.adoc index 5a50b6965a6..234383bdb60 100644 --- a/docs/tutorials/RemovingFields.adoc +++ b/docs/tutorials/RemovingFields.adoc @@ -13,10 +13,10 @@ endif::[] Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. == Introduction -When working on Address Book, you will most likely find that some features and fields that are no longer necessary. -In scenarios like this, you can consider refactoring the existing `Person` model to suit your use case. +When working on Course Book, you will most likely find that some features and fields that are no longer necessary. +In scenarios like this, you can consider refactoring the existing `Module` model to suit your use case. -In this tutorial, we'll do exactly just that and remove the `address` field from `Person`. +In this tutorial, we'll do exactly just that and remove the `memo` field from `Module`. == Safely deleting `Address` @@ -24,68 +24,68 @@ Fortunately, the IntelliJ IDEA provides a robust refactoring tool that can ident Let's try to use it as much as we can. === Assisted refactoring -The `address` field in `Person` is actually an instance of the `seedu.address.model.person.Address` class. -Since removing the `Address` class will break the application, we start by identifying ``Address``'s usages. -This allows us to see code that depends on `Address` to function properly and edit them on a case-by-case basis. -Right-click the `Address` class and select `Refactor` > `Safe Delete` through the menu. +The `memo` field in `Module` is actually an instance of the `igrad.model.module.Memo` class. +Since removing the `Memo` class will break the application, we start by identifying ``Memo``'s usages. +This allows us to see code that depends on `Memo` to function properly and edit them on a case-by-case basis. +Right-click the `Memo` class and select `Refactor` > `Safe Delete` through the menu. .Usages detected image::UnsafeDelete.png[width=787px. height=238px] Choose to `View Usages` and you should be presented with a list of `Safe Delete Conflicts`. -These conflicts describe locations in which the `Address` class is used. +These conflicts describe locations in which the `Memo` class is used. .List of conflicts image::SafeDeleteConflicts.png[width=955, height=640px] -Remove usages of `Address` by performing ``Safe Delete``s on each entry. -You will need to exercise discretion when removing usages of `Address`. +Remove usages of `Memo` by performing ``Safe Delete``s on each entry. +You will need to exercise discretion when removing usages of `Memo`. Functions like `ParserUtil#parseAddress()` can be safely removed but its usages must be removed as well. -Other usages like in `EditPersonDescriptor` may require more careful inspection. +Other usages like in `EditModuleDescriptor` may require more careful inspection. -Let's try removing references to `Address` in `EditPersonDescriptor`. +Let's try removing references to `memo` in `EditModuleDescriptor`. -. Safe delete the field `address` in `EditPersonDescriptor` +. Safe delete the field `memo` in `EditModuleDescriptor` . Select `Yes` when prompted to remove getters and setters . Select `View Usages` again image:UnsafeDeleteOnField.png[width=1145px, height=583px] -. Remove the usages of `address` and select `Do refactor` when you are done. +. Remove the usages of `memo` and select `Do refactor` when you are done. + TIP: Removing usages may result in errors. Exercise discretion and fix them. -For example, removing the `address` field from the `Person` class will require you to modify its constructor. +For example, removing the `memo` field from the `Module` class will require you to modify its constructor. -. Repeat the steps for the remaining usages of `Address` +. Repeat the steps for the remaining usages of `Memo` After you are done, verify that the application still works by compiling and running it again. === Manual refactoring -Unfortunately, there are usages of `Address` that IntelliJ IDEA cannot identify. -You can find them by searching for instances of the word `address` in your code (`Edit` > `Find` > `Find in path`). +Unfortunately, there are usages of `Memo` that IntelliJ IDEA cannot identify. +You can find them by searching for instances of the word `memo` in your code (`Edit` > `Find` > `Find in path`). Places of interest to look out for would be resources used by the application. `main/resources` contains images and `fxml` files used by the application and `test/resources` contains test data. -For example, there is a `$address` in each `PersonCard` that has not been removed nor identified. +For example, there is a `$memo` in each `ModuleCard` that has not been removed nor identified. -image::$address.png[width=1090px, height=890px] +image::$memo.png[width=1090px, height=890px] -A quick look at the `PersonCard` class and its `fxml` file quickly reveals why it slipped past the automated refactoring. +A quick look at the `ModuleCard` class and its `fxml` file quickly reveals why it slipped past the automated refactoring. -.PersonCard.java +.ModuleCard.java [source, java] ---- ... @FXML -private Label address; +private Label memo; ... ---- -.PersonCard.fxml +.ModuleCard.fxml [source, xml] ---- ...