← Back to Week 5
Workbook 4a Module 1 — Exercise 1 (Paper)

Hotel Objects

Brainstorm the objects you'd need to run a hotel — look for the nouns  |  Workbook p.9

The Exercise

Read the 7 hotel scenarios on p.9. Find the nouns — those are your candidate classes. Write each one down on paper or a whiteboard.

Don't worry yet about whether something is a full class or just a property of another class — that's what Exercise 2 is for. Right now you're just collecting candidates.

An object can be a department, a job title, a person, a physical thing, or even an idea or process. If a noun appears in the scenarios, it's a candidate.

The 7 Scenarios
  1. Guests check in at the front desk with a clerk.
  2. When a guest checks in they are assigned a room, and given a room key.
  3. When guests check out they receive a receipt of their room charges.
  4. Guests can order room service from the restaurant and have it delivered.
  5. Meals at the restaurant can also be charged to the guest's room.
  6. All guest requests should be made by calling the front office (housekeeping, more towels, maintenance issues).
  7. When a guest checks out, housekeeping should be notified that a room is ready to be cleaned.
Concepts You'll Use
Flow
Read all 7 scenarios
Highlight every noun
Group similar nouns
List object candidates
Share with your group
Tip
Look for nouns. Verbs in the scenarios usually become methods on those objects, not separate classes. We'll handle responsibilities and behavior in Exercise 2 — for now, just collect the candidates. Also: if "guest" and "customer" appear in different sentences but mean the same thing, group them as one concept.

Workbook 4a Module 1, p.9 — Exercise 1: Hotel Objects

Hotel Responsibilities →