Your task is to define two classes:
Vehicle
A method void printCategory() that prints:Generic Vehicle
printCategory()
Generic Vehicle
Car
void printCar()
Car Vehicle
The program will:
printCar()
Example
Output:
Generic Vehicle Car Vehicle
Why this output?
Question Significance
This reinforces the idea of reusing base functionality and extending it in derived classes.
Test Cases
Test Results
Input
Expected Output