1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nutka1998 [239]
2 years ago
5

Design a class named Employee. The class should keep the following information in member variables:

Computers and Technology
1 answer:
Paha777 [63]2 years ago
7 0

Answer:

Here is the code.

Explanation:

#include <iostream>

#include <cstdlib>

#include <string>

#include <iomanip>

using namespace std;

class Employee

{

private:

string employeeName;

int employeeNumber;

int hireDate;

public:

void setemployeeName(string employeeName);

void setemployeeNumber(int);

void sethireDate(int);

string getemployeeName() const;

int getemployeeNumber() const;

int gethireDate() const;

Employee();

};

void Employee::setemployeeName(string employeeName)

{

employeeName = employeeName;

}

void Employee::setemployeeNumber(int b)

{

employeeNumber = b;

}

void Employee::sethireDate(int d)

{

hireDate = d;

}

string Employee::getemployeeName() const

{

return employeeName;

}

int Employee::getemployeeNumber() const

{

return employeeNumber;

}

int Employee::gethireDate() const

{

return hireDate;

}

Employee::Employee()

{

cout << "Please answer some questions about your employees, ";

}

class ProductionWorker :public Employee

{

private:

int Shift;

double hourlyPay;

public:

void setShift(int);

void sethourlyPay(double);

int getShift() const;

double gethourlyPay() const;

ProductionWorker();

};

void ProductionWorker::setShift(int s)

{

Shift = s;

}

void ProductionWorker::sethourlyPay(double p)

{

hourlyPay = p;

}

int ProductionWorker::getShift() const

{

return Shift;

}

double ProductionWorker::gethourlyPay() const

{

return hourlyPay;

}

ProductionWorker::ProductionWorker()

{

cout << "Your responses will be displayed after all data has been received. "<<endl;

}

int main()

{

ProductionWorker info;

string name;

int num;

int date;

int shift;

double pay;

cout << "Please enter employee name: ";

cin >> name;

cout << "Please enter employee number: ";

cin >> num;

cout << "Please enter employee hire date using the format \n";

cout << "2 digit month, 2 digit day, 4 digit year as one number: \n";

cout << "(Example August 12 1981 = 08121981)";

cin >> date;

cout << "Which shift does the employee work: \n";

cout << "Enter 1, 2, or 3";

cin >> shift;

cout << "Please enter the employee's rate of pay: ";

cin >> pay;

info.setemployeeName(name);

info.setemployeeNumber(num);

info.sethireDate(date);

info.setShift(shift);

info.sethourlyPay(pay);

cout << "The data you entered for this employee is as follows: \n";

cout << "Name: " << info.getemployeeName() << endl;

cout << "Number: " << info.getemployeeNumber() << endl;

cout << "Hire Date: " << info.gethireDate() << endl;

cout << "Shift: " << info.getShift() << endl;

cout << setprecision(2) << fixed;

cout << "Pay Rate: " << info.gethourlyPay() << endl;

system("pause");

return 0;

}

You might be interested in
What is the next line?
Evgen [1.6K]

Answer:3

Explanation: it’s 3

3 0
3 years ago
Read 2 more answers
Who has played pokemon red, blue, or yellow on the gameboy
lisov135 [29]

Answer:

I didn't think this would be an actual question... I did- :3

3 0
3 years ago
Read 2 more answers
Please someone help!!!!
Montano1993 [528]

Answer:

do what the directions say and you should be able to figure out the answer if not contact me through brainly

Explanation:

3 0
3 years ago
Suppose there are 10 computers on a network that are configured to share a few printers and a single document folder. The compan
ivanzaharov [21]

Answer:

B- Workgroup model

Explanation:

A workgroup model can be defined as a process which enables system to be peer together in order to access the resources shared like files and printers at the same time.

In work group microsoft operating systems tend to share files, printers, and even Internet connection among them which is why work group is important especially in a place in which their are various computers with limited files and printer or internet connection.

4 0
3 years ago
A lead views a specific page on your website, say, your case study page. You then send targeted follow-up content like one of yo
IRINA_888 [86]

Answer:

Behavioral Email                                

Explanation:

A behavioral email is an automated email which is sent to recipients on the basis of their behavior. These emails are sent after a user communicates with a business on social media, the company’s website, email, and other communication medium. Behavioral emails help to grow customer involvement and sales. Behavioral email can also be used as a marketing strategy, used by marketers to gather data about an email subscriber in order to send targeted content to that subscriber on the basis of his behavior or actions. When the marketer sends an email to the customer, it is appropriate for that customer, based on the data gathered and their current monitored behavior. Behavioral email helps to understand costumer needs. It helps to get an idea of a customers preferences by inspecting his behavior.

5 0
3 years ago
Other questions:
  • What does it mean to be self demanding?
    12·1 answer
  • Write a Java program to count the characters in each word in a given sentence?Examples:Input : geeks for geeksOutput :geeks-&gt;
    10·1 answer
  • What tool should you use to look for information on a network?
    14·2 answers
  • Drag the tiles to the correct boxes to complete the pairs.
    13·1 answer
  • Decimal numbers is equivalent to binary 110
    5·1 answer
  • Instruction: Decide what the total marketing budget will be, and make a list of at least four things you will spend money on and
    15·1 answer
  • If an if-else statement is true, it will include which kinds of results?
    6·1 answer
  • Please help me with coding!
    7·2 answers
  • Anyone knows the answer for 6.1.4 Happy Birthday! codehs
    13·1 answer
  • What will be the result from running the following program?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!