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

1. Write a program which calculate the employee meal allowance, medical allowance, house rent allowance and calculate the gross salary.



35% meal allowance.



10% medical allowance.



55% house rent allowance.




take 10 integer inputs from user and print the following:


01:postive number


02:negative number


03:odd numbers


04:even numbers all through arra

Create a C++ program that meets the following requirements:
1. It is necessary to read TotalUnits and ratePerUnit.
2. The computeTuition function will return the totalTuition based on the input parameters.There are two parameters: totalUnits and ratePerUnit.
3. Function computeFamilyDiscount – this function computes a 5% family discount.
1. It is necessary to read TotalUnits and ratePerUnit.
2. The computeTuition function will return the totalTuition based on the input parameters.There are two parameters: totalUnits and ratePerUnit.
3. Function computeFamilyDiscount – this function computes a 5% family discount.




a. Create a class called Rectangle with data members: width, length and area. The class should have functions to allow for setting of both length and width, calculate the area, and retrieve the width, length and area. (13 marks)



b. Write a main function that declares an object from the class above, and use the methods in that class to input the length and width, calculate the area and, retrieve and display those values (width, length and area).




A proposed system intends to store the student data (Student Number, Student Name and Phone Number) and also allow for the access of the same data. The data should be hidden and not prone to direct manipulation. The data is read and written using methods.



Required:



(i) Create a class called Student for the above scenario in C++ (6 marks)



(ii) Write a main function in the same C++ program to instantiate an object from the class Student, and allow for student data to be inputted though the keyboard and then display that student data.




Make a C ++ program that calculates the sum, mean of a series of numbers.



Example:



-Numbers: 10, 12, 10, 14



-The sum is 46,



-the mean is 11.5




Write a C++ program using a Class function that enables the storing of the following elements in an array as shown: (4 Marks)



-name



- houseno



- street



- city




How to fix this error?



void reflexive(int a[], int sizeOfA, int b[], int sizeOfB){


int i, j;


bool test;


bool hold = true;




for(i = 0; i < sizeOfA; i++)


{


if(hold == true)


{


for(j = 0; j < sizeOfB;)


{


if(b[j]==a[i] && b[j+1]==a[i])


{


hold = true;


break;


}


else


{


hold = false;


j++;


}


}


}


}


if(hold == true)


{


test = true;


cout << "Reflextive - Yes" << endl;


}


else


{


test = false;


cout << "Reflextive - No" << endl;


}


}

Write a program to calculate students' average test scores and their grades. You may assume the following input data:

Johnson          85       83       77       91       76

 Aniston           80       90       95       93       48

Cooper                78          81          11          90          73

Gupta                  92          83          96          38          59

Blair                      23          45          96          38          59

Clark                     60          85          45          39          67

Kennedy             77          31          52          74          83

Bronson              93          94          89          77          97

Sunny                  79          85          28          93          82

Smith                   85          72          49          75          63

 

Use four arrays: a one-dimensional array to store the students' names, a (parallel) two-dimensional array to store the


LATEST TUTORIALS
APPROVED BY CLIENTS