https://github.com/msh-trojan/java_17_absclass_dependency_1
An easy example of using one of three tools of connection among classes
https://github.com/msh-trojan/java_17_absclass_dependency_1
abstract classes-and-objects dependency java
Last synced: 8 months ago
JSON representation
An easy example of using one of three tools of connection among classes
- Host: GitHub
- URL: https://github.com/msh-trojan/java_17_absclass_dependency_1
- Owner: MSH-trojan
- Created: 2024-05-29T00:52:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-29T15:21:18.000Z (over 1 year ago)
- Last Synced: 2025-04-01T11:00:06.209Z (11 months ago)
- Topics: abstract, classes-and-objects, dependency, java
- Language: Java
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Write a Java program with a Vehicle class that has a method drive(). Create two classes, Car and Bike, each with their own drive() method.
Then, create a Garage class that has variables for Vehicle, Car, and Bike, and methods to call the drive() methods for each.
Demonstrate the usage of the Garage class with both Car and Bike.