Skip to content

Latest commit

Β 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🟒 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 πŸ’‘


πŸ–₯️ Screenshot of Output Program Output


πŸš€ 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 πŸ’™

Releases

Packages

Contributors

Languages