S308 Assignment 2 – Scholarship & Tuition
Important!
This is an individual assignment. Students are NOT allowed to work together or seek help from anyone else including current and former S308 students. Any questions about the assignment should be sent to the instructor or the TA. Anyone found to have received help from another person will receive a zero (0) for the assignment and will be reported for academic misconduct.
Each year, Kelley School of Business provide scholarships to students and offer a discount rate for students’ tuition. However, the amount each student can get is different. Your assignment is to create a WPF application that allows students to enter four information, including birthday, household income, type of student (u=undergraduate, g = graduate), and major (Marketing, Accounting, and Information Systems). The program should then calculate and display three fields after a user clicks the calculation button: Scholarship, and Tuition Fees. All output should be rounded to 2 decimal places and formatted appropriately as currency. A clear button that clears all values should also be included (both outputs and inputs).
More Requirements:
1. You must check that the income entered by the user is a Double number. If the user enters something other than a number for the balance, your program should communicate that to the user using a MessageBox. Also, if the user enters a balance that is less than 0, the application should request the user to enter a non-negative balance also using a MessageBox.
2. For Birthday Textbox, assume a user would only use the following format: “xx-xx-xxxx” (e.g., 06-15- 1998).
3. You should also check that the user entered either a “U” or “G” for the type of student (undergraduate, or graduate). The program is case insensitive, which means “U” and “u” are the same for the program. Again, present a MessageBox to the user if they enter a string that is not valid for the student type.
4. Major should be a Combobox, and have only three values: Marketing, Accounting or, Information Systems. A user must choose one of the major. If a user does not choose a major, the program should communicate that to the user using a MessageBox.
In all cases where the input isn’t valid, you should prevent the program from executing any more code until the user corrects the problem and submits the form again.
Rules to calculate tuition:
1. For an undergraduate student, the default tuition fee is $20,000.
2. For a graduate student, the default tuition fee is $25,000.
3. The following table provides a rule for scholarship adjustment.
Major
Rule
Marketing
Get 20% off
Accounting
Get 25% off
Information Systems
Get 50% off
Rules to calculate Scholarship:
1. For an undergraduate student, the default scholarship is $10,000.
2. For a graduate student, the default scholarship is $15,000.
3. The following table provides a rule for scholarship adjustment.
4. Lucky draw
(a) Summing up the value of an individual’s Day, Month, and Year of Birthday. (e.g. 06/15/1998 =>
6 + 15 + 1998 = 2019
(b) If the value can be divisible by 3, the student gets an extra $2,000.
5. After calculation by the rule mentioned above, check the final value of the scholarship. The final scholarship’s value should not be negative. If the final value is negative, make this value as 0.
Tips:
1) Consider using the function TryParse() to test whether the string entered by the user is a number.
2) Consider using one of the Round functions to round the number in your output.
3) For validating the student type, consider using the String methods: ToUpper() or ToLower().
4) Use string function such as Splits and Convert functions to complete the lucky draw.
5) Do your research to find a method to format your output for currency and percentages (Do not
use text $ directly; check function ToString()).
Grading Notes:
• Name you file ****_A2.zip where **** is your IU Network ID
• All applicable grading criteria from previous assignments will be applied to this assignment. Including but not limited to:
o Assignment opens and runs without error.
o Well-designed user interface with appropriate controls, proper naming, labels,
title/instructions.
o The controls should be centered aligned horizontally and vertically (i.e. neatly ordered). o Proper coding practices including organized easy-to-read code and appropriate data
type choices
• Include proper comments in your code.
Sample data to test your program:
This sample data is just for your reference. You should test your program with other data to make sure it calculates correctly.
Household Income
Undergraduate student
Graduate student
$0 to $20,000
Full scholarship
Full scholarship
Over $20,000 to $50,000
$9,000
$13,000
Over $50,000 to $100,000
Scholarship – 3% of income
Scholarship – 6% of income
Over $100,000
Scholarship – 4% of income
Scholarship – 8% of income
Input
Birthday Household Income Student Type Major
09-02-1996 75000
U Marketing
Output Scholarship Tuition Fees
$9,750.00 $16,000.00