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)

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter5: Looping
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
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)
Expert Solution
Step 1

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

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT