107 750
Assignments Done
100%
Successfully Done
In May 2024

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

Problem: The program will determine the gross wages of each employee type, salaried and hourly, and output the total gross wages to be paid for each employee type.

Prompt the user to enter the number of employee wages to be calculated.

1.The program will end when the data for all the employees has been entered.

2. For each employee, indicate if the employee is salaried or paid hourly.

3. Define and implement functions for the following:

a) If the employee is salaried, enter the annual salary. The gross for that employee will be determined by dividing the annual salary by 24. Add the result to the total salaried wage. b) If the employee is paid hourly, enter hours worked (40 ≥ hours ≥ 0) and rate per hour. The gross for that employee is determined by multiplying hours worked by rate per hour. Add the result to the total hourly wages.

4. After performing the calculations for each employee, display the total wages for salaried employees, total wages for hourly employees, and total gross wages.

Prompt the user to enter the number of employee wages to be calculated. The program will end when the data for all the employees has been entered.

For each employee, indicate if the employee is salaried or paid hourly

- If the employee is salaried, enter the annual salary. The gross for that employee will be determined by dividing the annual salary by 24. Add the result to the total salaried wage.

-If the employee is paid hourly, enter hours worked (40 ≥ hours ≥ 0) and rate per hour. The gross for that employee is determined by multiplying hours worked by rate per hour. Add the result to the total hourly wages.

-After performing the calculations for each employee, display the total wages for salaried employees, total wages for hourly employees, and total gross wages.

Write a function called maximum() that accepts three integer

numbers as parameters. The maximum() that returns maximum value

of three arguments that are passed to the function when it is

called. Assume that all three arguments will be of the same data

type.

A theatre sells seats for shows and needs a system to keep track of the seats they have sold tickets for. Define a class for a type called ShowTicket. The class should contain private member variables for the row, seat number and whether a ticket has been sold or not. Your class should include the following member functions: • a default constructor that initialises the row and seat number to 0 and the sold status to false • an overloaded constructor which accepts as arguments the row and seat number and sets the sold status to false • a member function to check if the ticket has been sold • a member function to update the ticket status to sold • a member function to print the row, seat number and sold status • a destructor. Embed your class definition in a test program which creates some ShowTicket objects, set some tickets as sold, and prints each of them out.

Write a program to remove unnecessary blanks from a text file. Your program should read the text file and copy it to another text file, but whenever more than one blank occurs consecutively, only one blank should be copied to the second file. The second file should be identical to the first file, except that all consecutive blanks have been replaced by a single blank.

Write a program that initialises a vector with the following string values: “what” “book” “is” “that” “you” “are” “reading”. Display the contents of the vector on the screen to the user as a question and read in the name of the book the user is reading (you can decide what it will be). Have the program add the name of the book to the vector, word by word. For example, if I am reading “How to learn C++”, the program should add the words, “How” “to” “learn” “C++”, one by one to the vector. Display the new vector.

Write C++ statements to do the following: (7)

(i) Define a pointer type int_ptr for pointer variables that contain pointers to int variables. (ii) Declare p2 to be a pointer to an int.

(iii) Obtain an integer value nrElements from the user indicating the number of elements to allocate.

(iv) Dynamically allocate an array of nrElements integers and store its address in p2.

(v) Declare an int array a with 500 elements.

(vi) Assume p2 has been initialized and copy the elements of p2 one by one to the corresponding elements in a.

(vii) Free the memory allocated to the variable that p2 is pointing to.

For each of the following, write a single C++ statement that performs the identified task. (7)

(i) Declare two variables fPtr1 and fPtr2 to be pointers to objects of type double.

(ii) Create a dynamic variable to which fPtr1 points.

(iii) If the pointer fPtr2 is undefined (i.e. it does not point to any variable), let it point to the same variable that fPtr1 points to.

(iv) Print the address of the object pointed to by fPtr1.

(v) Print the value of the object pointed to by fPtr2.

(vi) Release the memory occupied by the dynamic variable to which fPtr1 points.

(vii) Assign null values to the pointers fPtr1 and fPtr2

With the aid of a diagram give a brief explanation on the types of buses available on modern computer systems and the purpose of northbridge and southbrige

create a running database  C++ program.

Can add, search, or delete a record.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS