Skip to content

Commit

Permalink
Merge pull request #79 from MingEn82/branch-MingEn
Browse files Browse the repository at this point in the history
Added DG
  • Loading branch information
MingEn82 authored Mar 18, 2023
2 parents 78d92eb + 168baf6 commit a617745
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

# plantuml jar
plantuml.jar
16 changes: 14 additions & 2 deletions docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,24 @@

## Acknowledgements

{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
1. Command, Parser and UI java files are adapted from one of our group member's [Duke Project](https://github.com/MingEn82/tp)

## Design & implementation

{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
### Architecture

![](../out/docs/uml/Architecture/architecture.svg)
**Main Components of LifeTracer**
`LifeTracker` is where users will access the application from. It is responsible for:

- At app launch: Initialise the Databases and UI classes
- At app closure: Saves all updated data to databases

The rest of the Application consists of three components:

- `UI`: Reponsible for I/O between user and application
- `Command`: Handles execution of user inputs
- `Storage`: Stores information of the user and meals eaten

## Product scope
### Target user profile
Expand Down
54 changes: 54 additions & 0 deletions docs/uml/architecture.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
@startuml architecture
!include style.puml

allow_mixing
skinparam classFontColor automatic
skinparam classHeaderBackgroundColor MODEL_COLOR_T4

database Storage STORAGE_COLOR {

}

class UI UI_COLOR {

}

class User {

}

class Food {

}

class Meal {

}

class Command LOGIC_COLOR {

}

class LifeTracker STORAGE_COLOR_T1 {

}

LifeTracker -up-> UI
LifeTracker -right-> Storage

actor user USER_COLOR

user ..> UI
UI -> Command

Storage ..> Meal
Storage ..> Food
Storage ..> User
Meal *--left-- "1..*" Food

Command --> User
Command --> Meal
Command --> Storage


@enduml
75 changes: 75 additions & 0 deletions docs/uml/style.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/'
'Commonly used styles and colors across diagrams.
'Refer to https://plantuml-documentation.readthedocs.io/en/latest for a more
'comprehensive list of skinparams.
'/


'T1 through T4 are shades of the original color from lightest to darkest

!define UI_COLOR #1D8900
!define UI_COLOR_T1 #83E769
!define UI_COLOR_T2 #3FC71B
!define UI_COLOR_T3 #166800
!define UI_COLOR_T4 #0E4100

!define LOGIC_COLOR #3333C4
!define LOGIC_COLOR_T1 #C8C8FA
!define LOGIC_COLOR_T2 #6A6ADC
!define LOGIC_COLOR_T3 #1616B0
!define LOGIC_COLOR_T4 #101086

!define MODEL_COLOR #9D0012
!define MODEL_COLOR_T1 #F97181
!define MODEL_COLOR_T2 #E41F36
!define MODEL_COLOR_T3 #7B000E
!define MODEL_COLOR_T4 #51000A

!define STORAGE_COLOR #A38300
!define STORAGE_COLOR_T1 #FFE374
!define STORAGE_COLOR_T2 #EDC520
!define STORAGE_COLOR_T3 #806600
!define STORAGE_COLOR_T2 #544400

!define USER_COLOR #000000

skinparam BackgroundColor #FFFFFFF

skinparam Shadowing false

skinparam Class {
FontColor #FFFFFF
BorderThickness 1
BorderColor #FFFFFF
StereotypeFontColor #FFFFFF
FontName Arial
}

skinparam Actor {
BorderColor USER_COLOR
Color USER_COLOR
FontName Arial
}

skinparam Sequence {
MessageAlign center
BoxFontSize 15
BoxPadding 0
BoxFontColor #FFFFFF
FontName Arial
}

skinparam Participant {
FontColor #FFFFFFF
Padding 20
}

skinparam MinClassWidth 50
skinparam ParticipantPadding 10
skinparam Shadowing false
skinparam DefaultTextAlignment center
skinparam packageStyle Rectangle

hide footbox
hide members
hide circle

0 comments on commit a617745

Please sign in to comment.