CS 111: Program 6 main content
Based on Programming Challenges #7: Long Distance Calls on page 871 of your textbook.
A long-distance provider charges the following rated for telephone calls:
| Rate Category |
Rate per Minute |
| Daytime |
$0.07 |
| Evening |
$0.12 |
| Off-Peak |
$0.05 |
Create a GUI application that allows the user to select a rate category (from a set of radio buttons), and enter the number of minutes of the call in a text field. A dialog box should display the charge for the call.
Sample Session
-->
UML Class Diagram
What to turn in
- Source program printouts stapled together with file header comments on all printouts
- Be sure your project is saved in your
U:\Program6\ folder
- The assignment is due at the start of lab 7. You program must compile and produce output for you to receive any credit.
- You are allowed one late programming assignment for the quarter.
Grading Criteria
50 points maximum
- 30 points - Output Correctness
- The program compiles and runs, displaying a JFrame for user input (5)
- Use can select a Rate Category from a set of radio buttons (5)
- User can enter the time of call (as a double value) (5)
- Calculate Charges button displays output (5)
- Output displayed is correct (5)
- Exit button ends application (5)
- Spelling, capitalization, and grammar of exception messages is correct (-1 per error)
- 10 points - Object Oriented Design
- The program is subdivided into appropriate classes and methods
- Keep methods under 25 lines of code (LOC) in length and do only one thing per method
- Use private helper methods whenever appropriate
- 5 points - Programming Style
- Program header comments are present and complete. All files need header comments (2)
- Single-line comments are present, helpful, and sufficient (2)
- Skip a blank line before every single-line comment
- Align the comment with the code
- Generally one single-line comment is needed for every four to six lines of code
- Begin every method with a single-line comment describing what the method does
- Naming conventions, alignment, and indentation are important. Read through the Java Style Guide for CS 111 expectations (1)
- 5 points - Creation and printout of the jGRASP Project files
- Project
U:\Program6\ created correctly in your network cs111 account and project files saved correctly in the project folder (2)
- Source printouts submitted correctly
- Avoid line wrap in your source printout
- Print files with line numbers and CSD showing