1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
#include <iostream>
#include <iomanip>
using namespace std;
class Time{
private:
unsigned short hours, minutes;
public:
Time (unsigned short h, unsigned short m) {hours = h; minutes = m;};
void printTime () {
cout << "\n\t" << setw(2) << setfill('0') << hours << ":" << setw(2) << minutes << ":" << endl;};
};
class Date{
private:
unsigned short day, month, year;
public:
Date (unsigned short d, unsigned short m, unsigned short y) {day = d; month = m; year = y;};
void printDate () {
cout << "\n\t" << setw(2) << setfill('0') << day << "/" << setw(2) << month << "/" << year << endl;};
};
class Flights{
private:
string departureAirport, arrivalAirport;
Time departureTime(1,1), arrivalTime(1,1), journeyLength(0,0);
Date departureDate(1,1,1), arrivalDate(1,1,1);
float cost;
public:
Flights(string deptAir, string arrivAir, float costt){departureAirport = deptAir; arrivalAirport = arrivAir; cost = costt;};
};
int main(){
return 0;
}
|