π’ Java Abstract Shapes β OOP Demonstration
Today I studied some important Object-Oriented Programming (OOP) concepts in Java and implemented a simple task to practice them.
This project demonstrates Abstraction, Inheritance, and Polymorphism using an abstract class. π What I Learned Today
β Abstract Classes
β Method Overriding
β Inheritance
β Runtime Polymorphism
β Clean OOP Structure
After understanding these concepts, I performed a small task to calculate the area of different shapes using abstraction.
π Project Description
An abstract class shape contains an abstract method:
abstract double area();
Two classes extend it:
Circle β Calculates area using formula: Ο Γ rΒ²
rectAngle β Calculates area using formula: length Γ width
In the main method, polymorphism is demonstrated by creating references of type shape.
This small project helped me understand how abstraction works in real coding practice π‘
π How to Run
Clone the repository
Open in any Java IDE (Eclipse, IntelliJ, VS Code)
Run AbstractClass.java
π± Learning Journey
I am continuously improving my Java and OOP skills. Every small project is a step toward becoming a better developer π»β¨
π©βπ» Author
Laiba Azeem Computer Science Student Passionate about learning and building π
