Question: Look at the diagram and code regarding Flight below: Based on the code and class diagram provided, answer the following questions: 1). What type of

Look at the diagram and code regarding "Flight" below:

Look at the diagram and code regarding "Flight" below: Based on the

Based on the code and class diagram provided, answer the following questions:

1). What type of design smell did you find in the attached code? Provide a theory based explanation!

2). Make refactoring based on the design smell found in the question above.

Flight Flight Data +Flight No : String +plane : Plane Data +flight Date : Date + destination Airport : String +departureAirport : String +arrive Time : String +departTime : String +passenger : List Passenger> -flight Data : Flight Data Plane Data +planeNo : String +planeName : String +capacity : int +EetAllFlight(): List Flights +setPlaneNo(planeNo : String) : void +pctPlaneNot) : String +set PlaneName(plane Name : String): void +getPlaneName(): String +setCapacity(capacity : int) : void +getCapacity(): int +setFlight No(flight No : String) : veid +set Destination Airport(destination Airport : String): vaid +setDestination Airport(): String +setDeparture Airport(departure Airport : Strins) : void +setDeparture Airport(): Strins + et Flight Date(): Date +setFlight Date(flight Date : Date) : void +getArriveTime(): String +setArriveTime(arrive Time : String): void +setDepartTime(departTime : String) : void +getDepartTime(): String +getPassenger() : List) : void +addPassenger(passenger : Passenger): void +removePassenger passenger : Passenger) : void +getAllFlight(): List Flights Passenger +passengerName : String +bookingCode : String +identity Number : String Flight Flight Data +Flight No : String +plane : Plane Data +flight Date : Date + destination Airport : String +departureAirport : String +arrive Time : String +departTime : String +passenger : List Passenger> -flight Data : Flight Data Plane Data +planeNo : String +planeName : String +capacity : int +EetAllFlight(): List Flights +setPlaneNo(planeNo : String) : void +pctPlaneNot) : String +set PlaneName(plane Name : String): void +getPlaneName(): String +setCapacity(capacity : int) : void +getCapacity(): int +setFlight No(flight No : String) : veid +set Destination Airport(destination Airport : String): vaid +setDestination Airport(): String +setDeparture Airport(departure Airport : Strins) : void +setDeparture Airport(): Strins + et Flight Date(): Date +setFlight Date(flight Date : Date) : void +getArriveTime(): String +setArriveTime(arrive Time : String): void +setDepartTime(departTime : String) : void +getDepartTime(): String +getPassenger() : List) : void +addPassenger(passenger : Passenger): void +removePassenger passenger : Passenger) : void +getAllFlight(): List Flights Passenger +passengerName : String +bookingCode : String +identity Number : 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!