Question: i need help in this CS 162 Assignment 08 (operator overloading + review of this keyword + friend as well as the -> operator )

i need help in this CS 162 Assignment 08 (operator overloading + review of this keyword + friend as well as the -> operator ) Date: Nov 18 2020

For the current weeks assignment, you will do the following: Review the programs (ceo.h and ceo_impl.cpp and ceo_driver.cpp) shown below. Complete the sections outlined in red in the ceo_driver.cpp file:

ceo.h #include using namespace std;

class ceo{

friend ceo update_ceo (ceo);

private: string ceo_name; string company_name; int job_duration;

public: ceo(){}; ceo(string, string, int);

bool operator==(ceo);

}; ceo_impl.cpp #include using namespace std; #include "ceo.h"

ceo::ceo(string cname, string cmp_nm, int cduration){ ceo_name = cname; company_name = cmp_nm; job_duration = cduration; }

bool ceo::operator==(ceo c){ Complete the function body }

ceo_driver.cpp #include #include #include using namespace std; #include "ceo.h"

void compare_ceos(ceo current, ceo past){ // Complete the function body }

int main(){

ceo current_ceo("Otellini", "Intel", 10); ceo past_ceo("Bryant","Intel", 25); compare(current_ceo, past_ceo); return 0;

}

Sample Output: ############### These are two different CEO's ###############

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!