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
Explain what mistake Miranda made in the following scenario. Situation: Miranda suspects that there may be a problem with the ha
Dennis_Churaev [7]

Answer: Answer below.

Explanation:

I'm not fully sure myself, so don't agree with me fully.

I believe what she may have done wrong is tell the technician about a "program." A program doesn't have to do anything with physical hardware.

5 0
3 years ago
Read 2 more answers
What are the supercomputers and where are they used? ​
viktelen [127]

Answer:

Giant Tech Company mostly

Explanation:

they used it as their server or storing data, right now example we googling by that we send the requests from our computer to supercomputers and those computer will find that information your and send back the respond (e.g. website Brainly). Supercomputers = computers sample as that.

6 0
2 years ago
What do you understand by Multiprotocol Label Switching, how it works and is helpful in today's network scenario.
Minchanka [31]

Answer:

Multiprotocol Label Switching (MPLS): It is a routing technique in telecommunications networks that transfers data from 1 node to next node based upon shortest paths instead of long network addresses, hence it avoids rigorous findings in a routing table and speeds the flow of traffic

MPLS provides better performance,scalability,better bandwidth utilization,a better end-user experience and reduced network congestion.Hence it is useful in today's network scenario.

7 0
3 years ago
I will mark you as BRAINLIEST if you give me the correct answer of the questions... Pls asap with all details i am time limited
Alex_Xolod [135]

Answer:

11. 1million square decimetres (from online)

20. assuming room is rectangular,

length= (p - 2b)/2

because perimeter= 2 length + 2 breadth for rectangular

6 0
2 years ago
Read 2 more answers
Using a tag, set the color to green for all tags.
nordsb [41]

Answer:

<style>

p {

background-color: rgb(255, 0, 0);

}

h1 {

background-color: rgb(0, 255, 0);

}

ol {

background-color: rgb(97,51,47);

}

</style>

Explanation:

Put this at the top of your code. It should target the paragraph tag, the header h1 tag, and the Ordered List (OL) tag individually and set their background colors respectively.

It's been a while since I've done CSS so you might have to tweak the syntax a bit, but it should look something like that.

5 0
2 years ago
Other questions:
  • Which key removes all data from an active cell with one click
    7·2 answers
  • Question 4 (2 points)
    6·2 answers
  • Alkane is a Variety of which fruit
    6·1 answer
  • Which of the following is not part of the four ways you can avoid problems with email communication?
    12·1 answer
  • Use the drop-down menus to complete the statements about message marking, categorizing, and flagging.
    13·2 answers
  • What is the next line?
    6·2 answers
  • The __________ statement allows you to check for
    7·1 answer
  • Professional communication must be objective,
    8·1 answer
  • What is the difference between Remote Assistance and Remote Desktop?
    5·1 answer
  • A pseudo code that asks the user for their forename and their surname , and then outputs both, separated by a space to the user​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!