Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a C++ program that asks the user to store the basic salaries of 50 employees in a 1-D array called Salaries and their overtime hours in a 1-D array called OvertimeHours (5 points). Each employee will be paid $30 for each overtime hour. The program should call a functions to do each of the following:

 

·       Store in an array called finalSalaries the final salaries of the 50 employees. An employee’s final salary is computed as the sum of the basic salary and the earned overtime payments. Also note that a 4% income tax is deducted from the computed final salary. (5 points).

·       Output an ascending sorted list of the employees’ final salaries. (5 points).

·       Increase by 2% the basic salaries of the employees who worked for more than 10 overtime hours. (5 points).



Write a C++ program to calculate the total marks of each student of a class. This class takes the

following subjects Physics, Chemistry and Mathematics. Your program shall be able to calculate the

total marks for each student, this is the sum of marks from the three subjects


Q3.Create a bookstore in the following manner: 10
• Add books in a bookstore using a member function, count and display the number of books in a bookstore

Given N and need print the pattern given below


input:

N = 5

output :

2 6 

3 7 10

4 8 11 13

5 9 12 14 15


Write a program to  input  name,  roll  number  and  marks  in  5  subjects  for  n  number  of students using structure.  Write  functions  to: -

a.   Find  total  marks  and  percentage  of  all  n  students.

b.   Display  details  of  a  student  with  a  given  roll  number.

c.   Display  the  details  for  all  the  students  having  percentage  in  a  given  

     range.

d.   Sort  the  array  in  ascending order of marks.


a) Formulate a linear programming model for this problem. EV (10marks)

 

b) Use solver to find optimal solution and sensitivity report.           CR (5marks)

 

c) Management have asked you to determine the optimal solution. Write your answer in a form of a report to be submitted to the management.         AN (5marks)

Advice the management about objective function value corresponding to your answer in (b).           


Define a class named COMPLEX for representing complex numbers that contains necessary data members and member functions. A complex number has the general form a + ib, where a is the real part and b is the imaginary part (i stands for imaginary). Include methods for all the four

basic arithmetic operators.
Consider the class definition below and answer the questions that follow:

class InsurancePolicy
{
public:
InsurancePolicy();
InsurancePolicy(int pNr, string pHolder, double aRate);
~InsurancePolicy();
void setPolicy(int pNr, string pHolder, double aRate);
int get_pNr()const;
string get_pHolder()const;
double get_aRate()const;
private:
int policyNr;
string policyHolder;
double annualRate;
};

(d) Add a member function
void showPolicy(ostream & out)const;
to the class InsurancePolicy as well as to the class CarInsurance in order
to display the member variables of InsurancePolicy and CarInsurance.
Consider the class definition below and answer the questions that follow:

class InsurancePolicy
{
public:
InsurancePolicy();
InsurancePolicy(int pNr, string pHolder, double aRate);
~InsurancePolicy();
void setPolicy(int pNr, string pHolder, double aRate);
int get_pNr()const;
string get_pHolder()const;
double get_aRate()const;
private:
int policyNr;
string policyHolder;
double annualRate;
};

(c) Implement the class CarInsurance and use the code below to implement
setPolicy():
void CarInsurance:: setPolicy(int pNr, string pHolder,
double aRate, double
eValue)
{
policyNr = pNr;
policyholder = pHolder;
annualRate = aRate;
excess = eValue;
}
You should obtain the following errors:
Explain why setPolicy()is not a legal definition in the derived class
CarInsurance?
Suggest two ways to fix this problem.
Consider the class definition below and answer the questions that follow:

class InsurancePolicy
{
public:
InsurancePolicy();
InsurancePolicy(int pNr, string pHolder, double aRate);
~InsurancePolicy();
void setPolicy(int pNr, string pHolder, double aRate);
int get_pNr()const;
string get_pHolder()const;
double get_aRate()const;
private:
int policyNr;
string policyHolder;
double annualRate;
};

(b) Code the interface for a class CarInsurance derived from class
InsurancePolicy (the base class). This class has an additional member
variable, excess. Class CarInsurance also has member functions, get_excess() and set_excess()to return member variable excess and
update member variable excess respectively. The class CarInsurance should
override function setPolicy() in order to update the member variables of
CarInsurance.
LATEST TUTORIALS
APPROVED BY CLIENTS