From 9421945ea04597a2733d3c64b3e3409e342ff0f4 Mon Sep 17 00:00:00 2001 From: hughjazzman Date: Fri, 9 Oct 2020 18:25:25 +0800 Subject: [PATCH 1/3] Update architecture DevGuide --- docs/DeveloperGuide.md | 34 ++++++++++++++++++++++++- docs/diagrams/ArchitectureDiagram.png | Bin 0 -> 7748 bytes docs/diagrams/ArchitectureDiagram.puml | 15 +++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 docs/diagrams/ArchitectureDiagram.png create mode 100644 docs/diagrams/ArchitectureDiagram.puml diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 0ec3db103d..50d4b0ff6b 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -1,9 +1,41 @@ # Developer Guide -## Design & implementation +## Design & Implementation {Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} +![ArchitectureDiagram](diagrams/ArchitectureDiagram.png) + +The **Architecture Design** given above explains the high-level design of the App. Given below is a quick overview of each component. + +**`Duke`** is the main class of the application, and handles the app launch, initializing the appropriate classes to be used. + +The rest of the app consists of four components. + +* [**`UI`**](#ui-component): The UI of the App. +* [**`Logic`**](#logic-component): The command executor. +* [**`Model`**](#model-component): Holds the data of the App in memory. + +### UI component + +The `Ui` component + +* Executes user commands using the `Logic` component. +* Listens for changes to `Model` data so that the UI can be updated with the modified data. + +### Logic component + +1. `Logic` uses the `Parser` class to parse the user command. +1. This results in a `Command` object which is executed in `Duke`. +1. The command execution can affect the `Model` (e.g. adding a person). +1. In addition, the `Ui` may also perform certain actions, such as displaying help to the user. + +### Model component + +The `Model`, + +* stores a current `Template` object that represents the current circuit configuration. +* does not depend on any of the other three components. ## Product scope ### Target user profile diff --git a/docs/diagrams/ArchitectureDiagram.png b/docs/diagrams/ArchitectureDiagram.png new file mode 100644 index 0000000000000000000000000000000000000000..858c6e9c72f0ab1e7eac33fc7fa9da2ad407fee1 GIT binary patch literal 7748 zcmch6Wmwc-wu{GfyoN|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r2 z6Cw7Svnzlz+K5Tbe?7-x{m&P=-&?gB$d4aCvSKToV7878#xTZJ&E7H7)6@IGa&dW? z!Ed=6%ZN{cbXj~bZ01qfXRj8)(k6$cz*>4%kCs+|#)gDqN8HmqbnW+#fTNyWT;XFU zWo|AdA7G>C&MqPN%z{&GY#Rg!CVXa!|K-K)8pmPU;J$V^-Ywug7eh@&Te(`%D&ju? DkdM7? literal 0 HcmV?d00001 diff --git a/docs/diagrams/ArchitectureDiagram.puml b/docs/diagrams/ArchitectureDiagram.puml new file mode 100644 index 0000000000..104ea785a1 --- /dev/null +++ b/docs/diagrams/ArchitectureDiagram.puml @@ -0,0 +1,15 @@ +@startuml + +Package " "<>{ + Class Ui + Class Logic + Class Model + Class Duke +} + +Duke --> Ui +Duke --> Logic +Duke --> Model + + +@enduml \ No newline at end of file From 239dbece7bcbfed5f8aa5e01c9f3ba96926bde7a Mon Sep 17 00:00:00 2001 From: hughjazzman Date: Fri, 9 Oct 2020 23:37:27 +0800 Subject: [PATCH 2/3] Add User Stories --- docs/DeveloperGuide.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 50d4b0ff6b..45c2106286 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -40,18 +40,26 @@ The `Model`, ## Product scope ### Target user profile -{Describe the target user profile} +New Computer/Electrical Engineering (CEG/EE) students who are looking for a quick way to check calculations for simple circuit configurations can use this App as an aid. ### Value proposition -{Describe the value proposition: what problem does it solve?} +CLIrcuit Assistant solves three problems: + +1. Lack of access to simple circuit computation - the App quickly computes the required circuit's values. +1. Doing labs at home because of remote learning - the App provides a quick visualisation tool for the student. +1. Online alternatives require internet access, and some sites are slow to load with many resources needed - the App is an offline desktop application with minimal resources. ## User Stories |Version| As a ... | I want to ... | So that I can ...| |--------|----------|---------------|------------------| -|v1.0|new user|see usage instructions|refer to them when I forget how to use the application| -|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list| +|v1.0|new CEG/EE Student |solve electronic/logic circuits through an Interactive Tutorial|get used to using a command line whilst simultaneously learning about circuits and apply the concepts in modules such as CG1111| +|v1.0|new CEG/EE Student|create template circuits using common components such as Resistors, Capacitors, Inductors|visualise and calculate values for common circuit configurations | +|v1.0|new CEG/EE Student | change values assigned to the components| obtain different calculations quickly| +|v1.0|new CEG/EE Student|add components arranged in either series or parallel|obtain my configuration for analysis| +|v1.0|new CEG/EE Student |calculate/verify my calculations of effective resistance, total capacitance, etc.|quickly and accurately do so via CLI, and not 3rd party software that I have to install/load online| +|v2.0|CEG/EE Student|compute a boolean logical expression|familiarise myself with logical computation used in digital circuits| ## Non-Functional Requirements From 2d89e4c579405d39355f02b9777cf64c432b4a50 Mon Sep 17 00:00:00 2001 From: Wira Azmoon Date: Mon, 12 Oct 2020 22:06:26 +0800 Subject: [PATCH 3/3] Update UserGuide.md --- docs/DeveloperGuide.md | 2 +- docs/UserGuide.md | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md index 45c2106286..fee26875d9 100644 --- a/docs/DeveloperGuide.md +++ b/docs/DeveloperGuide.md @@ -27,7 +27,7 @@ The `Ui` component 1. `Logic` uses the `Parser` class to parse the user command. 1. This results in a `Command` object which is executed in `Duke`. -1. The command execution can affect the `Model` (e.g. adding a person). +1. The command execution can affect the `Model` (e.g. setting a value). 1. In addition, the `Ui` may also perform certain actions, such as displaying help to the user. ### Model component diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 147dce406e..87fd36e4ae 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -6,16 +6,28 @@ CLIrcuit Assistant is a desktop app to implement and solve simple circuits, opti ## Quick Start -{Give steps to get started quickly} - 1. Ensure that you have Java 11 or above installed. 1. Down the latest version of `Duke` from [the releases](https://github.com/AY2021S1-CS2113T-W13-3/tp/releases) when it is ready. +1. Use the command `help` to go through an interactive tutorial before using the application. ## Features +### Summary of Commands: `summary` + +This command prints a summary of all commands in the application as shown in [Command Summary](#command-summary). + +Format: `summary` + ### Start interactive tutorial: `help` -Starts the interactive tutorial for the app. +Starts the interactive tutorial for the app. In the following order, the tutorial will guide the user on how to use the commands for the application: + +1. `template` - Selecting templates +1. `set v` - Setting value for voltage +1. `set r/c/l` - Setting value for a `LoadComponent` +1. `add series/parallel r/c/l` - Adding a `LoadComponent` in series/parallel +1. `calc` - Printing a calculated value +1. `exit` - Exiting the interactive tutorial Format: `help` @@ -130,6 +142,7 @@ Expected Outcome: Action | Format, Examples --------|------------------ **Help** | `help` +**Summary** | `summary` **Template** | `template TEMPLATE`
e.g., `template rc` **Set** | `set COMPONENT VALUE`
e.g., `set r 500` **Add** | `add CONFIG COMPONENT VALUE`
e.g., `add parallel c 500`