https://github.com/killervardhan8/week-02---object-oriented-programming
https://github.com/killervardhan8/week-02---object-oriented-programming
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/killervardhan8/week-02---object-oriented-programming
- Owner: KillerVardhan8
- Created: 2025-04-30T06:27:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-05-22T05:25:10.000Z (7 months ago)
- Last Synced: 2025-05-22T05:31:43.606Z (7 months ago)
- Language: Java
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Week 02 Object Oriented Programming
Welcome to the repository for Week 2 of our Java learning journey. This week dives deeper into the core principles of Object-Oriented Programming (OOP) using Java.
## Table of Contents
- [Overview](#overview)
- [Day 1: Object Oriented Programming Fundamentals](#day-1-object-oriented-programming-fundamentals)
- [Day 2: Java Constructors, Instance vs. Class Variables, Access Modifiers Concepts](#day-2-java-constructors-instance-vs-class-variables-access-modifiers-concepts)
- [Day 3: This, Static, Final Keywords and Instanceof Operator](#day-3-this-static-final-keywords-and-instanceof-operator)
- [Day 4: Object Modeling and Class Diagram](#day-4-object-modeling-and-class-diagram)
- [Day 5: Inheritance](#day-5-inheritance)
- [Day 6: Encapsulation, Interface, Abstract Classes, and Polymorphism](#day-6-encapsulation-interface-abstract-classes-and-polymorphism)
- [Prerequisites](#prerequisites)
- [How to Use This Repository](#how-to-use-this-repository)
---
## Overview
In Week 2, we focused on mastering Object-Oriented Programming concepts, which form the foundation of Java application development. You will learn how to design robust, maintainable, and reusable code using OOP principles.
---
## Day 1: Object Oriented Programming Fundamentals
- Understanding classes and objects
- Defining instance variables and methods
- Object creation process and memory allocation
- Basic OOP principles introduction
---
## Day 2: Java Constructors, Instance vs. Class Variables, Access Modifiers Concepts
- Creating and overloading constructors
- Differentiating instance and class (static) variables
- Access modifiers: public, private, protected, default
- Understanding scope and encapsulation basics
---
## Day 3: This, Static, Final Keywords and Instanceof Operator
- Using `this` keyword to resolve variable shadowing and call constructors
- Static variables and methods at class level
- Final keyword usage for constants and method restrictions
- `instanceof` operator for type checking
---
## Day 4: Object Modeling and Class Diagram
- Introduction to object modeling concepts
- Designing class diagrams for OOP systems
- Relationships between classes (association, aggregation, composition)
- Visualizing object interactions
---
## Day 5: Inheritance
- Concept of inheritance and code reuse
- Using the `extends` keyword for single inheritance
- Accessing superclass members using `super` keyword
- Method overriding basics
---
## Day 6: Encapsulation, Interface, Abstract Classes, and Polymorphism
- Encapsulation through private variables and public getters/setters
- Abstract classes and abstract methods
- Defining and implementing interfaces
- Polymorphism: method overloading and overriding
- Runtime polymorphism and dynamic method dispatch
---
## Prerequisites
- Java Development Kit (JDK) installed
- Familiarity with Java basics (Week 1)
- An IDE like IntelliJ IDEA, VS Code, or Eclipse
---
## How to Use This Repository
The repository is organized by daily topics. Each folder contains Java files demonstrating the key concepts learned that day. You can:
- Explore the examples
- Run and debug the code
- Modify the code to experiment and reinforce your understanding
---