Question: Java: Please help with the SpaceShip class. I already have the Location class and Traveler class Thank you. Location Class: Traveler Class: SpaceShip class -
Java: Please help with the SpaceShip class. I already have the Location class and Traveler class Thank you.





Location Class:

Traveler Class: 

SpaceShip class - contains spaceship information and behaviors. See UML class diagram below: SpaceShip name: String capacity: int travelers:Collection (Traveler) numTraverlers: int current: Location -destination: Location +SpaceShip (name): setName +SpaceShip(name:String, current:Location, destination:Location,capacity:int +getName): String +getCapacity): int +getCurrent): Location +getDestination): Location +setName (name:String) +setCurrent (current:Location) +setcapacity( capacity:int) +setDestination (destination:Location) +board (t:Traveler): boolean leave(t: Traveler) tisOnBoard (t: Traveler): boolean +move () +toString) String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
