diff --git a/.gitignore b/.gitignore index 5e59b862ba4..2d92e5e3006 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/ 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..aae81592200 100644 --- a/README.adoc +++ b/README.adoc @@ -1,11 +1,10 @@ -= Address Book (Level 3) += iGrad ifdef::env-github,env-browser[:relfileprefix: docs/] -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://ci.appveyor.com/project/AY1920S2-CS2103T-F09-3/main[image:https://ci.appveyor.com/api/projects/status/3boko2x2vr5cc3w2?svg=true[Build status]] +https://coveralls.io/github/AY1920S2-CS2103T-F09-3/main?branch=master[image:https://coveralls.io/repos/github/se-edu/addressbook-level3/badge.svg?branch=master[Coverage Status]] +https://www.codacy.com/app/AY1920S2-CS2103T-F09-3/main?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]] ifdef::env-github[] image::docs/images/Ui.png[width="600"] @@ -15,9 +14,24 @@ 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 @@ -29,8 +43,4 @@ endif::[] == 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] - -== Licence : link:LICENSE[MIT] +This project was built on top of Address Book 4 by the https://se-education.org/[SE-Education team] diff --git a/README.md b/README.md new file mode 100644 index 00000000000..33e401de2ff --- /dev/null +++ b/README.md @@ -0,0 +1,436 @@ +# iGrad +> A handy guide to help you make the most of your application + +## Table of Contents + +1. [Introduction](#Introduction) +2. [Features](#Features) + + 2.1 [Course Builder](#courseInfo-builder) + + 2.2 [Modular Credits Tracker](#modular-credits-mcs-tracker) + + 2.3 [Cumulative Average Point Tracker](#cumulative-average-point-cap-tracker) + +3. [Components](#Components) + + 3.1 [Course](#courses) + + 3.2 [Requirements](#requirements) + + 3.3 [Modules](#modules) + +4. [Walkthrough](#walkthrough) +5. [Command List](#command-list) + + 5.1.[`help`](#help) + + 5.2 [`courseInfo`](#courseInfo) + + 5.3 [`requirement`](#requirements) + + 5.4 [`module`](#module) + + 5.5 [`assign`](#assign) + + 5.6 [`exam`](#exam) + + 5.7 [`achieve`](#achieve) + + 5.8 [`export`](#export) + + 5.9 [`exit`](#exit) + +6. [Frequently Asked Questions (FAQ)](#faqs) +7. [Cheat Sheet](#cheat-sheet) +8. [Glossary](#glossary) + +--- + +## Introduction + +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 [NUS Mods](https://nusmods.com), 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. + +## Features + +#### Course Builder +iGrad was built with every NUS student in mind. Our custom courseInfo builder allows you to build +the courseInfo of your dreams. + +#### Modular Credits (MCs) Tracker +We are sick of counting our MCs at the beginning of every semester too. Easily see how many MCs you +have left in order to apply for graduation. + +#### Cumulative Average Point (CAP) Tracker +No more googling CAP calculators. iGrad's CAP tracker keeps track of your CAP at every step and +even offers predictive services so you know how well you have to do +in order to achieve your dream Cumulative Point Average (CAP). + +## Components + +**Figure 1** +![](https://user-images.githubusercontent.com/34233605/75425925-9774ff80-597e-11ea-87f5-228f95b5c84f.png) + +#### Courses +A courseInfo is simply a group of requirements. It is also how we keep track of your overall CAP +and MCs. + +#### Requirements +A requirement consists of at least one module. Fulfill all modules within a requirement to +complete it. + +#### Modules +A module is the building block of all other components. Mark your modules as done and give it +a grade. You can also add optional memos to help you remember why +you took the module. + +## Walkthrough + +#### 1. Start up the application + +Double-click the .jar file to get started right away! + +#### 2. Enter your courseInfo details + +![](https://user-images.githubusercontent.com/34233605/75436477-9dbfa780-598f-11ea-9076-8d4e4e09c8bc.png) + +#### 3. Key in your graduation requirements + +![](https://user-images.githubusercontent.com/34233605/75436492-a1ebc500-598f-11ea-91f1-94509bce253e.png) + +#### 4. Assign your modules + +#### 5. Mark a module as done + +![](https://user-images.githubusercontent.com/34233605/75436503-a57f4c00-598f-11ea-9902-a912ce16815e.png) + +#### 6. Key in a memo + +#### 7. Track your MCs + +#### 8. View your CAP + +![](https://user-images.githubusercontent.com/34233605/75436570-bdef6680-598f-11ea-887b-16279de675e6.png) + +#### 9. Run batch commands + +#### 10. Export your data + +![](https://user-images.githubusercontent.com/34233605/75436540-b4fe9500-598f-11ea-814d-ed3a0bbf5c6a.png) + +## Command List + +#### `help` + +Displays a help message to the user. Lists all possible commands +and provides a link to the user guide online. + +Command Format + + help + +Constraints + +:warning: NIL + +Expected Outcome + +:white_check_mark: A help message should be displayed + +--- + +#### `courseInfo` + +Creates a courseInfo. (TODO: Add in modify and remove) + +Command Format + + +Command Sample + + /* + * Creating a courseInfo named "Computer Science" + */ + courseInfo add n/Computer Science + +Constraints + +:warning: You can only have one courseInfo at a time + +Expected Outcome + +:white_check_mark: You should be able to see the courseInfo title in the +top panel + courseInfo add n/COURSE_NAME + +--- + +#### `requirement` + +Creates a graduation requirement. (TODO: Add in modify and remove) + +Command Format + + requirement add n/REQUIREMENT_NAME u/NO_OF_MCS + +Command Sample + + /** + * Creating a requirement named "Unrestricted Electives" + * which requires 32 MCs to fulfill + */ + requirement add n/Unrestricted Electives u/32 + +Constraints + +:warning: The number of MCs needed to fulfill the requirement is needed + +:warning: Requirement names have to be unique + +Expected Outcome + +:white_check_mark: You should be able to see the requirement title in the +main panel + +--- + +#### `module` + +Creates a module with semester, grade or memo notes information. (TODO: Add in modify and remove) + +Command Format + + /** + * At least one option must be specified. + * SEMESTER is specified in format Y_S_ ( e.g. Y1S2 - Year 1 Semester 2 ) + */ + module add n/MODULE_CODE [n/MODULE_TITLE] [u/MCs] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES] + +Command Sample + + /** + * Tags CS1101 with "Y1S2" and grade "A+" + */ + module add n/CS1101 s/Y1S2 g/A+ + + /** + * Tags ST2234 with "Y2S1" and gives it a memo "pretty easy module" + */ + module add n/ST2334 s/Y2S1 m/pretty easy module + +Constraints + +:warning: The module has to be assigned + +Expected Outcome + +:white_check_mark: The tags (if any) should appear under their respective column headers + +--- + +#### `assign` + +Assigns a module to a graduation requirement. If there is good internet +connectivity, the module will be validated with NUSMods and its description +will be auto-filled. + +Command Format + + /** + * DESCRIPTION is optional + */ + assign REQUIREMENT_NAME n/MODULE_CODE + +Command Sample + + /** + * Assigns module "LAJ1201" (Japanese 1) + * to requirement "Unrestricted Electives" + */ + assign Unrestricted Electives n/LAJ1201 + +Constraints + +:warning: A module cannot be assigned if there are not enough MCs left under +a graduation requirement + +:warning: The module code and title have to be unique + +Expected Outcome + +:white_check_mark: The module will be displayed in the main panel + + +--- + +#### `exam` + +View your examination results. + +Command Format + + /** + * SEMESTER is optional. + * If not specified, displays results for all tags. + */ + exam s/SEMESTER + +Command Sample + + /** + * Displays exam results for Year 3 Semester 2 + */ + exam s/Y3S2 + +Constraints + +:warning: NIL + +Expected Outcome + +:white_check_mark: You should be able to view your exam results + +--- + +#### `achieve` + +Calculates the average grade needed to achieve the CAP you desire/ + +Command Format + + achieve c/DESIRED_CAP + +Command Sample + + /** + * Calculates the avergae grade needed + * to achieve a CAP of 4.50 + */ + achieve c/4.50 + +Constraints + +:warning: NIL + +Expected Outcome + +:white_check_mark: You should be able to view the average grade needed to achieve +the CAP you desire + +--- +#### `export` + +Exports all data in a text file. If information is sufficient, +this file can be submitted to NUS as a study plan. + +Command Format + + export + +Constraints + +:warning: NIL + +Expected Outcome + +:white_check_mark: A text file "study_plan.txt" should be generated in +the same folder as the iGrad application. + +--- + +#### `exit` + +Exits the program + +Command Format + + exit + +Constraints + +:warning: NIL + +Expected Outcome + +:white_check_mark: The application should exit. + + ## FAQs + +*I'm not an NUS student. Can I still use iGrad?* + +As long as your university follows a similar [hierachical structure](#fig-1)! +However, we will be unable to provide features such as validation from NUS Mods. + +## Cheat Sheet + +> This segment contains all the commands detailed in this guide in a consolidated list + +`help` + +`courseInfo add n/COURSE_NAME` + +`courseInfo modify n/NEW_COURSE_NAME` + +`courseInfo remove` + +`requirement add n/REQUIREMENT_NAME u/NO_OF_MCS` + +`requirement modify REQUIREMENT_NAME [n/REQUIREMENT_NAME] [u/NO_OF_MCS]` + +`requirement remove REQUIREMENT_NAME` + +`module add n/MODULE_CODE [n/MODULE_TITLE] [u/MCs] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES]` + +`module modify MODULE_CODE [n/MODULE_CODE] [n/MODULE_TITLE] [u/MCs] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES]` + +`module remove MODULE_CODE` + +`assign REQUIREMENT_NAME n/MODULE_CODE` + +`exam s/SEMESTER` + +`achieve c/DESIRED_CAP` + +`export` + +`exit` + + ## Glossary + +| | | +| ------------- |------------- | +|Course |A courseInfo 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. | +|NUS Mods |A timetabling application built for NUS students, by NUS students. Much like this iGrad! | +| | | + +**Handy Links** + +[NUS - Modular System](http://www.nus.edu.sg/registrar/academic-information-policies/graduate/modular-system) + +[NUS - Degree Requirements](http://www.nus.edu.sg/registrar/academic-information-policies/undergraduate-students/degree-requirements) + +[NUS - Grading System and Regulations](http://www.nus.edu.sg/nusbulletin/yong-siew-toh-conservatory-of-music/undergraduate-education/degree-requirements/grading-system-and-regulations/) + +[NUS - Academic Calendar](http://www.nus.edu.sg/registrar/calendar) diff --git a/build.gradle b/build.gradle index 93029ef8262..b5e1bd1346d 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ plugins { } // Specifies the entry point of the application -mainClassName = 'seedu.address.Main' +mainClassName = 'igrad.Main' sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11 @@ -44,7 +44,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 +67,7 @@ dependencies { } shadowJar { - archiveName = 'addressbook.jar' + archiveName = 'igrad.jar' destinationDir = file("${buildDir}/jar/") } @@ -133,8 +133,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/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..3bc56fd313a 100644 --- a/docs/DevOps.adoc +++ b/docs/DevOps.adoc @@ -1,7 +1,7 @@ = AddressBook Level 3 - Dev Ops :site-section: DeveloperGuide :toc: -:toc-title: +:toc-name: :toc-placement: preamble :sectnums: :imagesDir: images @@ -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..6e6160dc07b 100644 --- a/docs/DeveloperGuide.adoc +++ b/docs/DeveloperGuide.adoc @@ -1,7 +1,7 @@ -= AddressBook Level 3 - Developer Guide += iGrad - Developer Guide :site-section: DeveloperGuide :toc: -:toc-title: +:toc-name: :toc-placement: preamble :sectnums: :imagesDir: images @@ -14,7 +14,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 @@ -28,13 +28,15 @@ Refer to the guide <>. .Architecture Diagram image::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,19 +46,20 @@ 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[] @@ -66,7 +69,7 @@ image::LogicClassDiagram.png[] 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 +.Component interactions for `module delete CS1010` command image::ArchitectureSequenceDiagram.png[] The sections below give more details of each component. @@ -77,11 +80,14 @@ The sections below give more details of each component. .Structure of the UI Component image::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. +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/seedu/address/ui/MainWindow.java[`MainWindow`] is specified in link:{repoURL}/src/main/resources/view/MainWindow.fxml[`MainWindow.fxml`] +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, @@ -96,20 +102,20 @@ The `UI` component, image::LogicClassDiagram.png[] *API* : -link:{repoURL}/src/main/java/seedu/address/logic/Logic.java[`Logic.java`] +link:{repoURL}/src/main/java/igrad/logic/Logic.java[`Logic.java`] -. `Logic` uses the `AddressBookParser` class to parse the user command. -. This results in a `Command` object which is executed by the `LogicManager`. -. The command execution can affect the `Model` (e.g. adding a person). -. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`. -. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user. +. `Logic` uses the `CourseBookParser` class to parse the user command. +. This results in a `Command` object which is executed by the `LogicManager`. +. The command execution can affect the `Model` (e.g. adding a module). +. The result of the command execution is encapsulated as a `CommandResult` object which is passed back to the `Ui`. +. In addition, the `CommandResult` object can also instruct the `Ui` to perform certain actions, such as displaying help to the user. Given below is the Sequence Diagram for interactions within the `Logic` component for the `execute("delete 1")` API call. .Interactions Inside the Logic Component for the `delete 1` Command image::DeleteSequenceDiagram.png[] -NOTE: The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. +NOTE: The lifeline for `ModuleDeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram. [[Design-Model]] === Model component @@ -117,17 +123,20 @@ NOTE: The lifeline for `DeleteCommandParser` should end at the destroy marker (X .Structure of the Model Component image::ModelClassDiagram.png[] -*API* : link:{repoURL}/src/main/java/seedu/address/model/Model.java[`Model.java`] +*API* : link:{repoURL}/src/main/java/igrad/model/Model.java[`Model.java`] The `Model`, * stores a `UserPref` object that represents the user's preferences. -* stores the Address 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. +* 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[] @@ -137,59 +146,179 @@ image:BetterModelClassDiagram.png[] .Structure of the Storage Component image::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[] +=== Course Feature + +A `CourseBook` contains only one course information. + +==== Implementation + +.Structure of CourseInfo Class +image::CourseInfoClassDiagram.png[] +A course consists of three information: Name, CAP, and SemsLeft. One course should only have one name, +and one CAP. + +The course related commands that can be called are: + +* `course edit` - edits name of existing course in the course book +* `course delete` - deletes existing course and all information in the course book +* `course achieve` - calculates CAP needed to maintain each semester to achieve overall CAP targer + +Here is how the courseInfo class updates when name of course is edited: + +.Sequence Diagram when editing course name. +image::CourseEditSequenceDiagram.png[] +When a user edits name of a course, the user has to specify the prefix `/n` for name. +Then the application proceeds to do the following steps: + +Step 1: The CourseEditCommandParser is called to parse the CourseEditCommand with the n/ prefix. + +Step 2: The CourseEditCommand is executed to set the new course name to the model. + +Step 3: The new course name is set in the course book. + +=== Adding Modules from NUS Mods + +==== 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` in order to make a request to link:https://nusmods.com/[NUSMods]. +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: + +* `title` e.g. Software Engineering +* `moduleCode` e.g. CS2103T +* `credits` e.g. 4 +* `description` e.g. This module introduces the necessary conceptual and analytical tools for systematic and rigorous development of software systems... + +The above process is initiated by `AddAutoCommandParser` which then converts a `JsonParsedModule` instance to a `Module`. + +The sequence diagram below provide further insight into its execution: + +image::AutoAddSequenceDiagram.png[] + +As NUSMods might not always have the latest data for the current academic year, a follow up request is made when an empty response is received. + +The following activity diagram illustrates this: + +image::AutoAddActivityDiagram.png[] + +==== Design Considerations + +As with all network requests, this feature might not work as intended in certain circumstances. Possible cases are: + +[start=1] +1. High Network Congestion +2. Poor Network Connection +3. NUSMods Offline + +In such situations, the user would be prompted to manually fill in the necessary details for a module. The compulsory +and optional fields are shown in the class diagram below: + +image::ModuleClassDiagram.png[] + +**Pros** + +1. Time taken to add a module with accurate `moduleCode`, `title` and `credits` is reduced by a factor of **0.85** (statistic derived from user trials). + +**Cons** + +1. Successful addition of module is not always guaranteed. + +=== Requirements Feature +Within a course, there are multiple requirements to be tracked. + +==== Implementation +.The Requirement class + +.Structure of the Requirement class. +image::RequirementClassDiagram.png[] +A requirement consists of three components: title, credits and unique module list. +The unique module list implies that each requirement stores modules assigned to that requirement. +Multiple requirements can exist in the course book at any one time. + +The requirement-related commands that can be called 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 +* `assign` - assigns a module to the requirement + +Here is how the requirement class updates when a requirement is added: + +.Sequence Diagram when adding a requirement. +image::RequirementAddSequenceDiagram.png[] + +When the user adds a requirement, the user has to specify two prefixes: `n/` for title and `u/` for credits value (number of credits needed to fulfill for the requirement). +Then, the application proceeds to do the following steps + +Step 1: The RequirementAddCommandParser is called to parse the RequirementAddCommand with the `n/` and the `u/` prefixes into a new requirement. + +Step 2: The RequirementAddCommand is executed to add the new requirement to the model. In this step, the following check is performed: + +* Check if a requirement with the same title already exists in the course book. + +Step 3: The new requirement is added to the course book. + === [Proposed] Undo/Redo feature + ==== Proposed Implementation -The undo/redo mechanism is facilitated by `VersionedAddressBook`. -It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. +The undo/redo mechanism is facilitated by `VersionedCourseBook`. +It extends `CourseBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations: -* `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. +* `VersionedCourseBook#commit()` -- Saves the current course book state in its history. +* `VersionedCourseBook#undo()` -- Restores the previous course book state from its history. +* `VersionedCourseBook#redo()` -- Restores a previously undone course book state from its history. -These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively. +These operations are exposed in the `Model` interface as `Model#commitCourseBook()`, `Model#undoCourseBook()` and `Model#redoCourseBook()` respectively. Given below is an example usage scenario and how the undo/redo mechanism behaves at each step. -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. +Step 1. The user launches the application for the first time. +The `VersionedCourseBook` will be initialized with the initial course book state, and the `currentStatePointer` pointing to that single memo book state. 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. +<<<<<<< HEAD Step 2. The user executes `delete 5` command to delete the 5th module in the course book. +The `delete` command calls `Model#commitCourseBook()`, causing the modified state of the course book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted course book state. image::UndoRedoState1.png[] -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`. +Step 3. The user executes `add n/David ...` to add a new module. +The `add` command also calls `Model#commitCourseBook()`, causing another modified address course book state to be saved into the `addressBookStateList`. image::UndoRedoState2.png[] [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`. +If a command fails its execution, it will not call `Model#commitCourseBook()`, so the course book state will not be saved into the `addressBookStateList`. -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. +Step 4. The user now decides that adding the module was a mistake, and decides to undo that action by executing the `undo` command. +The `undo` command will call `Model#undoCourseBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous course book state, and restores the course book to that state. image::UndoRedoState3.png[] [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. +If the `currentStatePointer` is at index 0, pointing to the initial course book state, then there are no previous course book states to restore. +The `undo` command uses `Model#canUndoCourseBook()` to check if this is the case. +If so, it will return an error to the user rather than attempting to perform the undo. The following sequence diagram shows how the undo operation works: @@ -197,16 +326,23 @@ image::UndoSequenceDiagram.png[] 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. -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 `redo` command does the opposite -- it calls `Model#redoCourseBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the course book to that state. [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. +If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest course book state, then there are no undone course book states to restore. +The `redo` command uses `Model#canRedoCourseBook()` to check if this is the case. +If so, it will return an error to the user rather than attempting to perform the redo. -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. +Step 5. The user then decides to execute the command `list`. +Commands that do not modify the course book, such as `list`, will usually not call `Model#commitCourseBook()`, `Model#undoCourseBook()` or `Model#redoCourseBook()`. +Thus, the `addressBookStateList` remains unchanged. image::UndoRedoState4.png[] -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. +Step 6. The user executes `clear`, which calls `Model#commitCourseBook()`. +Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all course 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. image::UndoRedoState5.png[] @@ -218,21 +354,23 @@ image::CommitActivityDiagram.png[] ===== Aspect: How undo & redo executes -* **Alternative 1 (current choice):** Saves the entire address book. +* **Alternative 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). +** 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 -* **Alternative 1 (current choice):** Use a list to store the history of address book states. +* **Alternative 1 (current choice):** Use a list to store the history of course 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`. +** Cons: Logic is duplicated twice. +For example, when a new command is executed, we must remember to update both `HistoryManager` and `VersionedCourseBook`. * **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. +** 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[] @@ -244,7 +382,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,86 +418,190 @@ 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 -|`* * *` |user |add a new person | +|`* * *` |fickle user |change the modules which I assigned to a graduation requirement |change my study plan -|`* * *` |user |delete a person |remove entries that I no longer need +|`* * *` |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 -|`* * *` |user |find a person by name |locate details of persons without having to go through the entire list +|`* * *` |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 |hide <> by default |minimize chance of someone else seeing them by accident +|`* * *` |user |see the latest updated information about any module |make informed decisions -|`*` |user with many persons in the address book |sort persons by name |locate a person easily +|`* * *` |basic user |mark when a module is completed | + +|`* * *` |basic user |input the grades of a module | + +|`* *` |basic user |retrieve my CAP of any semester at a command |stay updated about my results + +|`* *` |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 -(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. +[none] +* 1b. +Module has already been assigned to the requirement. +** 1b1. iGrad generates a warning and stops the assignment. ++ +Use case ends. + _{More to be added}_ [appendix] == 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] @@ -393,24 +636,26 @@ 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. @@ -421,5 +666,4 @@ _{ more test cases ... }_ . 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/Documentation.adoc b/docs/Documentation.adoc index ad90ac87bda..ac0e0e1ed93 100644 --- a/docs/Documentation.adoc +++ b/docs/Documentation.adoc @@ -1,7 +1,7 @@ = AddressBook Level 3 - Documentation :site-section: DeveloperGuide :toc: -:toc-title: +:toc-name: :toc-placement: preamble :sectnums: :imagesDir: images diff --git a/docs/LearningOutcomes.adoc b/docs/LearningOutcomes.adoc index 436c1777617..490921f741d 100644 --- a/docs/LearningOutcomes.adoc +++ b/docs/LearningOutcomes.adoc @@ -1,7 +1,7 @@ = Learning Outcomes :site-section: LearningOutcomes :toc: macro -:toc-title: +:toc-name: :toclevels: 1 :imagesDir: images :stylesDir: stylesheets @@ -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..a46b52eeb64 100644 --- a/docs/SettingUp.adoc +++ b/docs/SettingUp.adoc @@ -1,7 +1,7 @@ = AddressBook Level 3 - Setting Up :site-section: DeveloperGuide :toc: -:toc-title: +:toc-name: :toc-placement: preamble :sectnums: :imagesDir: images @@ -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..52b5aaeadca 100644 --- a/docs/Testing.adoc +++ b/docs/Testing.adoc @@ -1,7 +1,7 @@ = AddressBook Level 3 - Testing :site-section: DeveloperGuide :toc: -:toc-title: +:toc-name: :toc-placement: preamble :sectnums: :imagesDir: images @@ -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..043f8255452 100644 --- a/docs/UserGuide.adoc +++ b/docs/UserGuide.adoc @@ -1,4 +1,4 @@ -= AddressBook Level 3 - User Guide += iGrad - User Guide :site-section: UserGuide :toc: :toc-title: @@ -11,167 +11,419 @@ 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! +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! -== Quick Start +What is _iGrad_? -. 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"] -+ -. 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: +_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. -* *`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 +_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 -. Refer to <> for details of each command. +_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 which +will always be followed up on. + +== How to use this guide + +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. + +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. -[[Features]] == Features +____ +This segment highlights the key features of iGrad. +____ + +==== Course Builder + +iGrad was built with every NUS student in mind. Our custom course builder allows you to build +the course of your dreams. + +==== Modular Credits (MCs) Tracker + +We are sick of counting our MCs at the beginning of every semester. Easily see how many MCs you +have left in order to apply for graduation. + +==== Cumulative Average Point (CAP) Tracker + +No more googling CAP calculators. iGrad's CAP tracker keeps track of your CAP at every step and +even offers predictive services so you know how well you have to do +in order to achieve your dream CAP. + +== Components +____ +This segment contains details on the structure of iGrad. +____ + +image:https://user-images.githubusercontent.com/34233605/75425925-9774ff80-597e-11ea-87f5-228f95b5c84f.png[] + +==== Course + +A course is simply a group of requirements. It is also how we keep track of your overall CAP +and MCs. + +==== Requirements + +A requirement consists of at least one module. Fulfill all modules within a requirement to +complete it. + +==== Modules + +A module is the building block of all other components. Mark your modules as done and give it +a grade. You can also add optional memos to help you remember why +you took the module. + +== Walkthrough + +1. Start up the application + +2. Enter your course details + +3. Key in your graduation requirements + +4. Add modules to the tracker + +5. Assign your modules + +6. Key in additional details for your modules + +7. Mark a module as done and assign a grade to it + +8. Track your MCs + +9. View your CAP + +10. Export your data + +== Command List +____ +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] ==== -*Command Format* +1. None. +==== + +Expected Outcome +[NOTE] +You should be able to see the requirement created and/or edited in the main panel. + +''' + +==== module + +Add, edit or delete a module. You would be able to tag (edit) a module with information such as; semester, grade or memo notes information. + +Command Format + +---- +module add n/MODULE_CODE t/MODULE_TITLE u/MCs [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES] + +module edit MODULE_CODE [n/MODULE_CODE] [n/MODULE_TITLE] [u/MCs] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES] + +module delete MODULE_CODE + +module done MODULE_CODE g/GRADE +---- +Note: +[WARNING] +SEMESTER is specified in format Y_S_ ( e.g. Y1S2 - Year 1 Semester 2 ) + + +Command Sample + +Adding the module, CS2103T, with title "Software Engineering" and MCs "4". +---- +module add n/CS2103T t/Software Engineering u/4 +---- -* 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. +Tagging the module, CS1101, with "Y1S2" and grade "A+", and also renaming it to CS1101S. +---- +module edit n/CS1101 n/CS1101S s/Y1S2 g/A+ +---- + +Tagging the module, ST2234, with "Y2S1" and giving it a memo "pretty easy module". +---- +module edit n/ST2334 s/Y2S1 m/pretty easy module +---- + +Removing a module named "CS1101S". +---- +module delete n/CS1101S +---- + +Assigning grade 'A' to the module 'CS2103T'. +---- +module done CS2103T g/A +---- + +Constraints +[WARNING] +==== +1. `(module edit)` There must be enough MCs left under a graduation requirement (category) for all modules. +2. `(all)` The module code (e.g, CS1101S, ST2334), have to be unique ==== -=== Viewing help : `help` +Expected Outcome +[NOTE] +You should be able to see the modified module details reflected in the main panel + +''' + +==== export + +Exports all data in a (prettified) text file. If information is sufficient, +this file can be submitted to NUS as a study plan. + +Command Format + +---- +export +---- + +Expected Outcome +[NOTE] +A text file "study_plan.txt" should be generated in the same folder as the iGrad application. + +''' -Format: `help` +==== exit -=== Adding a person: `add` +Exits the program -Adds a person to the address book + -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]...` +Command Format -[TIP] -A person can have any number of tags (including 0) +---- +exit +---- -Examples: +Expected Outcome +[NOTE] +The application should exit -* `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` +_I'm not an NUS student. Can I still use iGrad?_ -Shows a list of all persons in the address book. + -Format: `list` +As long as your university follows a similar <>! +However, we will be unable to provide features such as validation from NUSMods. -=== Editing a person : `edit` +== Cheat Sheet -Edits an existing person in the address book. + -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]...` +____ -**** -* 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. -**** +This segment contains all the commands detailed in this guide in a consolidated list. -Examples: +____ -* `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. +`help` -=== Locating persons by name: `find` +`course add n/COURSE_NAME` -Finds persons whose names contain any of the given keywords. + -Format: `find KEYWORD [MORE_KEYWORDS]` +`course edit [n/COURSE_NAME] [u/MCs]` -**** -* 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` -**** +`course delete COURSE_NAME` -Examples: +`course achieve c/DESIRED_CAP` -* `find John` + -Returns `john` and `John Doe` -* `find Betsy Tim John` + -Returns any person having names `Betsy`, `Tim`, or `John` +`requirement add n/REQUIREMENT_TITLE u/MCS_REQUIRED` -// tag::delete[] -=== Deleting a person : `delete` +`requirement edit REQUIREMENT_CODE [n/REQUIREMENT_TITLE] [u/MCS_REQUIRED]` -Deletes the specified person from the address book. + -Format: `delete INDEX` +`requirement delete REQUIREMENT_CODE` -**** -* 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, ... -**** +`requirement assign REQUIREMENT_CODE [n/MODULE_CODE ...]` -Examples: +`module add n/MODULE_CODE n/MODULE_TITLE u/MCs [n/DESCRIPTION] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES]` -* `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. +`module edit MODULE_CODE [n/MODULE_CODE] [n/MODULE_TITLE] [n/DESCRIPTION] [u/MCs] [s/SEMESTER] [g/GRADE] [m/MEMO_NOTES]` -// end::delete[] -=== Clearing all entries : `clear` +`module delete MODULE_CODE` -Clears all entries from the address book. + -Format: `clear` +`module done MODULE_CODE g/GRADE` -=== Exiting the program : `exit` +`undo` -Exits the program. + -Format: `exit` +`export` -=== Saving the data +`exit` -Address book data are saved in the hard disk automatically after any command that changes the data. + -There is no need to save manually. +## Glossary -// tag::dataencryption[] -=== Encrypting data files `[coming in v2.0]` +|=== +|Terms |Definition -_{explain how the user can enable/disable data encryption}_ -// end::dataencryption[] +|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! +| | +|=== -== FAQ +*Handy Links* -*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. +http://www.nus.edu.sg/registrar/academic-information-policies/undergraduate-students/degree-requirements[NUS - Degree Requirements] -== Command Summary +http://www.nus.edu.sg/registrar/academic-information-policies/undergraduate-students/modular-system[NUS - Modular System, Grading and Regulations] -* *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` +http://www.nus.edu.sg/registrar/calendar[NUS - Academic Calendar] 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/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/AutoAddActivityDiagram.puml b/docs/diagrams/AutoAddActivityDiagram.puml new file mode 100644 index 00000000000..15eefac9a15 --- /dev/null +++ b/docs/diagrams/AutoAddActivityDiagram.puml @@ -0,0 +1,17 @@ +@startuml +start +:User executes command; + +'Since the beta syntax does not support placing the condition outside the +'diamond we place it as the true branch instead. + +:NusModsRequester makes a get request\nto NUSMods for current academic year; + +if () then([receive valid response]) +else([else]) +:NusModsRequester makes a get request\nto NUSMods for previous academic year; + +endif +:create Module with information in response; +stop +@enduml diff --git a/docs/diagrams/AutoAddSequenceDiagram.puml b/docs/diagrams/AutoAddSequenceDiagram.puml new file mode 100644 index 00000000000..8fa377fb7ef --- /dev/null +++ b/docs/diagrams/AutoAddSequenceDiagram.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/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/CourseEditSequenceDiagram.puml b/docs/diagrams/CourseEditSequenceDiagram.puml new file mode 100644 index 00000000000..7685a112f87 --- /dev/null +++ b/docs/diagrams/CourseEditSequenceDiagram.puml @@ -0,0 +1,58 @@ +@startuml +!include style.puml + +box Logic LOGIC_COLOR_T1 +participant ":LogicManager" as LogicManager LOGIC_COLOR +participant ":CourseBookParser" as CourseBookParser LOGIC_COLOR +participant ":CourseEditCommandParser" as CourseEditCommandParser LOGIC_COLOR +participant "r:CourseEditCommand" as CourseEditCommand 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(edit course) +activate LogicManager + +LogicManager -> CourseBookParser : parseCommand(edit course) +activate CourseBookParser + +create CourseEditCommandParser +CourseBookParser -> CourseEditCommandParser : new CourseEditCommandParser(\nname) +activate CourseEditCommandParser + +create CourseEditCommand +CourseEditCommandParser -> CourseEditCommand : new CourseEditCommand(\nname) +activate CourseEditCommand + +CourseEditCommand --> CourseEditCommandParser +CourseEditCommandParser --> CourseBookParser : r + +CourseBookParser --> LogicManager : r +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 + +CourseEditCommand --> LogicManager : result +deactivate CourseEditCommand +CourseEditCommand -[hidden]-> LogicManager : result +destroy CourseEditCommand + +[<--LogicManager +deactivate LogicManager +@enduml \ No newline at end of file diff --git a/docs/diagrams/CourseInfoClassDiagram.puml b/docs/diagrams/CourseInfoClassDiagram.puml new file mode 100644 index 00000000000..580ff804287 --- /dev/null +++ b/docs/diagrams/CourseInfoClassDiagram.puml @@ -0,0 +1,15 @@ +@startuml +class CourseInfo { + +getName() + +getCap() + +equals() + +hashCode() + +toString() +} +class Name {} + +CourseInfo *-- "1" Name +CourseInfo *-- "1" CAP +CourseInfo *-- "1" SemsLeft + +@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/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..50911e233ff 100644 --- a/docs/diagrams/ModelClassDiagram.puml +++ b/docs/diagrams/ModelClassDiagram.puml @@ -5,23 +5,33 @@ 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 -Package Person { -Class Person -Class Address -Class Email +Package Requirement { +Class Requirement Class Name -Class Phone -Class UniquePersonList +Class "Credits" as c1 +Class UniqueRequirementList +} + +Package Module { +Class Module +Class "Credits" as c2 +Class Description +Class Grade +Class Memo +Class ModuleCode +Class Semester +Class Title +Class UniqueModuleList } Package Tag { @@ -32,25 +42,41 @@ Class Tag 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 + +UniqueRequirementList o--> "*" Requirement +Requirement *--> "1" Name +Requirement *--> "1" c1 +Requirement *--> "1" UniqueModuleList + +UniqueModuleList o--> "*" Module +Module *--> "1" Title +Module *--> "1" ModuleCode +Module *--> "1" c2 +Module *--> "1" Memo +Module *--> "1" Description +Module *--> "1" Semester +Module *--> "1" Grade +Module *--> "*" Tag + + +Title -[hidden]right-> ModuleCode +ModuleCode -[hidden]right-> c2 +c2 -[hidden]right-> Memo +Memo -[hidden]right-> Description +Description -[hidden]right-> Semester +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/ModuleClassDiagram.puml b/docs/diagrams/ModuleClassDiagram.puml new file mode 100644 index 00000000000..f2570ba0efa --- /dev/null +++ b/docs/diagrams/ModuleClassDiagram.puml @@ -0,0 +1,26 @@ +@startuml +class Module { + +isDone() + +isSameModule() + +equals() + +hashCode() + +toString() +} +class Title {} +class ModuleCode {} +class Credits {} + +class Memo {} +class Description {} +class Semester {} +class Grade {} + +Module *-- "1" Title +Module *-- "1" ModuleCode +Module *-- "1" Credits + +Module o-- "1" Memo +Module o-- "1" Description +Module o-- "1" Semester +Module o-- "1" Grade +@enduml diff --git a/docs/diagrams/RequirementAddSequenceDiagram.puml b/docs/diagrams/RequirementAddSequenceDiagram.puml new file mode 100644 index 00000000000..dd234d270f8 --- /dev/null +++ b/docs/diagrams/RequirementAddSequenceDiagram.puml @@ -0,0 +1,58 @@ +@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 : new RequirementAddCommandParser(\nname, credits) +activate RequirementAddCommandParser + +create RequirementAddCommand +RequirementAddCommandParser -> RequirementAddCommand : new RequirementAddCommand(\nrequirement) +activate RequirementAddCommand + +RequirementAddCommand --> RequirementAddCommandParser +RequirementAddCommandParser --> CourseBookParser : r + +CourseBookParser --> LogicManager : r +deactivate CourseBookParser + +LogicManager -> RequirementAddCommand : execute() +activate RequirementAddCommand + +RequirementAddCommand -> Model : addRequirement() +activate Model + +Model -> CourseBook : addRequirement() +activate CourseBook + +CourseBook --> Model +deactivate CourseBook + +Model --> RequirementAddCommand +deactivate Model + +RequirementAddCommand --> LogicManager : result +deactivate RequirementAddCommand +RequirementAddCommand -[hidden]-> LogicManager : result +destroy RequirementAddCommand + +[<--LogicManager +deactivate LogicManager +@enduml diff --git a/docs/diagrams/RequirementClassDiagram.puml b/docs/diagrams/RequirementClassDiagram.puml new file mode 100644 index 00000000000..d645fbd5f48 --- /dev/null +++ b/docs/diagrams/RequirementClassDiagram.puml @@ -0,0 +1,15 @@ +@startuml +class Requirement { + +isFulfilled() + +equals() + +hashCode() + +toString() +} +class Name {} +class Credits {} +class UniqueModuleList {} + +Requirement *-- "1" Name +Requirement *-- "1" Credits +Requirement *-- "1" UniqueModuleList +@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..8fff92e0a00 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 <> { @@ -33,28 +39,39 @@ UiManager -down-> MainWindow MainWindow --> HelpWindow MainWindow *-down-> CommandBox MainWindow *-down-> ResultDisplay -MainWindow *-down-> PersonListPanel -MainWindow *-down-> StatusBarFooter +MainWindow *-down-> StatusBar +MainWindow *-down-> ProgressSidePanel +MainWindow *-down-> CommandReceivedPanel +MainWindow *-down-> RequirementListPanel +MainWindow *-down-> ModuleListPanel -PersonListPanel -down-> PersonCard +ModuleListPanel -down-> ModuleCard +RequirementListPanel -down-> RequirementCard +AvatarSelectionPanel ..> 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 -PersonCard ..> Model UiManager -right-> Logic +UiManager -left-> Model +MainWindow ..> Model +MainWindow ..> AvatarSelectionPanel MainWindow -left-> Logic -PersonListPanel -[hidden]left- HelpWindow +ProgressSidePanel -[hidden]left- CommandReceivedPanel +CommandReceivedPanel -[hidden]left- HelpWindow HelpWindow -[hidden]left- CommandBox CommandBox -[hidden]left- ResultDisplay -ResultDisplay -[hidden]left- StatusBarFooter +ResultDisplay -[hidden]left- StatusBar MainWindow -[hidden]-|> UiPart @enduml diff --git a/docs/diagrams/UndoRedoState0.puml b/docs/diagrams/UndoRedoState0.puml index 96e30744d24..1aef778bd35 100644 --- a/docs/diagrams/UndoRedoState0.puml +++ b/docs/diagrams/UndoRedoState0.puml @@ -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..994bd794c83 100644 --- a/docs/diagrams/UndoRedoState1.puml +++ b/docs/diagrams/UndoRedoState1.puml @@ -1,5 +1,6 @@ @startuml !include style.puml + skinparam ClassFontColor #000000 skinparam ClassBorderColor #000000 @@ -19,4 +20,4 @@ hide State3 class Pointer as "Current State" #FFFFF Pointer -up-> State2 -@end +@enduml diff --git a/docs/diagrams/UndoSequenceDiagram.puml b/docs/diagrams/UndoSequenceDiagram.puml index 410aab4e412..054794925cc 100644 --- a/docs/diagrams/UndoSequenceDiagram.puml +++ b/docs/diagrams/UndoSequenceDiagram.puml @@ -3,42 +3,42 @@ box Logic LOGIC_COLOR_T1 participant ":LogicManager" as LogicManager LOGIC_COLOR -participant ":AddressBookParser" as AddressBookParser 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 ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR +participant ":VersionedCourseBook" as VersionedCourseBook MODEL_COLOR end box [-> LogicManager : execute(undo) activate LogicManager -LogicManager -> AddressBookParser : parseCommand(undo) -activate AddressBookParser +LogicManager -> CourseBookParser : parseCommand(undo) +activate CourseBookParser create UndoCommand -AddressBookParser -> UndoCommand +CourseBookParser -> UndoCommand activate UndoCommand -UndoCommand --> AddressBookParser -deactivate UndoCommand +UndoCommand --> CourseBookParser +deactivate UndoCommandCourse -AddressBookParser --> LogicManager : u -deactivate AddressBookParser +CourseBookParser --> LogicManager : u +deactivate CourseBookParser LogicManager -> UndoCommand : execute() activate UndoCommand -UndoCommand -> Model : undoAddressBook() +UndoCommand -> Model : undoCourseBook() activate Model -Model -> VersionedAddressBook : undo() -activate VersionedAddressBook +Model -> VersionedCourseBook : undo() +activate VersionedCourseBook -VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook) -VersionedAddressBook --> Model : -deactivate VersionedAddressBook +VersionedCourseBook -> VersionedCourseBook :resetData(ReadOnlyCourseBook) +VersionedCourseBook --> Model : +deactivate VersionedCourseBook Model --> UndoCommand deactivate Model diff --git a/docs/diagrams/style.puml b/docs/diagrams/style.puml index fad8b0adeaa..0c1a726d10a 100644 --- a/docs/diagrams/style.puml +++ b/docs/diagrams/style.puml @@ -31,6 +31,9 @@ !define STORAGE_COLOR_T3 #806600 !define STORAGE_COLOR_T2 #544400 +!define SERVICES_COLOR #f995c6 +!define SERVICES_COLOR_T1 #ff34b3 + !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 index aa2d337d932..400f9166fee 100644 Binary files a/docs/images/ArchitectureDiagram.png and b/docs/images/ArchitectureDiagram.png differ diff --git a/docs/images/ArchitectureSequenceDiagram.png b/docs/images/ArchitectureSequenceDiagram.png index aa198138f8f..27803bca047 100644 Binary files a/docs/images/ArchitectureSequenceDiagram.png and b/docs/images/ArchitectureSequenceDiagram.png differ diff --git a/docs/images/AutoAddActivityDiagram.png b/docs/images/AutoAddActivityDiagram.png new file mode 100644 index 00000000000..002183f84d6 Binary files /dev/null and b/docs/images/AutoAddActivityDiagram.png differ diff --git a/docs/images/AutoAddSequenceDiagram.png b/docs/images/AutoAddSequenceDiagram.png new file mode 100644 index 00000000000..03c21d16982 Binary files /dev/null and b/docs/images/AutoAddSequenceDiagram.png differ diff --git a/docs/images/BetterModelClassDiagram.png b/docs/images/BetterModelClassDiagram.png index bc7ed18ae29..890a778ae59 100644 Binary files a/docs/images/BetterModelClassDiagram.png and b/docs/images/BetterModelClassDiagram.png differ diff --git a/docs/images/CourseEditSequenceDiagram.png b/docs/images/CourseEditSequenceDiagram.png new file mode 100644 index 00000000000..069def10bb4 Binary files /dev/null and b/docs/images/CourseEditSequenceDiagram.png differ diff --git a/docs/images/CourseInfoClassDiagram.png b/docs/images/CourseInfoClassDiagram.png new file mode 100644 index 00000000000..e19f72a7a38 Binary files /dev/null and b/docs/images/CourseInfoClassDiagram.png differ diff --git a/docs/images/DeleteSequenceDiagram.png b/docs/images/DeleteSequenceDiagram.png index fa327b39618..0f616e5425e 100644 Binary files a/docs/images/DeleteSequenceDiagram.png and b/docs/images/DeleteSequenceDiagram.png differ diff --git a/docs/images/LogicClassDiagram.png b/docs/images/LogicClassDiagram.png index b9e853cef12..2d31433b380 100644 Binary files a/docs/images/LogicClassDiagram.png and b/docs/images/LogicClassDiagram.png differ diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png index 280064118cf..b6961cafaf3 100644 Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ diff --git a/docs/images/ModuleClassDiagram.png b/docs/images/ModuleClassDiagram.png new file mode 100644 index 00000000000..6d950956e25 Binary files /dev/null and b/docs/images/ModuleClassDiagram.png differ diff --git a/docs/images/RequirementAddSequenceDiagram.png b/docs/images/RequirementAddSequenceDiagram.png new file mode 100644 index 00000000000..16467942ed5 Binary files /dev/null and b/docs/images/RequirementAddSequenceDiagram.png differ diff --git a/docs/images/RequirementClassDiagram.png b/docs/images/RequirementClassDiagram.png new file mode 100644 index 00000000000..0e29ed8d9f6 Binary files /dev/null and b/docs/images/RequirementClassDiagram.png differ diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png index d87c1216820..0ccbee6b51c 100644 Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ diff --git a/docs/images/Ui.png b/docs/images/Ui.png index 5bd77847aa2..75773f9f369 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 index 7b4b3dbea45..f937f98f4fb 100644 Binary files a/docs/images/UiClassDiagram.png and b/docs/images/UiClassDiagram.png 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/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/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/index.adoc b/docs/index.adoc index a65ae663288..a16ebd90b4f 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -1,2 +1,2 @@ :stylesDir: stylesheets -include::../README.adoc[] +include::../README.md[] 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/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/_toc.html.slim b/docs/templates/_toc.html.slim index f0ad719fe0f..c6be07abd65 100644 --- a/docs/templates/_toc.html.slim +++ b/docs/templates/_toc.html.slim @@ -1,5 +1,5 @@ / NOTE: You must restart the gradle daemon after modifying any template file for the changes to take effect. #toc class=(attr 'toc-class', 'toc') - #toctitle =(attr 'toc-title') + #toctitle =(attr 'toc-name') / Renders block_outline.html. = converter.convert document, 'outline' 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] ---- ...