W
Wahoo
Dear All,
Hello! I am new to C++
my teacher had give me a homework and I found there are problem in my code,
please give advise if possible, thanks!
question:
he ABC Human Resources Management System has a class called Employee which
provided each employee a unique 4-digits ID when an employee record was
created. The system also keeps each employee's first name, last name, hourly
salary and total working hour of the month as record. The system obtains
each
employee's monthly salary by calling Employee class's member function,
CalculateSalary(), which multiply total working hour of the month and hourly
salary then output the result.
Write the class Employee by C++
My code:
#include <iostream>
#include <stdlib.h>
#include <string>
class Employee {
public:
string first_name;
string last_name;
int hourly_salary;
int total_work_hour;
public:
class CalculateSalary() {
return hourly_salary * total_work_hour;
}
}}
~ Let us linux ~
Hello! I am new to C++
my teacher had give me a homework and I found there are problem in my code,
please give advise if possible, thanks!
question:
he ABC Human Resources Management System has a class called Employee which
provided each employee a unique 4-digits ID when an employee record was
created. The system also keeps each employee's first name, last name, hourly
salary and total working hour of the month as record. The system obtains
each
employee's monthly salary by calling Employee class's member function,
CalculateSalary(), which multiply total working hour of the month and hourly
salary then output the result.
Write the class Employee by C++
My code:
#include <iostream>
#include <stdlib.h>
#include <string>
class Employee {
public:
string first_name;
string last_name;
int hourly_salary;
int total_work_hour;
public:
class CalculateSalary() {
return hourly_salary * total_work_hour;
}
}}
~ Let us linux ~