Question
Grading Rubric Savitch - Sections 3.2-3.3, 4.1-4.2 Grading Rubric (for Instructions / Input / Output) YourlastnameAssign3.java Basics (12 pts) File is named wrongly (You did
Grading Rubric
Savitch - Sections 3.2-3.3, 4.1-4.2
Grading Rubric (for Instructions / Input / Output)
YourlastnameAssign3.java
Basics (12 pts)
File is named wrongly (You did not use your last name). (-100 pts, you get 0 for this assignment, resubmit allowed, late penalty applies)
Student handed in wrong file. (-100 pts, you get 0, resubmission allowed, late penalty applies.)
Program code does not compile / run. (-50 pts, resubmission allowed, late penalty applies.)
Comments include name, description, CSCI 1010, Assignment 3. (4 pts)
Statements in main class are indented correctly. (4 pts)
Declarations and types (8 pts)
Uses String for the level of study, and residency status (2pts)
Uses integers or doubles for the credit hours amount. (2 pts)
Uses double for the tuition cost. (4 pts)
Input (20 pts)
Reads the level of study. (4 pts)
Reads the residency status. (4 pts)
Reads the credit hours amount. (4 pts)
Uses a loop to validate the credit hours amount as per the level of study. (8 pts)
Processing/Output (60 pts)
Outputs the total tuition cost and credit hours amount. (8 pts)
Tuition Cost Calculation:
In-State Undergraduate tuition- hours 1-12. (5 pts)
In-State Undergraduate tuition- hours 13 and above. (5 pts)
Out-Of-State Undergraduate tuition- hours 1-12. (5 pts)
Out-Of -State Undergraduate tuition- hours 13 and above. (5 pts)
In-State Graduate tuition- hours 1-10. (5 pts)
In-State Graduate tuition- hours 11 and above. (5 pts)
Out-Of-State Graduate tuition- hours 1-10. (5 pts)
Out-Of -State Graduate tuition- hours 11 and above. (5 pts)
After displaying output, asks the user if they want to calculate another tuition cost. (4 pts)
Uses a loop to repeat the entire program as long as the user answers yes to this question. (8 pts)
Instructions
For this assignment, you will write a program to calculate the tuition cost to take classes at APSU. As per https://www.apsu.edu/student-account-services/tuition_and_fees/index.php (Date Accessed: January 9, 2023), the total tuition cost to attend APSU is calculated based on the following breakdown-
Undergraduate Tuition:
In-State Undergraduate tuition is $284 per credit hour for hours 1-12, per semester. A discounted rate of $55 per credit hour is offered for hours 13 and above, per semester.
Undergraduate Out-of-State tuition is $515 per credit hour for hours 1-12, per semester. There are no additional Out-of-State charges for hours above 12 but you will pay the $55 per credit hour for Undergraduate tuition for hours 13 and above, per semester.
Graduate Tuition:
Graduate tuition is $457 per credit hour for hours 1-10, per semester. A discounted rate of $88 per credit hour is offered for hours 11 and above, per semester.
Graduate Out-of-State tuition is $734 per credit hour for hours 1-10, per semester. There are no additional Out-of-State charges for hours above 10 but you will pay the $88 per credit hour for Graduate tuition for hours 11 and above, per semester.
For this assignment, you must use the rules above to calculate the tuition cost given a students study level, residency status, and no of credit hours he/she will be taking. Your program must do the following:
1. Display a welcome message with your name in it.
2. Prompt the user for the level of study (undergrad or grad).
3. Prompt the user for the residency status (in-state or out-state).
4. Repeatedly prompt the user for the no of credit hours he is registering until the user enters a valid value- between 1 and 18 for undergrad and between 1 and 15 for grad.
5. Display the total tuition cost using the credit hours amount that the user entered in step 4.
6. Ask the user if they want to calculate another tuition cost.
7. If the user enters yes, go back to step 2.
8. If the user enters no, display a thank you message and exit the program.
You can match your program output with Table 1 and Table 2 data .
Table 1Undergraduate Tuition
Table 2 Graduate Tuition
Helpful Hints
This assignment is more complicated than previous assignments, so it is a good idea to implement and test it incrementally.
Start by implementing the prompts for input without any input validation.
Next, determine the logic of how to break down the tuition cost calculation into individual cases and implement that.
Write code to output the result.
Test your code with multiple cases to make sure it works.
Add in input validation for the credit hours amount.
Test your code to make sure the input validation works.
Add the code that repeats the process if the user enters yes.
Test your code to make sure users can calculate tuition costs for multiple cases.
Example Input and Output
Here is a sample of output for a single run of the program
Welcome to Mir Hasan's Tuition Cost Calculator
Is the student an undergraduate or graduate student?(Type undergrad or grad)
undergrad
Is the student an In-State or Out-of-State student? (Type in-state or out-state)
in-state
How many credits the student is registering for?(A number between 1-18)
12
Total Tuition Cost for 12 Credit Hours is 3408.00
Do you want to calculate another tuition cost? (yes or no)
yes
Is the student an undergraduate or graduate student?(Type undergrad or grad)
undergrad
Is the student an In-State or Out-of-State student? (Type in-state or out-state)
out-state
How many credits the student is registering for?(A number between 1-18)
15
Total Tuition Cost for 15 Credit Hours is 6345.00
Do you want to calculate another tuition cost? (yes or no)
yes
Is the student an undergraduate or graduate student?(Type undergrad or grad)
undergrad
Is the student an In-State or Out-of-State student? (Type in-state or out-state)
out-state
How many credits the student is registering for?(A number between 1-18)
20
Error: Entered Credit Hours is out of range
How many credits the student is registering for?(A number between 1-18)
18
Total Tuition Cost for 18 Credit Hours is 6510.00
Do you want to calculate another tuition cost? (yes or no)
yes
Is the student an undergraduate or graduate student?(Type undergrad or grad)
grad
Is the student an In-State or Out-of-State student? (Type in-state or out-state)
in-state
How many credits the student is registering for?(A number between 1-15)
12
Total Tuition Cost for 12 Credit Hours is 4746.00
Do you want to calculate another tuition cost? (yes or no)
yes
Is the student an undergraduate or graduate student?(Type undergrad or grad)
grad
Is the student an In-State or Out-of-State student? (Type in-state or out-state)
out-state
How many credits the student is registering for?(A number between 1-15)
18
Error: Entered Credit Hours is out of range
How many credits the student is registering for?(A number between 1-15)
15
Total Tuition Cost for 15 Credit Hours is 7780.00
Do you want to calculate another tuition cost? (yes or no)
no
Thank you for using Mir Hasan's Tuition Cost calculator!
Notes and Comments
Upload your Java source file to the dropbox named Assignment 3. The name of the source file must be your last name followed by Assign3 with the extension .java. For example, mine would be HasanAssign3.java.
Make sure to include comments with your name, a description of what the program does, the course (CSCI 1010), and the assignment name (Assignment 3) at the beginning of your source file.
Make sure you only hand in the source file for your assignment, not the class file, or any other files that NetBeans creates.
Your programs must compile without errors in order to be graded. Once your program compiles make sure to test it using multiple test cases to see if it meets the requirements of the assignment.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started