Question: 2 What you will do For this assignment you will write a BossRoadTrip class and a driver class called BossRoadTripDriver. A BossRoadTrip object represents a


2 What you will do For this assignment you will write a BossRoadTrip class and a driver class called BossRoadTripDriver. A BossRoadTrip object represents a trip that someone might take between two locations over couple of minutes Here is the UML diagram for the BossRoadTrip class: BossRoad Trip start: String destination: String minutes: int at least 1 BossRoadTrip (start: String, destination: String) minutes 1, must call other constructor BossRoadTrip(start: String, destination: String, mins: int) get Start 0 String getDestination0 String get Minutes int lengthen(mins: int) void adds additional minutes to trip, mins supposed to be positive, if not do not add shorten(mins: int):boolean //reduces minutes of trip, returns true if successful, false otherwise mins supposed to be negative, if not don not update the minutes instance variable //if mins that will be taken from the trip will make minutes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
