An open API service indexing awesome lists of open source software.

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

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.