NOTE:
http://guides.instructure.com/s/2204/m/4212/l/41972-how-do-i-submit-an-online-assignment
OBJECTIVE:
The power of computer programming is manifested greatly in real-life decision-making situations.
To make a good decision, the data must have integrity. For example, an exam score of -67 or 235 does not make sense, and if an instructor assigns a letter grade based on the invalid number, the grade will have no meaning. Recall “Garbage in, Garbage out.”
In this regard, you will do the following preparation.
PREPARATION:
NOTE:
SECTION A: SALES PROFIT APP (20 Points)
Case Study: You are asked to write a C# report application that displays the amount of profit an organization receives based on its sales amount. The more sales documented, the larger the profit ratio. Allow the user to input the total sales figure for the organization from the keyboard.
Compute the profit earned based on the following decision table. The given profit ratios are fixed.
Sales Amount Range | Profit Ratio to be used to be used to compute Profit |
0 to $1,000.00 (both inclusive) | 3.0% (of the sales amount) |
$1,000.01 to $5,000.00 (both inclusive) | 3.5% |
$5,000.01 to $10,000.00 (both inclusive) | 4.0% |
Over $10,000.00 | 4.5% |
Use the following names:
SOLUTION NAME: HW4
PROJECT NAME: SalesProfit
PROGRAM NAME: SalesProfitApp
Some sample results for valid data input are shown blow:
|
SECTION B: BMI (20 Points)
BMI CASE: Body Mass Index (BMI) is a number calculated from a person’s weight and height. BMI is a fairly reliable indicator of body fatness for most people. BMI does not measure body fat directly, but research has shown that BMI correlates to direct measures of body fat. BMI is used as a screening tool to identify possible weight problems for adults. The standard weight status categories associated with BMI ranges for adults are shown in the first table on the left, and the formula for calculating BMI is shown in the second table on the right.
Depending on where you live, the Foot-Pound units or the Metric (meter-kilogram) units are used in the BMI formula. In our case, we will use only the Foot-Pound units
A health clinic has asked you to write a BMI Console Application for them using the C# language.
INPUT: (Variables – use Camel Case)
OUTPUT: (Must be nicely formatted to ONE DECIMAL place only)
VALIDATION: (Terminate program with an appropriate message if any data is invalid)
CALCULATION:
The algebraic formula (not in C# format) to calculate the BMI is:
BMI = WEIGHT (lbs.) ÷ [HEIGHT (total inches only)] 2 * 703 (a constant)
Notice that you must use only total inches for the height. So, the feet portion of the height entered must be first converted to inches and then added to the inches portionBEFORE you use that number in the formula.
Use the following names:
SOLUTION NAME: HW4
PROJECT NAME: BMI
PROGRAM NAME: BMIApp
SAMPLE RESULTS:
The output is just for your reference and it is not properly formatted. You must display a nicely formatted PROFESSIONAL LOOKING report in your program.
Height (in feet portion) | Height (in inches portion) | Weight (in lbs.) | BMI | Weight Status |
5 | 7 | 150.0 | 23.5 | Normal |
5 | 0 | 150.0 | 29.3 | Overweight |
5 | 10 | 220.0 | 31.6 | Obese |