السلام عليكــم ورحمـة الله وبركاتــه ،،
عندي مشروع ولكن واجهتني مشكلة
ارجو منكم ان توضحون لي ماهي الفنكشن اللي تحول من انتجر الى ستريينغ
وهل المين يكون واحد ام اثنين مع توضيح السبب
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();
};
وشاكرة لكم