
π Student Projects (College Reports) Β· Class UML
Classes for an online exam system, with question types by inheritance and grading logic.
Drawing diagramβ¦
Class diagram for an online examination system: User base class with Student and Examiner; Exam has many Questions; Question is abstract with MultipleChoiceQuestion and DescriptiveQuestion; Attempt holds a student's Answers for an exam; Grader grades an attempt and creates a Result.
classDiagram
class User {
<<abstract>>
+int id
+String name
+String email
+login(String password) bool
}
class Student {
+String rollNumber
+startAttempt(Exam) Attempt
}
class Examiner {
+createExam(String title) Exam
}
class Exam {
+String title
+DateTime startTime
+int durationMin
+totalMarks() int
}
class Question {
<<abstract>>
+String text
+int marks
+grade(Answer) decimal
}
class MultipleChoiceQuestion {
+List~String~ options
+int correctIndex
+grade(Answer) decimal
}
class DescriptiveQuestion {
+int wordLimit
+grade(Answer) decimal
}
class Attempt {
+DateTime submittedAt
+submit() void
}
class Answer {
+String response
}
class Grader {
+grade(Attempt) Result
}
class Result {
+decimal score
+String grade
}
User <|-- Student
User <|-- Examiner
Exam "1" *-- "many" Question
Question <|-- MultipleChoiceQuestion
Question <|-- DescriptiveQuestion
Student "1" --> "many" Attempt
Attempt --> Exam
Attempt "1" o-- "many" Answer
Answer --> Question
Grader ..> Result : createsWho uses a college library system and what each of them can do: members, the librarian and the system administrator.
The database of a library system: books and their copies, authors, members, loans, reservations and fines, with keys and cardinality.
How data moves through a library system: members and the librarian, the main processes, and the data stores they read and write.
The main classes of a library system with attributes, methods and UML relationships.
The steps when a member borrows a book: checks, loan record and the copy status update.
What students, examiners and the administrator do in an online examination system.