-
Notifications
You must be signed in to change notification settings - Fork 1
Class Diagram
Süleyman Emir Taşan edited this page Dec 19, 2024
·
7 revisions
classDiagram
class User {
-int id
-String username
-String name
-String email
-String password
-String proficiencyLevel
-int eloPoints
-String profile_picture
-List~Quiz~ createdQuizzes
-List~QuizAttempt~ solvedQuizzes
-List~Question~ favoritedQuestions
-List~Quiz~ favoritedQuizzes
-List~ForumPost~ forumPosts
+createAccount(username :String, email :String, password :String)
+login(username :String, password:String)
+createQuiz(title :String, description: String, questions :List~Question~)
+createQuizFromFavorites(title :String, description: String, count: int)
+favoriteQuiz(quiz :Quiz)
+favoriteQuestion(question :Question)
+createForumPost(content :String)
+replyForumPost(postToReply :ForumPost, content :String)
+getRecommendedQuizzes(userElo: Integer) List~Quiz~
+followUser(User user)
+unfollowUser(User user)
+getFollowers() List~User~
+getFollowing() List~User~
+getId() int
+getUsername() String
+setUsername(username : String)
+getName() String
+setName(name : String)
+getEmail() String
+setEmail(email : String)
+getPassword() String
+setPassword(password : String)
+getProficiencyLevel() String
+setProficiencyLevel(proficiencyLevel : String)
+getPoints() int
+setPoints(points : int)
+getProfilePicture() String
+setProfilePicture(profile_picture : String)
+getCreatedQuizzes() List~Quiz~
+getSolvedQuizzes() List~QuizAttempt~
+getFavoritedQuestions() List~Question~
+getFavoritedQuizzes() List~Quiz~
+getForumPosts() List~ForumPost~
}
class Quiz {
-int id
-String title
-String description
-String image
-User creator
-int difficulty
-List~Question~ questions
+Quiz(title : String, description : String, image: String, creator: User)
+addQuestion(question: Question)
+calculateDifficulty() int
+getAverageScore() double
+getSuccessRateByQuestion() Map~Question, Double~
+getMostMissedQuestions() List~Question~
+getId() int
+getTitle() String
+setTitle(title : String)
+getDescription() String
+setDescription(description : String)
+getImage() String
+setImage(image : String)
+getCreator() User
+setCreator(creator : User)
+getDifficulty() int
+setDifficulty(difficulty : int)
+getQuestions() List~Question~
+setQuestions(questions : List~Question~)
}
class QuizAttempt{
-int id
-Quiz quiz
-User user
-List~QuestionAnswer~ questionAnswers
-int score
-Timestamp completed_at
+QuizAttempt(quiz : Quiz, user : User)
+submitAnswer(Question question, String answer)
+getId() int
+getQuiz() Quiz
+setQuiz(quiz : Quiz)
+getUser() User
+setUser(user : User)
+getQuestionAnswers() List~QuestionAnswer~
+setQuestionAnswers(questionAnswers : List~QuestionAnswer~)
+getScore() int
+setScore(score : int)
+getCompletedAt() Timestamp
+setCompletedAt(completed_at : Timestamp)
}
class Question {
-int id
-String questionType
-String questionText
-String correctAnswer
-List~String~ wrongAnswers
+Question(questionType : String, questionText: String, correctAnswer: String, wrongAnswers: List~String~)
+getDifficulty() int
+getAllHints(word: String) List~String~
+getId() int
+getQuestionType() String
+setQuestionType(questionType : String)
+getQuestionText() String
+setQuestionText(questionText : String)
+getCorrectAnswer() String
+setCorrectAnswer(correctAnswer : String)
+getWrongAnswers() List~String~
+setWrongAnswers(wrongAnswers : List~String~)
}
class QuestionAnswer {
-int id
-Question question
-String answer
-bool correct
+QuestionAnswer(question : Question, answer: String)
+getId() int
+getQuestion() Question
+setQuestion(question : Question)
+getAnswer() String
+setAnswer(answer : String)
+isCorrect() bool
+setCorrect(correct : bool)
}
class ForumPost {
-int id
-User author
-String content
-List~Reply~ replies
-int voteCount
+ForumPost(author :User, content :String)
+addReply(reply : Reply)
+editPost(String newContent)
+deletePost()
+upvote()
+downvote()
+getID() int
+getAuthor() String
+setAuthor(author : String)
+getContent() String
+setContent(content : String)
+getReplies() List~Reply~
+getVoteCount() int
}
class Reply {
-int id
-String content
-User author
-int voteCount
+Reply(author :User, content: String)
+upvote()
+downvote()
+getId() int
+getContent() String
+setContent(content : String)
+getAuthor() String
+setAuthor(author : String)
+getVoteCount() int
}
class WikiDataInfo {
-int id
-List~String~ entityIds
-String word
+WikiDataInfo(word: String)
+findEntities(word: String) List~String~
+generateHint(entityIds: String) List~String~
+getWord() String
+setWord(word: String)
}
User "1" o-- "*" Quiz : creates
User "*" --> "*" Question : favorites
User "*" --> "*" Quiz : favorites
Quiz "1" *-- "*" Question : contains
User "1" *-- "*" ForumPost : creates
ForumPost "1" *-- "*" Reply : has replies
Quiz "1" --o "*" QuizAttempt
User "1" *-- "*" QuizAttempt : attempts
QuizAttempt "*" *-- "*" QuestionAnswer
Question "1" --o "*" QuestionAnswer
User <--> Reply
Question "1" --> "*" WikiDataInfo
🏠 Home
- 💬 Communication Plan
- 🎯 General Plan
- 🗂️ Project Plan
- 📊 Customer Milestone 1 Report
- 📊 Customer Milestone 2 Report
- 📊 Customer Milestone 3 Report
- 📕 User Manual
- 📕 System Manual
- Software Requirements
- API Doc
- RAM
- Sequence Diagram
- Class Diagram
- Use-Case Diagram
- Mockups
- User Scenario 1 - Quiz generation
- User Scenario 2 ‐ Find forum from the Quiz
- User Scenario 3 ‐ Ask Question in the Forum
- User Scenario 4 - Solve a Quiz Sent by Another User
- User Experience Enhancement Plans and Actions
- Final Presentation scenario
- UI Interfaces
- User Stories
- Lab Report #1 | 24.09.2024
- Lab Report #2 | 01.10.2024
- Lab Report #3 | 08.10.2024
- Lab Report #4 | 15.10.2024
- Lab Report #9 | 10.12.2024
Lab Meeting Notes
Team Meeting Notes
🧑🏻💻 About Us
🗂️ Templates
CmpE 352
- Customer Milestone 1 Report
- Customer Milestone 2 Report
- Customer Milestone 3 Report
- UML Use-Case Diagram
- UML Class Diagram
- Sequence Diagrams
- API Documentation
- RAM | Responsibility Assignment Matrix
🗃️ All Project Files
📝 352 Meeting Notes
- Meeting #11 | 11.05.2024
- Frontend Meeting Notes #2 | 07.05.2024
- Meeting #10 | 07.05.2024
- Frontend Meeting Notes #1 | 08.04.2024
- Backend Meeting Notes
- Mobile Team Meeting Notes
- Meeting #9 | 28.04.2024
- Meeting #8 | 22.04.2024
- Meeting #7 | 04.04.2024
- Meeting #6 | 27.03.2024
- Meeting #5 | 15.03.2024
- Customer Meeting #1 | 15.03.2024
- Meeting #4 | 07.03.2024
- Meeting #3 | 03.03.2024
- Meeting #2 | 26.02.2024
- Meeting #1 | 19.02.2024