Académique Documents
Professionnel Documents
Culture Documents
1-3. The program will use dialog boxes in order to ask for the customer's
account number (a 14 digit number), name (first and last), address (street,
city, state, zip) and KWH used (a whole number). It will then calculate the
amount due (KWH * 0.0624).
Output should be printed to a dialog box. Label the account number and amount
due. When printing the address, place the street address on one line and the
city, state and zip on the next line. Attached is an example of a run of the
program.
Begin the assignment by creating a problem analysis and algorithm design as was
done in class with the exam average program. Type the problem analysis and
algorithm design in Word.
Submission: Upload the Word file and main.java file to the dropbox in D2L
Algorithm
---
1] Get exam scores from user.
2] Calculate Average.
3] Output Aveage.
Variables
---
Integers for test scores.
int exam1Score
double Average
Named Constant
---
Values that ... ?
int NUM-OF-GRADES
Complete Algorithm
---
1] Ask user for exam 1 score.
2] Get exam1Score.
3] Ask user for exam 2 score.
4] Get exam2Score.
5] Ask user for exam 3 score.
6] Get exam3Score.
7] Calculate Average using formula.
8] Print the Average to screen.
Algorithm
---
1] Get exam scores from user.
2] Calculate Average.
3] Output Aveage.
Variables
---
Integers for test scores.
int exam1Score
double Average
Named Constant
---
Values that ... ?
int NUM-OF-GRADES
Complete Algorithm
---
1] Ask user for exam 1 score.
2] Get exam1Score.
3] Ask user for exam 2 score.
4] Get exam2Score.
5] Ask user for exam 3 score.
6] Get exam3Score.
7] Calculate Average using formula.
8] Print the Average to screen.
String strexamAverage;