Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program to implement in c++ code Q2. (25 marks) Create a class called Flight that contains information about the flight of the airline company. A

Program to implement in c++ code
image text in transcribed
image text in transcribed
Q2. (25 marks) Create a class called Flight that contains information about the flight of the airline company. A flight is identified by: a flight id (string), departure time (Time), departure date (Date), arrival time (Time), arrival date (Date), departure city (string), arrival city (string). The class should have at least the following member functions: -One or more constructors - Necessary setters and getters A function that prints information about a flight A destructor - Deliverables: flight.h, flight. cpp, testflight.cpp // time.h definition of the class Tine class Time t public: Time(); void setTime(int, int, int); // sets hours, minutes, and seconds void printTime() const;// prints time on the screen private: int hour, minute, second; // date.h definition of the class Date class Date f public: minutes, seconds private: Date(int, int, int, int, int, int); 1/ sets day, month, year, hours, void printDate() const; // print date to the screen int day, month, year; Time time; // a component object 3: /I date.cpp implementation of the class Date Date: :Date(int d, int n, int y, int hour, int min, int sec) { day d; month m; year ys time.setTime(hour, min, sec); void Date::printDate() const t cout

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

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 2 Lnai 9285

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Joao Gama ,Alipio Jorge ,Carlos Soares

1st Edition

3319235249, 978-3319235240

More Books

Students also viewed these Databases questions