Menu

Hi Want Code Problem C Please Dusseldorf Airport Plans Re Program Software Showing Arriva Q43824874

hi i want the code of this problem in c++ please …

Dusseldorf airport plans to re-program the software showingarrivals and departures in an object-oriented programming style inC ++. In this task classes and an example as a first prototypeshall be implemented.

Subtask 1

Time points at airports are always defined including a timezone. Define a C ++ 11 enumeration implemented by unsigned numberswith at least following eight time zones: ACT ,CET , CST , EST, GMT , MSK ,PST , UTC

Subtask 2

Define a C ++ 11 enumeration with two valuesarrival and departure .

Subtask 3

  • Define a class with name LocalTime. This classshall have following members:
  • A private integer attribute minutes Storingthe minutes since midnight of a day (saving one variable instead oftwo variables for hour and minute).
  • a private attribute for the time zone of enumeration data typedefined in subtask 1.
  • a public standard constructor initialising the minutes to-1 (for clock time yet not set) and the time zoneto CET.
  • a public overloaded constructor with three parameters for thehour, minute and a time zone with default parameterCET initialising the two attributes – minutescalculated respectively (hint: in the body simply call thefollowing member function).
  • a public method with name set_time with anhour and a minute value as parameters calculating the minutes sincemidnight and assigning the resulting minutes value to therespective attribute. Check that hour and minute are givencorrectly otherwise write an error message and assign value-1.
  • two public methods with names get_hour andget_minute without parameters calculating the houror the minute and returning the result (hint: use integer divisionby 60 with rest).
  • a public method with name is_valid withoutparameters returning false for a negative valuefor the minutes value and true otherwise.

Subtask 4

Furthermore outside of the class an overloaded output operator<< for an object of classLocalTime shall be defined. The local time shallalways be outputted with 5 characters in formhh:mm, for example 00:00,09:10 or 14:55.

Subtask 5

Define a class for flights with name Flightwith following members:

  • a private attribute with namearrivalOrDeparture of enumeration data typedefined in subtask 2.
  • five private attributes with names code(flight code), destination (from/to),gate (arrival or departure gate),checkIn (counters for dropping off baggage) aswell as comment (for comments on this flight) allof type string.
  • a private attribute with name expected for theexpected/delayed arrival/departure time of above typeLocalTime.
  • a public prototype for a constructor with five parameters forarrival or departure, the code of the flight, the destination, thegate and the check-in counters, the last one with a defaultparameter empty string “”.
  • a public prototype for a destructor.
  • six public prototypes for getter functions with speaking namesget_code, get_destination,get_gate, get_checkIn,get_comment and get_scheduledwithout parameters and appropriate return types.
  • two public prototypes for setter functions with also speakingnames set_expected andset_comment each having one appropriateparameter.
  • two public prototypes for functions with also speaking namesis_arrival and is_departurewithout parameter and a Boolean return value.
  • a public prototype of a function with nameprint with a parameter of above typeLocalTime and without return value.

Subtask 6
Define outside of the class with name Flight

  • the constructor initialising the given parameter values to theregarding attributes and the comment to an empty string.
  • the destructor with an output of the flight code.
  • the six getter and two setter member functions.
  • the function printing flight data formatted in one line like inthe examples below, whereas the time given as parameter shall beplaced in column scheduled.

Subtask 7

Define a class with name Airport with followingmembers:

  • a private attribute with the name of theairport as C++ string.
  • a private attribute with name slot as array ofpointers to flights (subtask 5) with 24 rows (for the hours of aday) and 60 columns (for the minutes of each hour of a day),getting initialised by null pointers (i.e. maximum 24*60 starts andlandings each day; due to turbulences of the air and for securityreasons at least one minute pause has to be in between two starts).In this array pointers to scheduled landings or starting flights ineach minute of a day shall get stored.
  • definition of a public constructor with a name as parameter toinitialise the respective attribute.
  • definition of a public destructor deleting the whole pointerarray with all flight objects on heap.
  • definition of a public function with nameschedule having a LocalTime and apointer to a flight as parameters without return value and storingthe flight at the scheduled time slot.
  • definition of a public function with namecomment with a LocalTime and astring as parameters having no return value and storing the stringas comment of the flight at this scheduled timeslot.
  • definition of a public function with namedelay with two LocalTimeparameters having no return value and storing the time in secondparameter in the flight object at the scheduled time given in thefirst parameter.
  • definition of a public function with nameprint with one parameter of above enumeration typefrom subtask 2 for arrivals or departures without return value. Inits body write a table of all stored arriving flights or startingflight given by the parameter value (see example below).

Subtask 8
Write a C++ main function with followingdefinitions and statements:

  • Define an object of type Airport initializedwith name DUSSELDORF AIRPORT.
  • Successively send to this object appropriate messages with newobjects of type Flight on heap and with thescheduled time as parameters including all example flight datashown below. Also send appropriate messages to store comments anddelays as shown below. Only above defined constructors and memberfunctions are allowed to be used and called, no further or changedmember functions, constructors, additional or deleted parameters orchanged visibilities of class member data.
  • Send to the object for Dusseldorf airport a messageprint to output the table of arrivals and a secondmessage to output all departures.

Expert Answer


Answer to hi i want the code of this problem in c++ please … Dusseldorf airport plans to re-program the software showing arrival…

OR