Ask Programming Language Expert

A university would like you to prepare a program to compute the fees charged on a student tuition bill. You will also prepare a test plan for this program.
Tuition is the same for all students, and is charged based on the number of credit hours enrolled in. The cost per credit hour is $465.
The school find outs student fees as a percentage of the total tuition being charged, unless the student is a non-degree seeking student.
The following rates will be used to compute the student fees:
Credit
Hours Non-degree
Seeking fee
(flat fee) Undergraduate
Rates
(% of tuition) Graduate
Rates
(% of tuition)
1-3 $100 3% 3%
4-9 2.8% 2.7%
10-14 2.5% 2.4%
15-18 2.2% 2.1%
Over 18 1.9% 1.9%
Credit
HoursNOTES:
1. All of the fixed values in the table should be stored as constants, using descriptive constant names. This means that you will need to create constants for the tuition cost, credit hour limits of each bracket, and the rates in each bracket.
2. The school should be able to modify any of the figures, simply by changing the constant values, and without having to modify any of the executable code.
3. Do not embed any constant values in the constant names!
ex:
const double RATE_OVER_18 = 0.019; // incorrect
This constant is defined incorrectly, because the credit hour limit of 18 is embedded in the constant name.
const int RATE4_HOUR_LIMIT = 18;
const double RATE5 = 0.019; // better!
In addition to the main function, you also will prepare a separate user-defined function that will use the chart above to determine the student fee percentage rate, based on student type and credit hours.
The user-defined function will:
_ Be given a descriptive name that describes what the function does
_ Take student type and number of credit hours as input arguments and will return a fee rate for use in the student fee calculations in the main function.
_ Use BOTH nested if statement(s) AND extended multi-way selection if statement(s) to determine the correct fee rate for the student.
NOTE: No switch statements shall be used in this program.
Program Implementation
The program should first describe its purpose.
Then prompt for and read the student type from the user.
NOTE: The program should work no matter whether the user enters the student type in either upper or lowercase.
If the student is an undergraduate or graduate student, the program should then prompt for and read in the number of credit hours the student is enrolled in.
Input ex 1
Notes on input:
1. You do not have to error check any of the user input -- you may assume all valid answers will be entered. But you must accept upper or lowercase for the student type.
2. If the student is non-degree seeking, the program should not prompt for credit hours.
Input ex 2
Student Fees Calculation Program
Student types choices:
U - undergraduate
G - graduate
N - non-degree seeking
Enter student type: G
Enter number of credit hours enrolled in: 10
Student Fees Calculation Program
Student types choices:
U - undergraduate
G - graduate
N - non-degree seeking
Enter student type: N
After reading all necessary input, use a decision statement to decide if the student is an undergraduate or graduate student. If so, the program will call the user-defined function to determine which fee rate to use.
The main function will use the returned fee rate to compute the student fee.
NOTE: If the student is non-degree seeking, the program should simply assign the flat fee for the student fee, without calling the user-defined function.
Finally, the program should neatly display the student type, credit hours (unless non-degree seeking), rate used (unless non-degree seeking), and the student fee, all lined up, right justified,as described and shown below.
NOTE: Use decision statements to decide what to output. Do not return from the middle of the main function, when the student is non-degree seeking.
Output ex 1
Notes on output:
1. The student type should be displayed in words (not just a character).
2. Rate used should be rounded to 1 decimal place.
3. Student fees are dollars and cents, and should be rounded to 2 decimal places.
Output ex 2
Testing
As part of your submission for this week, you must prepare a test plan for this program.
Your test plan must include both rationale for testing all conditions within the program and a list of the specific test cases. Each test case must include the exact user input used for the test and what the exact output expected.
Student Fees Summary
Student Type: Graduate
Credit Hours: 10
Rate Used: 2.4%
Student Fees: 111.60
Student Fees Summary
Student Type: Not degree seeking
Student Fees: 100.00
Testing
As part of your submission for this week, you must prepare a test plan for this program.
Your test plan must include both rationale for testing all conditions within the program and a list of the specific test cases. Each test case must include the exact user input used for the test and what the exact output expected.
Student Fees Summary
Student Type: Graduate
Credit Hours: 10
Rate Used: 2.4%
Student Fees: 111.60
Student Fees Summary
Student Type: Not degree seeking
Student Fees: 100.00
A test plan for last week's program 2 is included in the online Content as a sample (see
section 4.3.3).
The test plan should be contained in either a Word doc or an Excel spreadsheet.
NOTE: Although you are required to turn in a test plan for only this program, you will still be expected prepare your own test cases to test and validate the code of the other program, validating all possible logic paths.
Sample Plan Format
Rationale:
1. Test uppercase entry of student type
2. Test credit hours at lower boundary for bracket 10-14
:
Input Values
Tested
Output Expected

Program #2 
A partial electronic color code chart, used to indicate the ratings of electronic components, is 
shown below. 
Color Digit
Black 0
Brown 1
Red 2
Orange 3
Yellow 4
Green 5
Blue 6
Violet 7
Gray 8
White 9


You will prepare a program to identify the digit represented by a specific color code. 
The program should first describe its purpose. 
Then prompt the user for one letter (character) to identify the color. 
Use one large nested switch statement to output one of the following messages: 
• If the letter is 'R' or 'r', output: Red stands for digit 2. 
• If the letter is 'O' or 'o', output: Orange stands for digit 3. 
• If the letter is 'Y' or 'y', output: Yellow stands for digit 4. 
• If the letter is 'V' or 'v', output: Violet stands for digit 7. 
• If the letter is 'W' or 'w', output: White stands for digit 9. 
• If the letter is 'B' or 'b', prompt for the user for a second letter. 
o If the second letter is 'R' or 'r', output: Brown stands for digit 1. 
o If the second letter is 'L' or 'l', prompt for the third letter: 
If the third letter is 'A' or 'a', then output: Black stands for digit 0. 
If the third letter is 'U', or 'u', then output: Blue stands for digit 6. 
• If the letter is 'G' or 'g', prompt for the next two letters at once (note that you can still read them into two separate character variables). Be sure to verify the correctness of BOTH the second and third letters (not just the third letter!) 
o If the second letter is 'R' or 'r' 
and the third letter is 'A' or 'a', output: Gray stands for digit 8. 
and the third letter is 'E' or 'e', output: Green stands for digit 5. 
• If none of the above situations apply, output: Unknown Color 
The program should always produce an output message. Therefore, you need to insure that ALL possible input combinations produce output of either a correct color and digit, or the "Unknown Color" message. 
NOTES: 
The program should not require the user to enter any more letters than are necessary to determine the output. 
You are not allowed to use any if statements in this program. 
There will be no functions in this program, except for main. 

General Notes for BOTH programs: 

1) Program logic must be indented correctly. 

2) Comments must be included for any constant/variable whose name is not completely descriptive. 

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M985600

Have any Question?


Related Questions in Programming Language

Assignment - haskell program for regular expression

Assignment - Haskell Program for Regular Expression Matching Your assignment is to modify the slowgrep.hs Haskell program presented in class and the online notes, according to the instructions below. You may carry out th ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question - create a microsoft word macro using vba visual

Question - Create a Microsoft Word macro using VBA (Visual Basic for Applications). Name the macro "highlight." The macro should highlight every third line of text in a document. (Imagine creating highlighting that will ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As