7-Day OOP in Java Learning Plan
Day 1: Java Class & Object Basics
Topics:
• What is OOP?
• Class vs Object
• Creating a class and object
• Fields (variables), Methods
Practice:
• Create a Student class with name, rollNo, marks.
• Create and print multiple student objects.
Day 2: Constructors & 'this' Keyword
Topics:
• Default and parameterized constructors
• Constructor overloading
• 'this' keyword usage
Practice:
• Create a Car class with constructor overloading.
• Use 'this' to differentiate variables.
Day 3: Encapsulation & Access Modifiers
Topics:
• Encapsulation concept
• Getters & Setters
• Private, Public, Protected
Practice:
• Create an Employee class with private fields, and public getters/setters.
• Try restricting access with modifiers.
Day 4: Inheritance
Topics:
• 'extends' keyword
• Single & Multilevel inheritance
• 'super' keyword
Practice:
• Create a Person class, extend it into Student and Teacher.
• Use 'super' to access parent class variables/methods.
Day 5: Polymorphism
Topics:
• Method Overloading (compile-time)
• Method Overriding (run-time)
• 'final' keyword
Practice:
• Overload a display() method with different parameters.
• Override display() in subclass with same method name.
Day 6: Abstraction & Interfaces
Topics:
• Abstract Class & Methods
• Interface and 'implements'
• Difference between abstract and interface
Practice:
• Create an abstract class Animal with sound(), implement in Dog, Cat.
• Create an interface Playable, implement in MusicPlayer.
Day 7: Real-world Project + Review
Topics:
• Review all topics
• Mini-project: Student Management, Bank App, or Library System
Practice:
• Create a Student Management System:
• Add student, Display student details
• Inherit class for GraduateStudent
• Use encapsulation, abstraction, etc.