Skip to content

Commit

Permalink
Merge pull request #173 from SinhaVedant/branch-documentation
Browse files Browse the repository at this point in the history
Update DG
  • Loading branch information
siqirua authored Nov 13, 2023
2 parents 829bbaa + c46dcfc commit 049a80e
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 42 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
# Modulight
![Ui](docs/images/Ui_overview.png)

Modulight is a **Desktop application for managing student grades**.
It is a system to track students and their performance on graded components, utility functions to get statistics on the cohort and certain subgroups.
Modulight is a **Desktop application for managing student grades**. It is a system to track students and their performance on graded components, utility functions to get statistics on the cohort and certain subgroups.

Modulight interface will mainly use **Command Line Interface (CLI)** as its primary input.

Expand Down
70 changes: 45 additions & 25 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ The **API** of this component is specified in [`Ui.java`](https://github.com/AY2
<puml src="diagrams/UiClassDiagram.puml" alt="Structure of the UI Component"/>

The UI consists of a `MainWindow` that is made up of parts e.g.`CommandBox`, `ResultDisplay`, `StudentListPanel`,
`GradedComponentListPanel`, `StudentScoreListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`,
inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts
of the visible GUI.
`GradedComponentListPanel`, `StudentScoreListPanel`, `StatusBarFooter` etc. All these, including the `MainWindow`, inherit from the abstract `UiPart` class which captures the commonalities between classes that represent parts of the visible GUI.

The `UI` component uses the 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 [`MainWindow`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/MainWindow.java) is specified in [`MainWindow.fxml`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/resources/view/MainWindow.fxml)

Expand Down Expand Up @@ -161,13 +159,20 @@ The `Model` component,

**API** : [`Storage.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/storage/Storage.java)

<puml src="diagrams/StorageClassDiagram.puml" width="550" />
<puml src="diagrams/StorageClassDiagram.puml" />

Here are the complete class diagrams of StudentBook Storage, StudentScoreBook Storage and GradedComponentBook Storage.

<puml src="diagrams/StudentAndScoreBookStorage.puml" />


<puml src="diagrams/GradedComponentBookStorage.puml" />


The `Storage` component,
* can save student data, student score data, graded component data and user preference data in JSON format, and read
them back into the corresponding objects.
* inherits from `StudentBookStorage`, `GradedComponentBookStorage`, `StudentScoreBookStorage` and `UserPrefsStorage`,
which means it can be treated as any of the one (if only the functionality of only one is needed).
* inherits from `StudentBookStorage`, `GradedComponentBookStorage`, `StudentScoreBookStorage` and `UserPrefsStorage`, which means it can be treated as any of the one (if only the functionality of only one is needed).
* depends on some classes in the `Model` component (because the `Storage` component's job is to save/retrieve objects that belong to the `Model`)

### Common classes
Expand Down Expand Up @@ -466,13 +471,13 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli

**MSS**

1. User requests to list student scores.
2. ModuLight shows a list of student scores.
3. User requests to edit the details of a specific student score.
4. ModuLight updates the detail of that student score with entered data.
5. ModuLight shows a list of updated student scores.
Use case ends.
1. User requests to list student scores.
2. ModuLight shows a list of student scores.
3. User requests to edit the details of a specific student score.
4. ModuLight updates the detail of that student score with entered data.
5. ModuLight shows a list of updated student scores.

Use case ends.

**Extensions**

Expand All @@ -487,9 +492,9 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
Use case resumes at step 2.

* 3b. There is some error in the entered data.
* 3b1. ModuLight shows an error message.

* 3b1. ModuLight shows an error message.

Use case resumes at step 2.

**Use case: Find student(s)**
Expand Down Expand Up @@ -545,9 +550,11 @@ Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unli
### Non-Functional Requirements

1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
2. Should be able to hold up to 1000 students, 10000 student scores and 10 graded components without a noticeable sluggishness in performance for typical usage.
3. 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.
4. Should respond to user requests within 2 seconds.
2. Should be able to hold up to 1000 students, 10000 student scores and 10 graded components without a noticeable
sluggishness in performance for typical usage.
3. 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.
4. Should respond to user requests within 2 seconds.
5. The user interface shall be intuitive and user-friendly.
6. Should allow edit only by authorized users.
7. Should not take more than 128MB memory while in operation.
Expand Down Expand Up @@ -607,14 +614,27 @@ testers are expected to do more *exploratory* testing.

### Saving data

1. Editing the data file manually.
1. Dealing with missing files

1. Open `studentBook.json`, `scoreBook.json` or `gradedComponentBook.json`.
2. Edit the field of any student, student score or graded component in the file.
3. Run the program.
Expected: The edited field for the particular student, student score or graded component will be updated.
1. Delete all three json files `studentBook.json`, `gradedComponentBook.json`, `scoreBook.json`.

2. Run the program. <br>
Expected: The program will load with the original sample data just like it was run for the first time.

1. _{ more test cases …​ }_
1. Dealing with corrupted files

1. Open `studentBook.json`.

2. Edit any "studentName" field and input "R@chel".

3. Run the program. <br>
Expected: The program will load with completely empty data instead of edited data.

4. Other ways to corrupt the files are to change "tutorialGroup" to "AAA", "gcName" (in `gradedComponentBook.
json`) to "@Quiz", ...

5. Run the program. <br>
Expected: Similar to previous.

## **Appendix: Planned Enhancements**

Expand Down
25 changes: 25 additions & 0 deletions docs/diagrams/GradedComponentBookStorage.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor STORAGE_COLOR
skinparam classBackgroundColor STORAGE_COLOR

package Storage as StoragePackage {

package "GradedComponentBook Storage" #F4F6F6{
Class "<<interface>>\nGradedComponentBookStorage" as GradedComponentBookStorage
Class JsonGradedComponentBookStorage
Class JsonSerializableGcBook
Class JsonAdaptedGradedComponent
}

}
Class HiddenOutside #FFFFFF
Class I #FFFFFF

HiddenOutside -right-> "1" GradedComponentBookStorage
I -right-|> GradedComponentBookStorage
JsonGradedComponentBookStorage .up.|> GradedComponentBookStorage
JsonGradedComponentBookStorage ..> JsonSerializableGcBook
JsonSerializableGcBook --> "*" JsonAdaptedGradedComponent
@enduml
29 changes: 14 additions & 15 deletions docs/diagrams/StorageClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,36 @@ skinparam classBackgroundColor STORAGE_COLOR
package Storage as StoragePackage {

package "UserPrefs Storage" #F4F6F6{

Class "<<interface>>\nUserPrefsStorage" as UserPrefsStorage
Class JsonUserPrefsStorage
}

Class "<<interface>>\nStorage" as Storage
Class StorageManager

package "AddressBook Storage" #F4F6F6{
Class "<<interface>>\nAddressBookStorage" as AddressBookStorage
Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedPerson
Class JsonAdaptedTag
}
Class "<<interface>>\nStudentBookStorage" as StudentBookStorage

Class "<<interface>>\nStudentScoreBookStorage" as StudentScoreBookStorage

Class "<<interface>>\nGradedComponentBookStorage" as GradedComponentBookStorage

}

Class HiddenOutside #FFFFFF
HiddenOutside ..> Storage

StorageManager .up.|> Storage
StorageManager -up-> "1" UserPrefsStorage
StorageManager -up-> "1" AddressBookStorage
StorageManager -down-> "1" UserPrefsStorage
StorageManager -down-> "1" StudentBookStorage
StorageManager -down-> "1" StudentScoreBookStorage
StorageManager -down-> "1" GradedComponentBookStorage

Storage -left-|> UserPrefsStorage
Storage -right-|> AddressBookStorage
Storage -down-|> UserPrefsStorage
Storage -down-|> StudentBookStorage
Storage -down-|> StudentScoreBookStorage
Storage -down-|> GradedComponentBookStorage

JsonUserPrefsStorage .up.|> UserPrefsStorage
JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedPerson
JsonAdaptedPerson --> "*" JsonAdaptedTag

@enduml
43 changes: 43 additions & 0 deletions docs/diagrams/StudentAndScoreBookStorage.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@startuml
!include style.puml
skinparam arrowThickness 1.1
skinparam arrowColor STORAGE_COLOR
skinparam classBackgroundColor STORAGE_COLOR

package Storage as StoragePackage {

package "StudentBook Storage" #F4F6F6{
Class "<<interface>>\nStudentBookStorage" as StudentBookStorage
Class JsonStudentBookStorage
Class JsonSerializableStudentBook
Class JsonAdaptedStudent
}

package "StudentScoreBook Storage" #F4F6F6{
Class "<<interface>>\nStudentScoreBookStorage" as StudentScoreBookStorage
Class JsonStudentScoreBookStorage
Class JsonSerializableStudentScoreBook
Class JsonAdaptedStudentScore
}

Class JsonAdaptedTag

}
Class HiddenOutside #FFFFFF
Class I #FFFFFF
Class J #FFFFFF
Class K #FFFFFF

HiddenOutside -right-> "1" StudentBookStorage
I -right-> "1" StudentScoreBookStorage
J --|> StudentBookStorage
K --|> StudentScoreBookStorage
JsonStudentBookStorage .up.|> StudentBookStorage
JsonStudentBookStorage ..> JsonSerializableStudentBook
JsonSerializableStudentBook --> "*" JsonAdaptedStudent
JsonAdaptedStudent --> "*" JsonAdaptedTag
JsonStudentScoreBookStorage .up.|> StudentScoreBookStorage
JsonStudentScoreBookStorage ..> JsonSerializableStudentScoreBook
JsonSerializableStudentScoreBook --> "*" JsonAdaptedStudentScore
JsonAdaptedStudentScore --> "*" JsonAdaptedTag
@enduml

0 comments on commit 049a80e

Please sign in to comment.