1. Objects that solve features
4 min
One idea
OOP starts with a feature, not with a class list. First ask: what real things take part in this feature, and what work does each thing do?
Start from behaviour
A recruiter will not be impressed by a random Student class with getters and setters. They want to see code that solves a small real problem clearly.
Pick a feature you can explain in one line. For example: split a canteen bill, book a lab slot, track hostel laundry, or manage club event registrations.
Find your objects
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
Worked example
Feature: students split a chai and snacks bill after a club meeting.
Useful objects are Bill, BillItem, Member, and Split. The button called Pay Now is not a domain object. A payments table is not your starting point.
Feature: Split a canteen bill between members
Objects:
- Bill: holds items and members, calculates total
- BillItem: stores name, price, quantity
- Member: stores name and amount paid
- Split: calculates what each member owes
Not objects yet:
- SplitBillScreen
- Pay Now button
- bill_items database table