السلام عليكــم ورحمـة الله وبركاتــه ،،
عندي سؤال بالبرمجة
وهذا السؤال
A small Taxi company has 10 cars each of which can carry 4 passengers. Develop a program with these technical details; - Use constructor to initialize data members. - Use this pointer in get functions (You may not need set functions) - Develop a search function. - Develop a function "TaxiStatus" that prints Taxi status. - Make a menu driven main program to test all functions.
حليت السؤال حسب فهمي ..
وهذا حلي ..
#include<iostream>
using namespace std;
class Taxi {
private:
int cars;
int Passengers;
public:
Taxi ( int c=10 , int p=4 ){
cars = c;
Passengers = p;
}
void TaxiStatus (){
cout <<" The Taxi carry 4 passengers ";
}
};
int main (){
Taxi REEM( 10 , 4 );
REEM.TaxiStatus();
return 0;
}مشكلتي موفاهمه السؤال كويس
أحس إلى هنآ حلي صح
بالنسبة للفقرتين
- Use this pointer in get functions (You may not need set functions) - Develop a search function.
إيش المقصود فيهم
وهل
Function Print
صحيحة عندي
وشكرا ً لكم ..
