Skip to content

KillerVardhan8/Week-02---Object-Oriented-Programming

Repository files navigation

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

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages