Parents of the pupils of the Park Primary School must pay an amount for outfits for...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: ● ● ● The cost of the outfits for Grade 1 and 2 pupils is R45. The cost of the outfits for Grades 3 to 5 is R65. Grade 6 and 7 pupils may play one or two roles. If they play a lead role, they may only play one role. The cost of the outfits is R70 if they play one role. If this role is a lead role, the cost is R100. If they play two roles, the cost is R130. Use a switch statement and write down ONLY the necessary C++ statements to calculate and display the amount to be paid or display an appropriate error message if required. Do NOT write a complete program. Use the following variables: int grade; int fee; bool lead role; //true if a child plays a lead role bool roles2; //true if a child plays 2 roles Assume that values have been assigned to these variables already. Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: ● ● ● The cost of the outfits for Grade 1 and 2 pupils is R45. The cost of the outfits for Grades 3 to 5 is R65. Grade 6 and 7 pupils may play one or two roles. If they play a lead role, they may only play one role. The cost of the outfits is R70 if they play one role. If this role is a lead role, the cost is R100. If they play two roles, the cost is R130. Use a switch statement and write down ONLY the necessary C++ statements to calculate and display the amount to be paid or display an appropriate error message if required. Do NOT write a complete program. Use the following variables: int grade; int fee; bool lead role; //true if a child plays a lead role bool roles2; //true if a child plays 2 roles Assume that values have been assigned to these variables already.
Expert Answer:
Answer rating: 100% (QA)
C CODE include using namespace std int main int grade6 int ... View the full answer
Related Book For
Principles of Information Systems
ISBN: 978-1305971776
13th edition
Authors: Ralph Stair, George Reynolds
Posted Date:
Students also viewed these general management questions
-
There are 15 jobs that must be done by 10 employees. Each job must be done by a single employee, and each employee can do at most two jobs. The times (in minutes) for the employees to do the jobs are...
-
Consider the following six tasks that must be assigned to four workers on a conveyor-paced assembly line (i.e., a machine-paced line flow). Each worker must perform at least one task. Time to...
-
(a) Determine the amount of work (in joules) that must be done on a 100-kg payload to elevate it to a height of 1 000 km above the Earths surface. (b) Determine the amount of additional work that is...
-
Jake's office building is destroyed by a fire on September 15, 2022. Jake receives insurance proceeds on April 15, 2023 in the amount of $300,000. Jake's adjusted basis in the building was $250,000....
-
Name four of the seven decisions and details that are usually included within the scope of process planning?
-
A biologist performs an experiment in which 2000 Asian beetles are allowed to roam in an enclosed area of 1000 square feet. The area is divided into 200 subsections of 5 square feet each. (a) If the...
-
The asset section of the statement of financial position and notes thereto of Megabus Ltd is shown below. Required (a) Calculate the changes in dollar amounts and percentages for the company. Cash...
-
Use Hesss law to calculate the standard heat of the water-gas shift reaction CO (g) + H 2 O (v) CO 2 (g) + H 2 (g) from each of the two sets of data given here. (a) CO (g) + H 2 O (l) CO 2 (g) + H...
-
The pretrial hearings were set. The hearing was pertaining to both cases against me which consisted of seven counts. My dad also stood accused on the Indiana indictment which consisted of just 4 of...
-
On 1st November 2022 Giogio Makali a maize farmer offered to sell his maize harvest totaling 2500, 90kg bags to XYZ Ltd a milling company at K.Shs.3,000/= per bag through email, which email indicated...
-
What facts of the Cynthia Sommer case and the factors that contributed to the wrongful conviction in this particular case? What are two negative consequences of this particular person's wrongful...
-
What are some conflicts that can arise when employers communicate internal (employees) and external (stakeholders) messages to large target audiences? Support your response by using scholarly sources...
-
What considerations employers must make in order to offer continuous support to employees through a workplace change process? Use scholarly sources for your response.
-
4.79 metric tons of water were held in a thin-walled cubical tank, how long (in meters) would each side of the tank be? (Do ot enter the unit!)
-
Legal Environment of Business Paper (100 points) 1. Law-Related Topic : Choose a law-related topic to write about. a. Create a paper about a law-related topic that is controversial (varying strong...
-
Summit Corporation manufactures machines for the apparel industry. The production manager and cost analyst reviewed the accounts for the previous quarter and have provided an estimated breakdown of...
-
The equation y = -x+9.6 models the data in the table shown. Identify the number of positive and negative residuals, the residual with the greatest absolute value, and the residual with the least...
-
Choose a company from the SEC EDGAR Web site for your Key Assignment to evaluate for the impact of convergence to IFRS. Review the financial reports and notes of the company you have chosen from the...
-
Your team has been asked to develop your schools first student code of ethics. How might you approach this task? Who might you try to involve? What might be some key tenants of such a code of ethics?
-
Assume you are a member of a committee responsible for replacing your organizations retiring CIO. What characteristics would you want in a new CIO? How would you go about identifying qualified...
-
Imagine that your team has been hired as consultants to a large organization that has just suffered a major public relations setback due to a large-scale data breach that it handled poorly. Identify...
-
Analyze the transient problem with the Dirichlet condition for a long cylinder and for a sphere. Derive expressions for the eigenfunctions, eigenconditions, and eigenvalues. Find the series...
-
Consider the problem of transient heat transfer with a constant heat source in a slab. Show that the governing equation in dimensionless form is \[\begin{equation*}\frac{\partial \theta}{\partial...
-
Eigenvalues without pain: CHEBFUN code. Eigenfunctions can be derived using the CHEBFUN with MATLAB since it has an overloaded eig function. The following code solves for the eigenfunctions of the...
Study smarter with the SolutionInn App