Java programming: Using nested if statement For a student to be accepted in XYZ College, the student must meet the following requirements: GPA must be 3.75 or higher. Family income must be more than $60,000 Applicant must be a New Jersey resident. XYZ college asked you to write a program to implement the above requirements. Write the program using (nested if)
Max Function
Statistical function is of many categories. One of them is a MAX function. The MAX function returns the largest value from the list of arguments passed to it. MAX function always ignores the empty cells when performing the calculation.
Power Function
A power function is a type of single-term function. Its definition states that it is a variable containing a base value raised to a constant value acting as an exponent. This variable may also have a coefficient. For instance, the area of a circle can be given as:
Algorithm:
Step 1 Start,
Step 2 Get user input for GPA, family income, and residency.
Step 3 Check if the GPA is equal to or greater than 3.75.
Step 4 If the GPA is not equal to or greater than 3.75, print a message saying that the user's GPA is not high enough to be accepted to XYZ College.
Step 5 If the GPA is equal to or greater than 3.75, check if the family income is more than $60,000.
Step 6 If the family income is not more than $60,000, print a message saying that the user's family income is not high enough to be accepted to XYZ College.
Step 7 If the family income is more than $60,000, check if the user is a New Jersey resident.
Step 8 If the user is a New Jersey resident, print a message saying that the user has been accepted to XYZ College.
Step 9 If the user is not a New Jersey resident, print a message saying that the user must be a New Jersey resident to be accepted to XYZ College.
Step 10 End.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images