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.

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

Location Class:

+getDestination): Location +setName (name:String) +setCurrent (current:Location) +setcapacity( capacity:int) +setDestination (destination:Location) +board (t:Traveler):

Traveler Class: boolean leave(t: Traveler) tisOnBoard (t: Traveler): boolean +move () +toString) Stringimage text in transcribed

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!