Write a C++ code to implement level of inheritance. Note: please solve asap and remove plagiarism make it different from others which already available on Bartleby and chegg .I have also included half...


Write a C++ code to implement level of inheritance.


Note: please solve asap and remove plagiarism make it different from others which already available on Bartleby and chegg .I have also included half code in picture . but it is taken from chegg .make which not available on internet.remove plagiarism.


Telenor<br>O K/s<br>95 14 4:02 AM<br>#include<iostream><br>#include<string><br>using namespace std;<br>class Staff{<br>public:<br>int code;<br>string Name;<br>public:<br>Staff(){} //default constructor<br>Staff(int code,string Name){ //parameterized<br>constructor<br>this->code = code;<br>this->Name = Name;<br>}<br>Staff(const Staff &s){ //copy constructor<br>this->code = s.code;<br>this->Name = s.Name;<br>}<br>int getCode(){ //getter function<br>return code;<br>}<br>void setCode(int c){ //setter function<br>code = c;<br>}<br>string getName(){ //getter function<br>||><br>

Extracted text: Telenor O K/s 95 14 4:02 AM #include #include using namespace std; class Staff{ public: int code; string Name; public: Staff(){} //default constructor Staff(int code,string Name){ //parameterized constructor this->code = code; this->Name = Name; } Staff(const Staff &s){ //copy constructor this->code = s.code; this->Name = s.Name; } int getCode(){ //getter function return code; } void setCode(int c){ //setter function code = c; } string getName(){ //getter function ||>
Staff<br>code<br>Name<br>Faculty<br>Officer<br>Department<br>Typist<br>Rank<br>Subject Taken<br>Office<br>Grade<br>Research Area<br>Speed<br>Permanent<br>Casual<br>Salary<br>daily wages<br>1. Write getter/setters, display function, parameterized, default and copy constructor.<br>2. Write a calculateSalary() function in the Typist class and override the definition in<br>permanent and casual.<br>3. Write a 'main' function and create objects of all classes in main and call the public<br>methods of all classes.<br>

Extracted text: Staff code Name Faculty Officer Department Typist Rank Subject Taken Office Grade Research Area Speed Permanent Casual Salary daily wages 1. Write getter/setters, display function, parameterized, default and copy constructor. 2. Write a calculateSalary() function in the Typist class and override the definition in permanent and casual. 3. Write a 'main' function and create objects of all classes in main and call the public methods of all classes.
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here