{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Student s3 spear britney f 22 naperville central

Info icon This preview shows pages 3–5. Sign up to view the full content.

View Full Document Right Arrow Icon
Student s3( "777-77-7777" , "Spear, Britney" , 'F' ,22, "Naperville Central" ,66,3.50); Student s4( "600-00-0006" , "Crosby, Bin" , 'M' ,31, "Westmont Central" ,58,2.20); Student s5( "300-00-0003" , "Firby, Mary" , 'F' ,25, "Lombard North" ,73,3.75); Student s6( "100-00-0001" , "Carlen, Joan" , 'F' ,27, "ElmTech" ,45,1.94); // display all student objects cout << "\nReport#2 - All student objects:\n" ; s1.getData(); s2.getData(); s3.getData(); s4.getData(); s5.getData(); s6.getData(); // change teachers' salaries t1.changeSalary(); t2.changeSalary(); t3.changeSalary(); t4.changeSalary(); // display all teacher objects again cout << "\nReport#3 - All teacher objects:\n" ; t1.getData(); t2.getData(); t3.getData(); t4.getData(); // change students' GPA s1.changeGPA(); s2.changeGPA(); s3.changeGPA(); s4.changeGPA(); s5.changeGPA(); s6.changeGPA(); // display all student objects again cout << "\nReport#4 - All student objects:\n" ; s1.getData(); s2.getData(); s3.getData(); s4.getData(); s5.getData(); s6.getData(); return 0; } H41 – Output: H42 (or iLab4) – Program Source Code: //************************************************************** **** // iLab 4 //************************************************************** **** #include <iostream> #include <iomanip> #include <string> #include <stdlib.h> usingnamespace std; class Benefit
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
CIS-247C Homework H4 solutions 3/27/2012 { private : string healInsure; double lifeInsure; int vacDays; public : Benefit() { healInsure= "not provided" ; lifeInsure=0.0; vacDays=14; } Benefit(string h, double l, int v) { healInsure=h; lifeInsure=l; vacDays=v; } Benefit(Benefit &my) { healInsure = my.healInsure; lifeInsure = my.lifeInsure; vacDays = my.vacDays; } void setHealInsure(string h) { healInsure=h; } void setLifeInsure( double l) { lifeInsure=l; } void setVacDays( int v) { vacDays= v; } void setBenefit(string h, double l, int v) { healInsure=h; lifeInsure=l; vacDays=v; } string getHealInsure() { return healInsure; } double getLifeInsure() { return lifeInsure; } int getVacDays() { return vacDays; } void getBenefit() { cout<< "\nBenefit Information\n" ; cout<< "=============================================\n" ; cout<< "Health Insurance:\t" <<healInsure << "\n" ; cout<< "Life Insurance:\t\t" <<lifeInsure << "\n" ; cout<< "Vacation days:\t\t" <<vacDays << " days\n" ; } }; // end of the "Benefit" class //-------------------------------------------------------------- ---- // The "iEmployee" class (an abstract class or an interface) //-------------------------------------------------------------- ---- class iEmployee { public :
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern