Assignment 3 Use DEV-C++ to develop a well-documented C++ program that: 1) Prompts the user to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assignment 3 Use DEV-C++ to develop a well-documented C++ program that: 1) Prompts the user to enter from the keyboard an integer value named credits between 0 and 120 representing the number of credit hours passed by a UOB student. 2) Validates the entered value: a) If the entered value is NOT in the range (0..120), then prints an error message: "Error: Unacceptable number of credits. Bye ", and quits the program. b) Otherwise, classifies and prints the student's category based on credits passed by a student as shown in the following table. Credit hours From 00 to less than 31 From 31 to less than 61 From 61 to less than 91 From 91 to 120 Less than 0 or greater than 120 Student category freshman sophomore junior senior Error c) Displays on the screen the entered value and the student's category as shown below. 3) Repeat the previous steps for unknown number of students until 999 is entered by the user. Sample runs: Enter an integer between 0 and 120 please: 25 You passed 25 credits: You are a freshman student. Enter an integer between 0 and 120 please: 137 Error: Unacceptable number of credits. Bye. Enter an integer between 0 and 120 please: 40 You passed 40 credits: You are a sophomore student. Enter an integer between 0 and 120 please: 999 Congratulations. Program finished. Assignment 3 Use DEV-C++ to develop a well-documented C++ program that: 1) Prompts the user to enter from the keyboard an integer value named credits between 0 and 120 representing the number of credit hours passed by a UOB student. 2) Validates the entered value: a) If the entered value is NOT in the range (0..120), then prints an error message: "Error: Unacceptable number of credits. Bye ", and quits the program. b) Otherwise, classifies and prints the student's category based on credits passed by a student as shown in the following table. Credit hours From 00 to less than 31 From 31 to less than 61 From 61 to less than 91 From 91 to 120 Less than 0 or greater than 120 Student category freshman sophomore junior senior Error c) Displays on the screen the entered value and the student's category as shown below. 3) Repeat the previous steps for unknown number of students until 999 is entered by the user. Sample runs: Enter an integer between 0 and 120 please: 25 You passed 25 credits: You are a freshman student. Enter an integer between 0 and 120 please: 137 Error: Unacceptable number of credits. Bye. Enter an integer between 0 and 120 please: 40 You passed 40 credits: You are a sophomore student. Enter an integer between 0 and 120 please: 999 Congratulations. Program finished.
Expert Answer:
Answer rating: 100% (QA)
ALGORITHM STEP 1 In main class declare the credithours as integer value STEP 2 Ask the ... View the full answer
Related Book For
Principles of Auditing and Other Assurance Services
ISBN: 978-0078025617
19th edition
Authors: Ray Whittington, Kurt Pany
Posted Date:
Students also viewed these databases questions
-
1) Pan Demic, Inc. (PDI) manufactures and sells cast iron skillets. A finished skillet sells for $40 and costs $15 to manufacture. PDI uses one raw material, iron ore, which is buys for $8/pound....
-
Match the following terms to the appropriate definition (or partial definition). Each definition is used once. Term a. Commitment b. Contingent liability c. General risk contingency d. Iron curtain...
-
Match the following terms to the appropriate definitions. ____ Utility computing ____ Cloud computing ____ Service-level agreement ____ Bandwidth ____ System software ____ Server ____ Software as a...
-
Find the indicated quantities for the appropriate arithmetic sequence. The sum of the angles inside a triangle, quadrilateral, and pentagon are 180, 360, and 540, respectively. Assuming this pattern...
-
Continuing from the previous question, we now consider Argentinas external wealth position. a. What is Argentinas external wealth W in year 0 and later? Suppose Argentina has a one-year debt (i.e.,...
-
Using an anthropological perspective, explain the statement You are what you eat.
-
Laghari & Lagharis Personnel Department maintains a file of all employees of the company and each employees unique Employee ID. The file llemployees provides information on employees for Laghari &...
-
Southeast Suites operates a regional hotel chain. Each hotel is operated by a man-ager and an assistant manager/ controller. Many of the staff who run the front desk, clean the rooms, and prepare the...
-
Peter Smith was the owner and operator of Long Arm Guns based in Nashville, TN. Peter had bought and sold guns legally for years as a licensed arms merchant. In January of 2022, Peter sold an Ak47...
-
Estimate K based on the data Differential equation: dL/dt = K(1-L) using separation of variables 1. We let L (t) be the fraction of the list already committed to memory at time t . So L =0...
-
how to respond to this Final, I would like to research "the role of social media on communication". In particular, I would like to see if people think whether social media is a useful tool for...
-
How do concise executive summaries enhance the accessibility and utility of complex reports and analyses in business contexts?
-
How do concise algorithms contribute to optimizing computational efficiency in large-scale data processing tasks?
-
In the HBR article, Why Accountability is So Muddled, and How to Un-Muddle it, author Ron Ashkenas identifies three accountability traps and three solutions for muddled accountability. In this...
-
What are the latest advancements in recombinant DNA technology, and how are they being utilized in the production of therapeutic proteins with enhanced bioactivity and reduced immunogenicity?
-
How does the principle of parsimony guide researchers in formulating concise hypotheses and theories in scientific inquiry?
-
A city bus collected $780 infares on one day. The price of a regular fare was $0.80, and the price of a discount fare was $0.40. If a total of 1200 people paid the fares on this bus, how many people...
-
Prepare a stock card using the following information A company is registered for GST which it pays quarterly, assume GST was last paid on the 30th of June 2019. It uses weighted average cost...
-
Multiple Choice Questions Select the best answer for each of the following items and give reasons for your choice. a. Which of the following best describes the relationship between assurance services...
-
If the auditors can determine that all goods in the physical inventory have been accurately counted and properly priced, they will have discharged fully their responsibility with respect to...
-
Lee Wong, CPA, is auditing the financial statements of the Alexandria Corporation, which has a batch-processing IT-based system for shipping and invoicing that it purchased from a software vendor....
-
If a product is produced in high volume by a few large organizations, what phase of the product life cycle is it most likely in?
-
Is a highly standardized product usually produced through a make-to-order or a make-to-stock processing strategy?
-
Does providing customized products generally involve less capital investment or less skilled labor, when compared to more standardized products?
Study smarter with the SolutionInn App