PrepZone Logo
PrepZone

UML Class Diagrams for Interviews

The notation you actually need on a whiteboard — nothing more.

Read these first

Why this matters

  • Classes and interfaces — detailed pointwise breakdown in the section below.
  • Relationships — detailed pointwise breakdown in the section below.
  • Multiplicity — detailed pointwise breakdown in the section below.
  • What to skip — detailed pointwise breakdown in the section below.
  • Whiteboard clarity often decides pass/fail before code depth.
ParkingLotentry facade
ParkingFloorcollection of spots
Ticketissued on entry
Vehiclecar, bike, truck

ParkingSpot links Vehicle when occupied; Strategy picks spot by vehicle type.

ParkingLot owns floors; each spot knows its size and occupant.

Overview

The notation you actually need on a whiteboard — nothing more. Study each section below in order — every list is interview-ready reference material.

Classes and interfaces

Points to cover

  • Definition — what Classes and interfaces means in one clear sentence
  • When to use — the force or smell that triggers this concept
  • CampusOS example — where this appears in parking, booking, or library modules
  • How to explain — pointwise bullets you can say aloud in an interview
  • Common mistake — what weak candidates do instead
  • Refactor move — one concrete change that improves the design

Relationships

Points to cover

  • Definition — what Relationships means in one clear sentence
  • When to use — the force or smell that triggers this concept
  • CampusOS example — where this appears in parking, booking, or library modules
  • How to explain — pointwise bullets you can say aloud in an interview
  • Common mistake — what weak candidates do instead
  • Refactor move — one concrete change that improves the design

Multiplicity

Points to cover

  • Definition — what Multiplicity means in one clear sentence
  • When to use — the force or smell that triggers this concept
  • CampusOS example — where this appears in parking, booking, or library modules
  • How to explain — pointwise bullets you can say aloud in an interview
  • Common mistake — what weak candidates do instead
  • Refactor move — one concrete change that improves the design

What to skip

Points to cover

  • Definition — what What to skip means in one clear sentence
  • When to use — the force or smell that triggers this concept
  • CampusOS example — where this appears in parking, booking, or library modules
  • How to explain — pointwise bullets you can say aloud in an interview
  • Common mistake — what weak candidates do instead
  • Refactor move — one concrete change that improves the design
Java
// CampusOS — apply "Classes and interfaces" on paper first, then in code
public final class UmlClassDiagramsExample {
    // 1. Name entities from the problem statement
    // 2. Draw relationships before writing methods
    // 3. Introduce patterns only when a force appears
}

Quick recall

Everything you need if you only revisit this box.

  1. Classes and interfaces — review this slice before mock interviews.
  2. Relationships — review this slice before mock interviews.
  3. Multiplicity — review this slice before mock interviews.
  4. What to skip — review this slice before mock interviews.

Test yourself

Answer these before moving on — recall is what makes it stick.