---
title: "Designing with Objects: Deciding What Each Class Owns"
description: "Reading a problem description and deciding which things deserve a class, what each one is responsible for, and where the boundaries between them fall. The judgement is about responsibility, not about "
canonical: https://lightmysky.com/learn/computing/designing-with-objects-deciding-what-each-class-owns-mt_De_gpvpOzg
source: https://lightmysky.com/learn/computing/designing-with-objects-deciding-what-each-class-owns-mt_De_gpvpOzg.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Designing with Objects: Deciding What Each Class Owns

Reading a problem description and deciding which things deserve a class, what each one is responsible for, and where the boundaries between them fall. The judgement is about responsibility, not about syntax.

Subject: Computing · Area: Programming · Ages 16 to 18
Page: https://lightmysky.com/learn/computing/designing-with-objects-deciding-what-each-class-owns-mt_De_gpvpOzg

## Ready when they can

- Pull candidate classes and responsibilities out of a written problem description
- Defend a boundary: say why one piece of data belongs to this class and not that one
- Spot a class that has taken on two unrelated jobs and split it

## Lesson: Give every class one clear job

Read the requirements and identify the records or things the system must represent. Nouns suggest candidate classes, but a noun might instead be a field or a value. In a library, Book, Member and Loan are candidates because the system tracks books, members and individual borrowing relationships.

Responsibilities come from required actions and rules, not names alone. Verbs can suggest actions, but check which class has the information and duty to perform them. A Book can maintain its title; a Loan can track one borrowing relationship. A method belongs where its responsibility is clear.

**Example.** Enrollment links one learner to one course and maintains enrollment dates. Those dates describe the relationship, so Enrollment owns their updates. Learner maintains learner details. Frequent reading alone does not establish ownership.

Cohesion means related state and methods serve one purpose. Account's deposit and withdraw both maintain its balance. The word and does not prove a split. Separate responsibilities when their rules or reasons for change differ.

*(drawing: Each owner maintains its rules. Requests allow cooperation without separately editable copies.)*

Customer maintains and validates its email address. A newsletter reads it to send a message. That read does not transfer maintenance to Newsletter. Keep one maintained address and request it when needed, rather than allowing separately editable copies to disagree.

To split unrelated responsibilities, identify each group of state and the methods that maintain it. Move each group together, give it a clear owner, then replace cross-group access with defined requests. For example, payroll calculations and weather readings need different rules. A vague name is a clue to inspect, not proof that a split is required.

**Recap.** Use requirements to find candidate records and duties. Put maintained data with its responsible owner. Consider a split when responsibilities have different rules or change separately.

*Object-design teaching, examples and assessment repairs independently written for this dataset.*

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Inheritance and Overriding Behaviour](https://lightmysky.com/learn/computing/inheritance-and-overriding-behaviour-mt_wBp7j_B6fj)

## Opens up

- [Interfaces, coupling and what a module promises](https://lightmysky.com/learn/computing/interfaces-coupling-and-what-a-module-promises-mt_EUZyD26WFk)
- [Reading and Writing Files, Including CSV](https://lightmysky.com/learn/computing/reading-and-writing-files-including-csv-mt_j5qb4FdkdI)
