#include<iostream>
using namespace std;
class Customer{
private:
string name;
int custID;
public:
Customer(){
}
Customer(string n, int id){
name = n;
custID = id;
}
void input(){
cout<<"Enter customer name\n";
cin>>name;
cout<<"Enter customer id\n";
cin>>custID;
}
void display(){
cout<<"The customer name is: "<<name;
cout<<"\nThe customer id is: "<<custID;
}
};
int main(){
Customer c;
c.input();
c.display();
}
The code fragment is not provided as instructed in the question.
The question is not complete
class Employee: protected Person{
public:
double Rate;
double GetRate() const;
double GetHours() const;
private: double Hours;
protected: double Pay() const;
}
int main(){
}
Comments
Leave a comment