Skip to content

Commit

Permalink
chore: Updated the UML diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
UO283615 authored Feb 18, 2024
1 parent 8b8074d commit 741c60b
Showing 1 changed file with 38 additions and 16 deletions.
54 changes: 38 additions & 16 deletions docs/src/08_concepts.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,64 @@ These diagram is just a sketch, it should be replaced by a more accurate version
enum Category {
HISTORY
GEOGRAPHY
MATHS
SCIENCE
}
enum Type {
TEXT
IMAGE
AUDIO
}
class Question{
id: int
id: long
content: String
answers: List<Answer>
correct: Answer
category: Category
language: String
Type: Type
}
class User{
id: int
name: String
email: String
password: String
answered: List<Question>
answeredQuestions: int
}
class UserStat{
}
class Answer {
text: String
category: Category
Type: Type
}
class Score{
class Game {
user: User
rightRate: float
timeAvg: float
answeredQuestions: int
questions: List<Question>
}
class Ranking << Singleton >> {
}
User o--> Question
User --> Score
User o--> Question
User "1" --> "1" UserStat
Game o--> Question
Game "n" --> "n" User
Question "n" --> "n" Answer
Ranking "1" --> "n" User
@enduml
----

|===
| Class | Explanation
| Question | The model of the questions
| User | The people using the application
| Score | A class that keeps tracks of each user scores
| Question | The model of the questions, has a type to specify if it is text, image or audio. Stores both right and wrong answers
| User | The people using the application, they have statistics and take part in a ranking to compete
| Answer | Models each possible answer, created to reuse answers that are common to different questions, as well as distractors
| Game | It is created when the user starts a game and destroyed just when it ends.
|===

.Architecture and design patterns
Expand Down

0 comments on commit 741c60b

Please sign in to comment.