HackIndia Logo
HackathonsNewsSkillsGrowth
HackIndia LogoContact: +91 9910125804

General

  • Companies
  • Colleges
  • Board of Advisors
  • Brand Ambassadors
  • FAQ
  • Contact
  • Report a Bug

Hackathons

  • Upcoming Hackathons
  • Judges
  • Mentors
  • Partners
  • Participating Colleges

Resources

  • About Us
  • Branding
  • Latest News
  • Growth
  • Skills
  • Ecosystem
  • Forum
  • Ideas
  • Prompt Optimizer
  • How to earn XP

© 2026 HackIndia. All rights reserved.

Privacy PolicyTerms of ServiceCode of ConductSitemap

Build 2.139 · 09 Nov 2026, 10:59 UTC

    HackIndia
    HackathonsNewsInternshipsSkillsGrowth
    Working towardsOOP
    0%

    0 of 9 steps done · +100 XP · +50 SHARP when it is yours

    1. 1Objects that solve features4 min · +10 XP · +5 SHARP
    2. 2Classes, objects, and state4 min · +10 XP · +5 SHARP
    3. 3Encapsulation without overengineering4 min · +10 XP · +5 SHARP
    4. 4Composition before inheritance4 min · +10 XP · +5 SHARP
    5. 5Polymorphism through interfaces5 min · +10 XP · +5 SHARP
    6. 6SOLID in plain words4 min · +10 XP · +5 SHARP
    7. 7Build and submit your repo5 min · +10 XP · +5 SHARP
    8. The check10 questions, 7 to pass · +10 SHARP
    9. Hand in the taskA project that uses the skill
    10. Skill and certificate+100 XP · +50 SHARP
    Lesson 1 of 7 4 min

    OOP

    Objects that solve features

    • +10 XP for this lesson
    • +100 XP when the skill is proved
    • 3 learning it right now
    In 30 seconds
    • Pick a feature and name the objects that make it work.
    • Separate real domain objects from screens, buttons, and database tables.
    Write a tiny object model note that a recruiter can understand.
    Key point

    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.

    Your to-do

    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

    Example

    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
    Common mistake

    Common mistake

    Beginners often copy database tables into classes. This makes code look object-oriented, but the logic still lives outside the objects.

    If your class only stores data and another file does all the work, pause. Ask which object should own that behaviour.

    Tip

    Use AI carefully

    You can ask ChatGPT, Gemini, or Claude to suggest objects for your feature. Do not accept the first list blindly.

    Check three things: are the objects from the problem, does each object have a clear responsibility, and did the AI add big-enterprise classes you do not need?

    Prompt:
    I am building a small OOP feature for a college project.
    Feature: Split a canteen bill between 4 students.
    Suggest domain objects only. Avoid UI, database, framework, and overengineered classes.
    For each object, give one responsibility and 2-3 methods.
    
    Check the answer:
    - Remove Manager, Service, Controller unless you truly need them
    - Keep names a non-technical user can understand
    - Keep the feature small enough to build and test this week

    What good looks like

    Your first object model can be small. Three to five objects are enough for lesson 1.

    Good object names make your README easier to read. If a senior can understand your feature without running the code, you are on the right track.

    Your to-do

    Do this now

    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

    Quick check

    0 of 2 right
    1.You are building a lab slot booking feature. Which is the best first object to model?
    2.Your class only stores fields, while another file does all calculations. What should you check?

    Answer the quick check to finish this lesson.

    Skip to lesson 2 →
    Working towards
    OOP +100 XP

    0 of 7 lessons done · proved by a project that uses the skill

    See the track