https://github.com/nivindulakshitha/oop-workshop
Master OOP with JavaOOPWorkshop: Simulate, calculate, and drive your way to Java expertise!
https://github.com/nivindulakshitha/oop-workshop
java
Last synced: 3 months ago
JSON representation
Master OOP with JavaOOPWorkshop: Simulate, calculate, and drive your way to Java expertise!
- Host: GitHub
- URL: https://github.com/nivindulakshitha/oop-workshop
- Owner: nivindulakshitha
- License: cc0-1.0
- Created: 2024-03-08T14:40:07.000Z (about 1 year ago)
- Default Branch: Master
- Last Pushed: 2024-03-08T14:44:26.000Z (about 1 year ago)
- Last Synced: 2025-01-01T18:26:38.049Z (5 months ago)
- Topics: java
- Language: Java
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Java OOP Playground 🚗
Explore Object-Oriented Programming in Java!
## Overview
Dive into a collection of Java programs demonstrating Object-Oriented Programming concepts and functionalities.
## Programs
### 🚚 Truck Simulation
- Description: Simulates the operation of a truck.
- Functionality: Drives the truck.### 🧮 Shape Calculator
- Description: Calculates perimeters and areas of rectangles and circles.
- Functionality: Computes perimeters and areas.### 🚗 Car Simulation
- Description: Simulates the operation of a car.
- Functionality: Drives the car.## Class Reviews
### `Truck.java`
- Implements the `Drivable` interface.
- Contains a method `drive()` to simulate truck operation.### `Test.java`
- Main class for testing shapes, vehicles, and division operation.
- Utilizes instances of `Rectangle`, `Circle`, `Car`, and `Truck` for testing.### `Shape.java`
- Abstract class representing a shape with color.
- Defines abstract methods `getPerimeter()` and `getArea()`.
- Provides methods to set and get the color of the shape.### `Rectangle.java`
- Extends `Shape` class.
- Represents a rectangle with height, width, and color.
- Implements `getPerimeter()` and `getArea()` methods.### `Drivable.java`
- Interface defining a method `drive()` for drivable objects.### `Car.java`
- Implements the `Drivable` interface.
- Contains a method `drive()` to simulate car operation.### `Circle.java`
- Extends `Shape` class.
- Represents a circle with radius and color.
- Implements `getPerimeter()` and `getArea()` methods.Explore the world of Object-Oriented Programming with these Java programs!
