Sei sulla pagina 1di 1

CIS-160 Homework #3

Name:__________

Modify the Gain/Loss calculator you completed for assignment 2, or start from the Assignment 3 project (gain/loss) from the R: drive. Make the following modifications: 1. Instead of simply displaying a positive or negative result, include appropriate text. a. For positive values, say You gained $123.00 (where 123.00 is the actual amount) b. For negative values, say You lost $123.00 (where 123.00 is the actual amount). Be sure that the value here is not displayed as negative (no parentheses or minus sign). c. If the value is zero, say You just broke even 2. If the result is negative, display the result label in red; otherwise use green. 3. Maintain a count of the number of calculations that have been successfully performed (dont count errors), and the total income and expense. Use this to calculate the average gain or loss for all calculations. Display this value in a label that updates every time a calculation is done. Turn in this sheet and a print out of your code in a folder; drop your project folder in the dropbox on the R: drive. Grading Criteria Positive, negative, or zero values evaluated appropriately Points /5

Label output displayed correctly

/4

Label color changed appropriately

/4

Count and total correctly maintained

/4

Average gain/loss calculated and displayed

/4

Comments and appropriate names used

/4

Potrebbero piacerti anche