Home > Back-end >  The following code how to implement some functions plus a copy constructor?
The following code how to implement some functions plus a copy constructor?

Time:01-04

The class person
{
Public:
Virtual void the add ()=0;
};
The class worker
{
Public:
The worker () {}
Void the show ();//worker information display
~ the worker () {}
Friend class WorkerList;
Private:
String num, name, sex, edu, address, tel;
Int the age, salary;
};

The class WorkerList: public person
{
Private:
The worker w [N].
Int NUM.//used to calculate the worker number
int count;//used to record the current operation temporarily which one worker
Public:
Void the add ();//worker information input
Void the sort ();//worker information sorting
Void the search ();//worker find information
Void dele ();//worker information delete
Void the modify ();//worker information modify
Void showworker ();//show the worker information on the screen
WorkerList () {
NUM=0;
Count=0;
}
};
  • Related