Day 11 of my Java Daily Tasks focuses on OOP Basics.
In Day 10, I learned string problem-solving concepts. In Day 11, I am learning the basic concepts of Object-Oriented Programming (OOP) in Java.
This day includes classes and objects, constructors, the this keyword, encapsulation, static members, constructor overloading, method overloading, and arrays of objects.
The main objectives of Day 11 are:
this keywordthis keywordDay-11-OOP-Basics/
│
├── Questions/
│ └── Questions.txt
│
├── Screenshots/
│ ├── Output_1.png
│ ├── Output_2.png
│ ├── Output_3.png
│ ├── Output_4.png
│ ├── Output_5.png
│ ├── Output_6.png
│ ├── Output_7.png
│ ├── Output_8.png
│ ├── Output_9.png
│ └── Output_10.png
│
├── Solutions/
│ ├── Q01_Student_Class.java
│ ├── Q02_Employee_Constructor.java
│ ├── Q03_Book_This_Keyword.java
│ ├── Q04_Rectangle_Class.java
│ ├── Q05_Bank_Account_Encapsulation.java
│ ├── Q06_Car_Objects.java
│ ├── Q07_Static_Counter.java
│ ├── Q08_Constructor_Overloading.java
│ ├── Q09_Method_Overloading.java
│ └── Q10_Array_of_Objects.java
│
└── README.md
Create a Student class with student details and display the student information using an object.
Create an Employee class and use a parameterized constructor to initialize employee details.
Create a Book class and use the this keyword to initialize and display book details.
Create a Rectangle class with length and width and calculate the area of the rectangle using an object.
Create a BankAccount class using private variables and getter and setter methods to implement encapsulation.
Create a Car class and create multiple car objects to display their details.
Create a class with a static counter to count the number of objects created.
Create a class with multiple constructors using different parameters and demonstrate constructor overloading.
Create a class with multiple methods having the same name but different parameters and demonstrate method overloading.
Create multiple Student objects and store them in an array. Display the details of all students.
| No. | Problem | Solution |
|---|---|---|
| Q01 | Student Class | Q01_Student_Class.java |
| Q02 | Employee Constructor | Q02_Employee_Constructor.java |
| Q03 | Book This Keyword | Q03_Book_This_Keyword.java |
| Q04 | Rectangle Class | Q04_Rectangle_Class.java |
| Q05 | Bank Account Encapsulation | Q05_Bank_Account_Encapsulation.java |
| Q06 | Car Objects | Q06_Car_Objects.java |
| Q07 | Static Counter | Q07_Static_Counter.java |
| Q08 | Constructor Overloading | Q08_Constructor_Overloading.java |
| Q09 | Method Overloading | Q09_Method_Overloading.java |
| Q10 | Array of Objects | Q10_Array_of_Objects.java |










cd Day-11-OOP-Basics
cd Solutions
Example:
javac Q01_Student_Class.java
java Q01_Student_Class
The same process can be followed for the remaining programs.
Through Day 11, I practiced:
this keywordThe goal of Day 11 is to build a strong foundation in Object-Oriented Programming before moving toward more advanced Java topics such as:
| Day | Topic | Status |
|---|---|---|
| Day 11 | OOP Basics | ✅ Completed |
M. Praveen Kumar
⭐ This is part of my Java Daily Tasks journey to improve my Java programming and problem-solving skills.