c++ programing.
Objectives
Define a class called Person with private members name of type string, and money of integer type. The class has the public member functions set(), getMoney(), print(), and a parameterized constructor with default values.
Define a class called Patient with private data members name of type string, durationOfTreatment, and TreatmentCost of type integer. The class has the public member functions set(), getCost(), getDuration(), print(), and a parameterized constructor with default values.
Define a class called Doctor that publicly inherits the class Person and has the private members numberOfPatients,totalCost, list[] (an array of type Patient), and calculateTotalCost(). The class has the public member functions set(), print(), and a parameterized constructor with default values.
Implement all member functions, enforcing the principle of least privileged.
The following driver produces the given sample input / output.
int main()
{
Doctor Hakeem;
Hakeem.set("Ali Omar", 3000, 3);
Hakeem.print();
return 0;
}
Sample input / output:
Enter the name, duration, and cost of treatment number 1: Allergies 23 150
Enter the name, duration, and cost of treatment number 2: Bronchiectasis 15 280
Enter the name, duration, and cost of treatment number 3: Gallstones 10 50
Ali Omar has 3000 dirham and treated the following patients:
Allergies was treated for 23 minutes, at a cost 150 dirham per minute
Bronchiectasis was treated for 15 minutes, at a cost 280 dirham per minute
Gallstones was treated for 10 minutes, at a cost 50 dirham per minute
The total cost of the 3 patients is 8150 dirham
The overall total of money is 11150 dirham
In: Computer Science
In: Operations Management
Given the relation R = {(n, m) | n, m ∈ ℤ, n ≥ m}. Which of the following statements about R is correct?
|
R is not a partial order because it is not antisymmetric |
|
|
R is not a partial order because it is not reflexive |
|
|
R is a partial order |
|
|
R is not a partial order because it is not transitive |
In: Computer Science
A liquid stream ,F, containing A and B is fed to a distillation column.
If the rectification operating equation is of the form y = mx + b
(in terms of the more volatile component):
1) What is the slope, m, of the rectification operating line?
(Correct answer is 0.75610)
2) What is the intercept, b, of the rectification operating line?
(Correct answer is 0.21951)
3) What is the intersection of the feed and rectification operating
lines, x , y? (Correct answer is 0.620995, 0.689045)
*The correct answers are there please show work on how to get the answer given*
In: Other
Complete the following recursively defined functions.
Base case ?(0)=3
Recursive case ?(?) = 3?(? − 1) + 7 for n ≥ 1.
?(1) = ______
f(2) = _______
f(3) = ______
f(4) = ______
Base case ?(0)=1, ?(1)=2
Recursive case ?(?) = ?(? − 1)?(? − 2) for n ≥ 2.
g(2) = ______
g(3) = ______
g(4) = ______
g(5) = ______
In: Computer Science
In: Nursing
Sara’s Salsa Company produces its condiments in two types: Extra Fine for restaurant customers and Family Style for home use. Salsa is prepared in department 1 and packaged in department 2. The activities, overhead costs, and drivers associated with these two manufacturing processes and the company’s production support activities follow.
| Process | Activity | Overhead cost | Driver | Quantity | ||
| Department 1 | Mixing | $ | 4,800 | Machine hours | 1,200 | |
| Cooking | 11,100 | Machine hours | 1,200 | |||
| Product testing | 112,800 | Batches | 750 | |||
| $ | 128,700 | |||||
| Department 2 | Machine calibration | $ | 265,000 | Production runs | 400 | |
| Labeling | 10,000 | Cases of output | 165,000 | |||
| Defects | 6,500 | Cases of output | 165,000 | |||
| $ | 281,500 | |||||
| Support | Recipe formulation | $ | 93,000 | Focus groups | 60 | |
| Heat, lights, and water | 30,000 | Machine hours | 1,200 | |||
| Materials handling | 68,000 | Container types | 10 | |||
| $ | 191,000 | |||||
Additional production information about its two product lines follows.
| Extra Fine | Family Style | |||
| Units produced | 23,000 | cases | 142,000 | cases |
| Batches | 230 | batches | 520 | batches |
| Machine hours | 400 | MH | 800 | MH |
| Focus groups | 30 | groups | 30 | groups |
| Container types | 7 | containers | 3 | containers |
| Production runs | 230 | runs | 170 | runs |
Required:
1. Using a plantwide overhead rate based on cases,
compute the overhead cost that is assigned to each case of Extra
Fine Salsa and each case of Family Style Salsa. PLANT OVERHEAD RATE
? $___ PER CASE
2. Using the plantwide overhead rate, determine
the total cost per case for the two products if the direct
materials and direct labor cost is $6 per case of Extra Fine and $5
per case of Family Style. EXTRA FINE ___ PER UNIT.. FAMILY STYLE
___PER UNIT
3.a. If the market price of Extra Fine Salsa is
$17 per case and the market price of Family Style Salsa is $8 per
case, determine the gross profit per case for each product. EXTRA
FINE ____ FAMILY STYLE ____
3.b. What might management conclude about the
Family Style Salsa product line?
5. If the market price is $17 per case of Extra Fine and $8 per case of Family Style, determine the gross profit per case for each product. (Round your intermediate calculations and final answers to 2 decimal places.
|
In: Accounting
Using C++
If you have 2 plants (A and B) with the hight of plant A is less than the hight of plant B. However, the hight of plant A is growing faster than the hight of plant B (the hight is measured in centimetres and the hight growth rate is matured daily). Write a program that prompts the user to enter the hight and the hight growth rate of each plant. The program should check that the hight of plant A is less than the hight of plant B and that the growth rate of plant A is higher than the growth rate of plant B and it should not work otherwise. The program outputs after how many days the hight of plant A will be greater than or equal to the hight of plant B, and the hight of both plants at that time.
A sample input and output is as follows:
First Run:
Enter the hight of plan A (in centimetres): 26
Enter the hight growth rate of plant A: 0.04 Enter the hight of plant B: 25
Enter the hight growth rate of plant B: 0.02
Plant A hight should be less than plant B hight and plant A growth rate should be higher than plant B growth rate.
Second Run:
Enter the hight of plan A (in centimetres): 22
Enter the hight growth rate of plant A: 0.04
Enter the hight of plant B: 25
Enter the hight growth rate of plant B: 0.02
The hight of plant A will be greater than or equal to the hight of plant B after 7 days.
Plant A hight will become 28.9505
Plant B hight will become 28.7171
In: Computer Science
Justify the statement “Spam detection is perhaps the classic example of pattern recognition”.
In: Computer Science
Question1: Define a class Human that contains: - The data fields "first name" and "last name" - A constructor that sets the first and last name to the instance variables. Create also a no-argument constructor - A getName() method which prints the first and last name Define the class Student which inherits Human and contains: - Private data field "mark" of type integer and a constructor which calls the superclass constructor Define the class Worker which inherits Human and contains: - Private date fields "wage" and "hours worked", and a constructor which calls the superclass constructor - A setWageInfo() method which sets the wage information to the instance variables - A calculateWage() method which calculates a worker’s salary based on wage and hours worked Write a program called HumanTest that instantiates two Human objects (one using the noargument constructor and another using the constructor with parameters). Call the method getName(). Create a Student object which calls the getName() method. Create a Worker object which calls the methods getName(), setWageInfo(), and claculateWage().
In: Computer Science
16. Explain the concept of Globalization Strategy and provide real examples.
17. Explain the concept of Service Technology and provide examples.
18. Explain the concept of Virtual Network Structure and provide examples.
19. Explain the difference between the concepts of Business Management and Technology Management. Provide examples.
20. Concepts such as ‘civic responsibility,’ ‘social responsibility;’ what do they have in common? Provide examples.
In: Operations Management
In: Psychology
Prepare an ONE Page Reflection on Perceiving Depth and Size
In: Psychology
Consider the different grief models and Bonanno's book, what are some things you can do/think or not do/think that will improve your chances of having a resilient response to the loss.
In: Psychology
In: Biology