This is basically PGM-04-01.cpp modified with different selection structures. Assume that you are an auto insurance...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This is basically PGM-04-01.cpp modified with different selection structures. Assume that you are an auto insurance provider, and you need a program to determine the eligibility of applicants. The requirements are based on the age and sex of an applicant. Here is the table of requirements being used: Age Sex Less than 16 All Less than 18 18 thru 30 18 thru 30 31 thru 50 31 thru 50 51 thru 79 80 and over All Male Female Male Female All All Risk Level and code value Not insurable (code=0) High (code=1) High (code=1) Medium (code=2) Medium (code=2) Reduced (code=3) Low(code=4) High(code=1) Write a program that asks for the applicant's age and sex. Use logical operators in compound if statements that assign the correct code value to an applicant based on the table above. Once the code has been assigned, display a message based on that code using a switch statement with the code as the integer expression that displays a message such as "This is a low(or whichever risk level is appropriate) risk applicant" Partial Example Results (each execution is separated by //***... for clarity here; your program does not do that) COSC 1560 Programming Assignment 5- Auto Insurance Enter the age of the applicant: 14 Enter the sex of the applicant: M This is basically PGM-04-01.cpp modified with different selection structures. Assume that you are an auto insurance provider, and you need a program to determine the eligibility of applicants. The requirements are based on the age and sex of an applicant. Here is the table of requirements being used: Age Sex Less than 16 All Less than 18 18 thru 30 18 thru 30 31 thru 50 31 thru 50 51 thru 79 80 and over All Male Female Male Female All All Risk Level and code value Not insurable (code=0) High (code=1) High (code=1) Medium (code=2) Medium (code=2) Reduced (code=3) Low(code=4) High(code=1) Write a program that asks for the applicant's age and sex. Use logical operators in compound if statements that assign the correct code value to an applicant based on the table above. Once the code has been assigned, display a message based on that code using a switch statement with the code as the integer expression that displays a message such as "This is a low(or whichever risk level is appropriate) risk applicant" Partial Example Results (each execution is separated by //***... for clarity here; your program does not do that) COSC 1560 Programming Assignment 5- Auto Insurance Enter the age of the applicant: 14 Enter the sex of the applicant: M
Expert Answer:
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these programming questions
-
What are some of the key differences between managers and leaders?
-
Assume that you are an independent CPA performing audits of financial statements. In the course of your work, you encounter the following independent situations. Review each of the situations. If you...
-
Frits Seegers, President of Citibank California, was meeting with his management team to review the performance evaluation and bonus decisions for the California branch managers. James McGarans...
-
Taxpayer sold the following capital assets during the year: Asset # 1: $60,000 long-term capital gain Asset # 2: $10,000 long-term capital loss Asset # 3: $50,000 short-term capital gain Asset # 4:...
-
At the time of Rutherford's gold-foil experiment, scientists knew that negatively charged electrons exist within the atom, but they did not know where the positive charge resides. What information...
-
a. Find the eigenvalues and eigenvectors of the matrix. b. Confirm the results of (a) in MATLAB. \(\mathbf{A}=\left[\begin{array}{ll}0 & 3 \\ 3 & 0\end{array} ight]\)
-
If possible, use the product rule to simplify the following: 1. \(21^{9} \times 21^{15}\) 2. \(5^{9} \times 8^{4}\)
-
Change in Estimate and Error Correction Holtzman Company is in the process of preparing its financial statements for 2010. Assume that no entries for depreciation have been recorded in 2010. The...
-
Ryan is self-employed. This year Ryan used his personal auto forseveral long business trips. Ryan paid $1,500 for gasoline on thesetrips. His depreciation on the car if he was using it fully forbus 2...
-
Big CPA Firm has many partners in one of its local offices. Two of these partners are Tom, a tax partner, and Alice, an audit partner. Because of the size of the office, Tom and Alice do not know...
-
8 Lynch Company manufactures and sells a single product. The following costs were incurred during the company's first year of operations: Variable costs per unit: Manufacturing: Direct materials...
-
Sales 1,275,000 Depreciation, factory 79,050 Utilities, factory 19,635 Administrative expense 144,330 Purchase of raw materials 368,730 Raw materials, Mar31, 2020 41,820 selling expense 84,150 Raw...
-
rewrite this "E(r) = y * E(r) + (1 - y) * rpfE(r) = 75% * 7.1% + 25% * 0.9% = 5.55%Standard Deviation = 75% *= 75% * 16.4% = 12.3%
-
PT ABC purchased new equipment that will be used to make computer processors. in the first year of operation of its new equipment, PT ABC will sell 1 billion worth of chips, with a gross profit...
-
A company is considering an investment in a new product with a 10-year horizon (product will be sold for 10 years). The upfront investment is $5 million and it is assumed to depreciate on a...
-
6: What is a superannuation guarantee charge (not to be confused with just the Superannuation Guarantee)? Hint: Search ATO website for "superannuation guarantee charge
-
You are a member of a highly successful advertising agency whose CEO suffers from MS. She has asked you to develop a proposal for the National Multiple Sclerosis Society to increase the number of...
-
D Which of the following is considered part of the Controlling activity of managerial accounting? O Choosing to purchase raw materials from one supplier versus another O Choosing the allocation base...
-
Adaptive Expectations and Oil Price Instability: We mentioned in the text that trading across time is similar to trading across space in that individuals find opportunities to buy low and sell high....
-
Suppose you have 60 hours of leisure that you could devote to work per week, and suppose that you can earn an hourly wage of $25. A: Suppose the government imposes a 20% tax on all wage income. (a)...
-
Syllabi-Induced Tastes over Exam Grades: Suppose you are taking two classes, economics and physics. In both classes, only two exams are given during the semester. A: Since economists are nice people,...
-
If Pomegranate follows IFRS and uses the alternative method of valuing the noncontrolling interest, the 2017 noncontrolling interest in comprehensive income of Starfruit is On January 1, 2015,...
-
At the date of acquisition, consolidation eliminating entry (R) credits the noncontrolling interest in Starfruit in the amount of Now assume Pomegranate paid only \($20,000,000\) to acquire 90% of...
-
Martin Ltd has a nominal share capital of 900,000 comprising 900,000 ordinary shares of 1 each. The whole of the capital was issued at par on the following terms: Per share Payable on application 10p...
Study smarter with the SolutionInn App