Write a C++ program to create and manipulate an indexed list of employees
Write a C++ program to create and manipulate an indexed list of employees. The
class employee has two data members: the name and phone number of an employee, and
four member functions: setName(), displayName(), setPhone() and displayPhone().
For a driver program that will create an object, called myEmployeeList, which is an
indexed list of N employees. The driver will also sort the employee list using the selection sort
algorithm and display the sorted list. The selection sorting algorithm should be implemented
in the template class indexList.
Output is here ::::
List of type "Employee"
Enter number of employees: 3
Enter next name: Simon
Enter next phone number: 323-2200
Enter next name: Brain
Enter next phone number: 888-0000
Enter next name: Mark
Enter next phone number: 321-0000
Employee list sorted in ascending order:
Brain
Mark
Simon
Answers
Status NEW
Posted 13 Jun 2017 05:06 AM
My Price 5.00
-----------
Attachments
file 1497331770-Answer.docx preview (607 words )
#-----------inc-----------lud-----------e &-----------quo-----------t;s-----------tda-----------fx.-----------h&q-----------uot-----------; -----------#in-----------clu-----------de -----------&am-----------p;l-----------t;i-----------ost-----------rea-----------m&a-----------mp;-----------gt;----------- #-----------inc-----------lud-----------e &-----------amp-----------;lt-----------;st-----------rin-----------g&a-----------mp;-----------gt;----------- u-----------sin-----------g n-----------ame-----------spa-----------ce -----------std-----------; -----------//d-----------ecl-----------are----------- th-----------e c-----------las-----------s e-----------mpl-----------oye-----------e -----------cla-----------ss -----------Emp-----------loy-----------ee ----------- { ----------- pu-----------bli-----------c: ----------- ----------- /-----------/de-----------cla-----------re -----------the----------- fu-----------nct-----------ion-----------s ----------- ----------- Em-----------plo-----------yee-----------();----------- ----------- -----------voi-----------d s-----------etN-----------ame-----------(st-----------rin-----------g e-----------nam-----------e);----------- ----------- -----------voi-----------d s-----------etP-----------hon-----------e(s-----------tri-----------ng -----------pho-----------ne)-----------; ----------- ----------- vo-----------id -----------dis-----------pla-----------yNa-----------me(-----------); ----------- ----------- v-----------oid----------- di-----------spl-----------ayP-----------hon-----------e()-----------; ----------- ----------- st-----------rin-----------g n-----------ame-----------; ----------- ----------- st-----------rin-----------g p-----------hon-----------eNu-----------m; ----------- };----------- /-----------/co-----------nst-----------ruc-----------tor----------- E-----------mpl-----------oye-----------e::-----------Emp-----------loy-----------ee(-----------) -----------{ ----------- ----------- na-----------me=-----------&qu-----------ot;-----------&qu-----------ot;-----------;
Not Rated(0)