Java Code Financial Aid Office Project

User Generated

Abboznfgre961

Programming

Description

I have attached the full question, you just have to complete steps 1-4. Should be short and easy!

- dont use any method other than main

- use JOptionPane

Unformatted Attachment Preview

Working in the Financial Aid Office at GMU, you have been asked to create a program that calculates the amount of financial aid a family is eligible for, based on the number of dependents in the household. The business rules for determining eligibility are as follows: • • • • If there are 2 dependents in the household the family is eligible for $1,500 per dependent If there are 3 dependents in the household the family is eligible for $2,500 per dependent If there are 4 dependents in the household the family is eligible for $3,000 per dependent In all other situtations, the family is not eligible for any financial aid You can use the following stub solution. Copy and paste this solution into your IDE. You should complete blocks 1 through 4. import javax.swing.JOptionPane; public class FinancialAid { public static void main(String[] args) { final int NUM_MIN_DEPENDENTS = 0; final int NUM_MAX_DEPENDENTS = 9; /* #1: Create code that will call the method you created in #3 below to get the number of dependents, * factoring in the minimum and maximum number of dependents allowed */ /* #2: Create code that will call the method you created in #4 below to calculate the amount of aid * that will be earned based on the number of dependents gathered. */ printFinancialAid(aid); } /* #3: Create a method to get and return the number of dependents, factoring in * the minimum and maximum number of dependents allowed */ /* #4: Create a method to calculate and return the amount of financial aid that will be earned * based on the number of dependents gathered */ public static void printFinancialAid(double aid) { JOptionPane.showMessageDialog(null, "The amount of financial aid your family is eligible for is: $" + String.format("%.2f", aid)); } } Note #1: You may assume the user will only ever enter numeric values. Note #2: For input/output, you must use the JOptionPane class. Whenever an invalid value is input, the user must be re-prompted to provide a new input. Your code must compile using the jGrasp IDE. If your code does not compile using jGrasp (for any reason), a grade of 0 will be earned. No exceptions! Upload your completed .java file. Make sure you upload the .java file and not the .class file
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

I have made the change you reques...


Anonymous
Goes above and beyond expectations!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Similar Content

Related Tags