/Java_17_ABSclass_Dependency_1

An easy example of using one of three tools of connection among classes

Primary LanguageJava

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.