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
natima [27]
2 years ago
11

Given two int variables , firstplacewinner and secondplacewinner, write some code that swaps their values . declare any addition

al variables as necessary.
Computers and Technology
1 answer:
Mekhanik [1.2K]2 years ago
5 0
Int tmp;
tmp = firstplacewinner;
firstplacewinner = secondplacewinner;
secondplacewinner = tmp;
You might be interested in
Imma say something random...
Fynjy0 [20]

Answer:

Uh I don't understand what you said.

Explanation:

N/A

5 0
2 years ago
Read 2 more answers
Who tryna trade in gta my psn is xMadOrNawx-_-
barxatty [35]
Ok I’ll add you to day
5 0
2 years ago
Read 2 more answers
Design a class named Employee. The class should keep the following information in member variables:
Paha777 [63]

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;

}

7 0
2 years ago
The first step to changing lanes is
lisov135 [29]
It’s obviously C.Signaling your intent by using your blinkers also known as the lights at the back of your car!
3 0
3 years ago
Read 2 more answers
What is a “spoof” of an ad ?
kykrilka [37]
I think a spoof of an ad is the study of an ads rhetorical devices that is what I think I am not completely sure
5 0
3 years ago
Read 2 more answers
Other questions:
  • What would be some long- term goals.
    11·1 answer
  • When looking to ensure your website is easily accessible by mobile users, what should you focus on doing first
    8·1 answer
  • What are two types of formulas in Excel
    13·2 answers
  • Managers looking for advice on properly dealing with obsolete technology hardware can: a) consult the e-Stewards program b) seek
    9·1 answer
  • Moore's Law postulates that:This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this t
    6·1 answer
  • Fill in the blanks in the SQL statement below that will list the invoice number, invoice total and credit which is the total sum
    14·1 answer
  • Which of the following is not an advantage of e-commerce for consumers?
    13·2 answers
  • Who's hype for Halo Infinite?
    11·2 answers
  • given the variables temperature and humidity, write an expression that evaluates to true if and only if the temperature is great
    11·1 answer
  • and assuming main memory is initially unloaded, show the page faulting behavior using the following page replacement policies. h
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!