Online Course Management System
From raw requirements to a responsibility-driven class diagram - object identification, GRASP, and CRC cards.
beginner2-3 hours
What you will produce
- Object list
- Responsibility table
- CRC cards
- Preliminary class diagram
Northfield University has outgrown its patchwork of spreadsheets and email threads, and the teaching office has commissioned an online course management system. The entire specification, as delivered, fits in one paragraph:
Instructors publish courses. A course is organised into modules, and each
module contains lessons. Students enrol in courses. Within an enrolled
course, a student submits assignments before their deadlines, and the
instructor grades each submission. Students can view their grades for
every course they are enrolled in.Your job in this project is not to write code. It is to decide what objects exist, what each one is responsible for, and how they collaborate — the design work that has to happen before any class diagram is worth drawing. You will practise noun analysis, responsibility assignment with GRASP, CRC cards, and finally translate the result into a diagram in DiaGO Studio.
Expect to revise as you go. If you rename an object halfway through, or merge two candidates into one, that is the process working — not a mistake to hide.
Before you start
You should be comfortable with:
- Objects and classes — state, behaviour, and identity
- Class diagram basics — class boxes, attributes, operations
- Associations — how relationships between classes are drawn
Steps 1 through 5 are paper-and-text work: keep a text editor or real index cards at hand. Open DiaGO Studio's class editor with an empty class diagram for Step 6.
Step 1: Identify domain objects
Read the requirements paragraph and mark every noun and noun phrase. Each is a candidate object. From the text above you should find at least: instructor, course, module, lesson, student, assignment, deadline, submission, grade.
Now filter. For each candidate, ask three questions:
- Is it really just an attribute? If you only ever need its value, it belongs inside another object. Deadline is a date on an assignment, not a class.
- Is it a synonym or duplicate? Requirements written by different people often name the same concept twice.
- Does a verb hide an object? "Students enrol in courses" contains no noun for the enrolment itself — but a relationship that carries its own data (when it happened, its status) usually deserves to be an object. Promote it: Enrollment.
These are heuristics, not rules. Grade is a borderline case you will resolve deliberately in Step 2.
Step 2: Build the object list
Turn the surviving candidates into a table. State each object's purpose in one sentence; if you need the word "and", you may be looking at two objects.
| Object | Purpose | Key data |
|---|---|---|
| Course | A published unit of teaching that students can enrol in | title, description, publication status |
| Enrollment | Links one student to one course and tracks their participation | student, course, enrolment date, status |
| Submission | One student's answer to one assignment | content, submitted-at timestamp, grade |
Your turn: complete the rows for Module, Lesson, Assignment, Student, and Instructor. Then decide whether Grade earns its own row or lives as data on Submission — both are defensible at this stage, but write down your reason.
Step 3: Assign responsibilities
A responsibility is something a class knows or does. The GRASP pattern Information Expert gives you the assignment rule: give a responsibility to the class that has the information needed to fulfil it. This keeps behaviour next to the data it uses, which is also the shortest route to classes that satisfy the Single Responsibility Principle.
// Information Expert in miniature: the deadline lives on Assignment,
// so the lateness check belongs there too.
class Assignment {
constructor(private deadline: Date) {}
isLateAt(time: Date): boolean {
return time.getTime() > this.deadline.getTime();
}
}Build a responsibility table:
| Responsibility | Assigned to | Why this class is the expert |
|---|---|---|
| Know whether a submission is late | Assignment | It holds the deadline |
| Track a student's status in a course | Enrollment | It owns the student-course link |
| List a module's lessons in order | Module | It contains the lessons |
Your turn: continue the table for at least these responsibilities — grade a submission, publish a course, enrol a student, and report a student's grades across one course.
Step 4: Identify collaborations
No object fulfils every responsibility alone. For each row in your responsibility table, ask: which other objects must be consulted? Walk through "a student views their grades for a course": the Enrollment gathers that student's submissions, each Submission reports its grade, and each Assignment supplies its title for display. One responsibility, three collaborators.
Record each collaboration as a pair — Enrollment needs Submission, Submission needs Assignment. If one object ends up collaborating with nearly everything, that is a warning sign: revisit Step 3, because you have probably given it responsibilities that belong elsewhere.
Step 5: Write CRC cards
CRC stands for Class, Responsibility, Collaborator — a technique introduced by Beck and Cunningham using paper index cards. The format: class name across the top, then two columns — responsibilities on the left, the collaborators each one needs on the right. The card's small size is the point: if a class's responsibilities do not fit on one card, the class is doing too much.
Course
| Responsibilities | Collaborators |
|---|---|
| Know its title, description, and publication status | — |
| Maintain its ordered list of modules | Module |
| Report whether it is open for enrolment | — |
| Accept a new enrolment | Enrollment, Student |
Enrollment
| Responsibilities | Collaborators |
|---|---|
| Link one student to one course | Student, Course |
| Track enrolment date and status | — |
| Collect the student's submissions in this course | Submission |
| Report the student's grades for the course | Submission, Assignment |
Your turn: write cards for Student, Instructor, Module, Assignment, and Submission.
Reach for it
- You are exploring a new domain and the object model is still fluid
- You want to walk through a scenario with teammates before committing to a diagram
- A class looks overloaded and you need its responsibilities visible in one place
Avoid it
- The design is stable and already captured in a class diagram
- You need precise notation such as multiplicities and attribute types
- You are recording implementation detail rather than responsibilities
Step 6: Draw the preliminary class diagram in Studio
Now move into DiaGO Studio. Create one class per CRC card. Key data from Step 2 becomes attributes; "does" responsibilities become operations. Draw an association wherever a collaboration appears in your cards, then add multiplicities: a Course contains many Modules, an Enrollment links exactly one Student to exactly one Course. The notation is covered in class diagrams and associations.
A distinction worth keeping straight: formal UML defines precise semantics for multiplicity and navigability, but choosing between plain association, aggregation, and composition is a design judgement. At this stage, plain associations are enough — though Course-to-Module is a natural composition candidate, since a module has no meaning outside its course.
Step 7: Explain your decisions
Write three short justifications, two to four sentences each, naming the principle behind each one. Here is the shape:
Enrollment is its own class rather than a bare line between Student and Course, because the relationship carries data (date, status) and behaviour (reporting grades). Information Expert then makes it the natural home for anything that needs both the student and the course.
Your turn: justify (1) where Grade lives, (2) which class accepts a submission, and (3) one collaboration you added or removed after Step 4.
Check your work
- Does every class trace back to a noun in the requirements or a justified promotion, like Enrollment?
- Can you state each class's purpose in one sentence without using "and"?
- Is each responsibility assigned to the class that holds the data it needs?
- Does any class collaborate with nearly all the others? If so, which responsibilities could move?
- Do your CRC cards and your Studio diagram show the same classes and relationships?
- Does every association in the diagram correspond to a collaboration from Step 4?
- Could a classmate reconstruct your three justifications from the diagram alone?
Going further
- Prerequisites. A course may require completion of other courses. Model this as a self-association on Course — what are the multiplicities?
- Grade notifications. Students should be notified when a grade is posted. Sketch it with the Observer pattern: which class is the subject, which the observer?
- Persistence. Map your object list to relational tables using ER modeling. Which objects become tables, and what does Enrollment turn into?
Practice
Run all seven steps against this one-sentence specification: "Members of a city library reserve books, borrow copies for three weeks, and pay fines on late returns." Produce an object list, a responsibility table, CRC cards for two classes of your choice, and a preliminary diagram in Studio. Watch for the distinction between Book and Copy — it plays the same role Enrollment played here.