السلام عليكــم ورحمـة الله وبركاتــه ،،
ممكن تشرحون لي هذا البرنامج
بالتفصيل جدا جدا
وماهو المطلوب
ربي يوفقكم
The system should keep information about Passengers and Reservations they have made through the system. For a passenger, his name, phone, and passport number must be stored. The system must allow the update of this information. For each reservation, its ID (reservation number) which is automatically generated by the system, the passenger information, and the seat type (smoker or not) should be stored.
The id a Reservation is a single string composed of two parts: two characters which are the first two letters of the passengers name, followed by a serial number generated by the system.
Task A
Write a Passenger class which holds information about passenger including their name (string), passport number (string containing letters and numbers), and contact number (long). The class should contain both default and parameterized constructor, set/get methods for each attribute, and method to print the details of the Passenger.
Task B
Create a header file for the class student which contains the following header, then write its implementation file.
#ifndef RESERVATION_H_
#define RESERVATION_H_
#include <iostream>
#include <string>
#include "Passenger.h"
using namespace std;
class Reservation{
private:
static int sn;
const string ID; //first two letters of passanger name plus sn
bool smokerSeat;
Passenger passenger;
public:
//Constructor taking the parameters of Passenger
Reservation(string psngrName, long psngrPhone, string psngrPassport, bool smoke);
//Constructor taking a Passenger object
Reservation(Passenger& psngr, bool smoke);
Passenger getPassenger(); bool isSmoker();
string getReservationNumber() void printDetails();
};
#endif /*RESERVATION_H_*/_________
