Inheritance
1. Write a Java program to create a class called Shape with a method called
Area(). Create a subclass called Rectangle that overrides the Area()
method to calculate the area of a rectangle.
2. Write a Java program to create a vehicle class hierarchy. The base class
should be Vehicle, with subclasses Truck, Car and Motorcycle. Each
subclass should have properties such as make, model, year, and fuel type.
Implement methods for calculating fuel efficiency, distance traveled, and
maximum speed.
3. Write a Java program that creates a class hierarchy for employees of a
company. The base class should be Employee, with subclasses Manager,
Developer, and Programmer. Each subclass should have properties such
as name, address, salary, and job title. Implement methods for calculating
bonuses, generating performance reports, and managing projects.