Questions: 11 448

Answers by our Experts: 10 707

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

Define the classes using hierarchy inheritance. An organization has two types of employees: Regular and Adhoc are derived class. Regular employees get a salary which is Basic salary + DA + HRA where DA is 10% of basic and HRA is 30% of basic. Adhoc employees are daily wagers who get a salary which is equal to Number oh hours * Wages amount. The employee base class consisting of member variables such as name and empid. When a regular employee is created, basic salary must be a parameter. When Adhoc employee is created wages amount must be a parameter. Define the member functions for each class and the member function days( ) updates number of the Adhoc employee.

 Write the pseudocode for a program that accepts a series of integers (the user should decide  how many) and stores them in an array. The program should then pass these values one at a  time to a function called even which returns 1 if the number is even and 0 if the number is odd.


 Write the pseudocode for a program that uses a two-dimensional array to compute and display  the multiplication table shown below. The user should decide the value of n in the example  below its 6: (5 Marks) * 1 2 3 4 5 6 

1 2 2 3 4 5 6 

2 2 4 6 8 10 12 

3 3 6 9 12 15 18 

4 4 8 12 16 20 24 




program that computes the area of either a rectangle, a circle or a  right-angled triangle. The program should display a menu that enables the user to select the  type of figure whose area he/she wants to compute. Depending on the user’s choice, the  program should prompt for the dimensions and perform the computations. The output should  be: - The type of figure, the dimensions and the area. Define three functions: - one to  compute the area of a rectangle, one the area of a circle and one the area of a triangle. NB: 1. The calculation should be for only one figure at any one time.  

 2. Computations should be done in the user-defined functions.




Problem 3

Var x;

While (x <= 5) {

               Print ();

               x = x + 1;

}

What is the answer?

1.      If x = 3

Answer = ?

2.      If x = 1

Answer = ?


Problem 2

Var price;

Var item;

If (item >= 10)

               Print (price * item);

Else

               Print (price);

What is the answer?

1.      If price = 5

Item = 9

Answer = ?

2.      If price = 5

Hours = 15

Answer = ?


Problem 1

Var rate;

Var hours;

If (hours >= 40)

               Print ((rate * 40) + rate);

Else

               Print (rate * 40);

What is the answer?

1.      If rate = 850

Hours = 40

Answer =

2.      If rate = 850

Hours = 20

Answer =


Design and develop programs for evaluating the equations: Implement it

Write a C++ Program to do the following. • Create a structure called Employee that includes employee ID (string), name of the employee (string), the over-time fee (float) and the number of overtime hours during the weekdays (int aray). • Write a function called getEmp() which is the data type of Employee that reads the details of Employee and store them in the variable of the Employee structure. Hint: Use the given function prototype as Employee getEmp(Employee e); Write a function called calOTpayment() which takes three parameters, over-time fee of the employee, number of over-time hours in weekdays (5 days) array and the size of the array. Find the total payment for the employee and print the total Overtime fee for Weekdays. • Call the getEmp() and calOTpayment() in the main function to print the following output as required.




Assignment

•read an integer from input file 1.

•read an integer from input file 2.

•if both were successful:

◦Multiply these input values, and store the result.

◦Write the value in output file.

◦Add the value to an accumulator.

◦Increment a counter.

•If the input file 1 read was not good, and the eof has not been reached,

◦print “ERROR: “ and the counter variable.

◦End the loop.

•If the input file 2 read was not good and the end of the file has not been reached,

◦print “ERROR: “ and the counter variable.

◦End the loop.

•If the write to the output file was not good:

◦print “ERROR: “ and the counter variable.

◦End the loop.

After the loop, your program should print out “Program completed after “ counter“ numbers read.” The program should then let the user know if either file was not finished or if both were finished. The program should then print out the final accumulator value


LATEST TUTORIALS
APPROVED BY CLIENTS