Question: . Use the UML and Notes in the pages below to create the following classes and interfaces: ( 4 pts ) class Person ( 1
Use the UML and Notes in the pages below to create the following classes and interfaces:
pts class Person
pt class InvalidDriverException extends Exception
pts class Vehicle
pt interface Announcements
pts class Car extends Vehicle implements Comparable, Announcements
pts class Bus extends Car
pts class Bicycle extends Vehicle implements Comparable
Q a pts Create the following class Person
class Person
name: String
hasDriverLicense: boolean
age: int years
height: int inches
PersonString name, boolean hasDriverLicense, int age, int height
getName: String
hasDriverLicense: boolean
getAge: int
getHeight: int
clone : Person returns a copy of the Person with all the same values without revealing the original memory address
equalsObject o : boolean Person objects are equal if all their variables are equal
toString: String
Person names aged heightd has licenseno license name, age, height, hasDriverLicense
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
