Please the car Toyota Matrix with 4 cylinders.
For Truck use FORD F-150; Load Capacity = 1 ton; Towing Ca-pacity 11,000 pounds.
Create a class called Vehicle that has the manufacturer's name (type String), number of cylinders in the engine (type int), and owner (type Person given next). Then, create a class called Truck that is de-rived from Vehicle and has the following additional properties: the load capacity in tons (type double since it may contain a fractional part) and towing capacity in pounds (type int). Be sure your class has a reasonable complement of constructors, accessor and mu-tator methods, and suitably defined equals and toString methods. Write a program to test all your methods.
The definition of the class Person follows. Completing the definitions
public class Person
{
private String name;
public Person()
{...}
public Person(String theName)
{...}
public Person(Person theObject)
{...}
public String getName()
{...}
public void setName(String theName)
{...}
public String toString()
{...}
public boolean equals(Object other)
{...}
}
of the methods is part of this programming exercise.