You must Sign In to post a response.
  • Category: Programming

    Please help me with the following code


    Finding difficulty in writing classes in C++? Looking out for solution to the above problem? On this page our experts shall repsond to your query.

    Employees have a number, date of birth (dd-mm-yyyy), rank, and salary. When an employee is first recruited then all these are given values of 0. Upon confirmation, the actual values of these are entered for the employee. Employees can be given a salary raise of 10% of their previous salary. Their rank can be incremented by 1 and when this happens an employee gets an increment of 25%.

    Write a C++ class for Employee.
  • Answers

    1 Answers found.
  • Here is the C++ class for employees:

    #include #include struct Employee { // Employee's private data. char * name ; int rank ; int salary ; }; // Update the fields of a string of employee data. string updateEmployee ( const Employee& employee , string name , const string * state ) { const std :: string & name = name ; const std :: string & rank = rank ; const std :: string & salary = salary ; return ++ updateEmployee ( employee , updateEmployee ( employee , updateEmployee ( employee , state ), & name , updateEmployee ( employee , updateEmployee ( employee , state ), & rank , & salary ) ); }

    Fear is The Path to Dark Side.


  • Sign In to post your comments