Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ex1 AaBb Exercise 1 Implement the following UML diagram Airline -totalPlanes: int -name : String - allPlanes: Plane 1 l/an array of Planes + Airline

ex1 image text in transcribed
image text in transcribed
AaBb Exercise 1 Implement the following UML diagram Airline -totalPlanes: int -name : String - allPlanes: Plane 1 l/an array of Planes + Airline (name : String)* + getName 0 : String + getTotalPassengers ( ) : int //goes through allPlanes array to get all Passengers + getTotalPlanes ): inte + getAllPlanes O I1 Planee + setName (n : String) : void + addPlane (p: Plane): void //adds a Plane object to the allPlanes array, update totalPlanes + percentageEull ( ) : double //compares the number of passengers with number of seats for all planes + toString ): String. Plane -plane Name : String ight name (e.g, AC123) - aumSeats: int /umber of seats on the planee - aumPassengers: int umber of passengers who bought a ticket. + Plane (name : String, numSeats: int)- + getNumSeats ( ) : int+. + getNumPassengers ( ) int + setNumSeats (num : int): void+. + addPassengers (num : int): void /if room on plane, num passengers are addede + hasMoreSeats (p : Plane): boolean l/returns true/false if 'this' Plane has more seats than p + toString ): String

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago

Question

Have roles been defined and assigned?

Answered: 1 week ago