1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Brrunno [24]
2 years ago
5

Java Programming Using nested if statement For a student to be accepted in XYZ College, the student must meet the following requ

irements: 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) Submit: Source code for the program (java file) Output word or pdf or jpg Design pseudocode pdf or word or jpg
Computers and Technology
1 answer:
mihalych1998 [28]2 years ago
6 0

Answer:

Follows are the solution to this question:

import java.util.*;//import package  

public class Main//defining a class

{

       public static void main(String[] ags)//main method  

       {

       float GPA;//defining floating point variable  

       int annual_income;//defining integer variable

       Scanner ga = new Scanner(System.in);//creating Scanner class object

       System.out.println("Enter GPA of student family : ");//print message

       GPA= ga.nextFloat();//input value from user-end

       System.out.println("Enter annual income of student family : ");//print message

       annual_income= ga.nextInt();//input value from user-end

      System.out.println("Is student resident of New Jersey(y/n) :");//print message

       char a=ga.next().charAt(0);//defining char variable to input char value

if(GPA>=3.75) //use if block to check GPA value

       {

        if(annual_income>60000) // use if to check annual income value

         {

            if((a == 'y'|| a== 'Y')) //use if to check char value

   System.out.println("Student accepted in college");//print message

            else//defining else block

             System.out.println("Student is not accepted in college because he/she not resident of New Jersey ");//print message

         }

        else//defining else block

          System.out.println("Student is not accepted in college because annual income is less than $60000 ");//print message

    }

   else//defining else block

    System.out.println("Student is not accepted in college because GPA is less than 3.75 ");//print message

       }

}

Output:

Please find the attached file.

Explanation:

Please find the attached file of the pseudocode.

In this code one integer, one float, and char variable "GPA, annual_income, and a" is declared, that uses the scanner class for accept value from the user-end, and in the next step, nested if the statement is used that checks the GPA value, annual_income, and a value and use the print method to print a value with the message.

You might be interested in
I need to know everything about lg fortune network unlocking or sim network unlock pin. Where, How, Which is best solution to do
vodka [1.7K]

Answer:

Lg fortune network unlocking is a method through which lg fortune can be used with any network or provider

Explanation:

When Any Network (e.g At&t, Cricket etc.) launched any smart phone (e.g lg fortune) they barricade their devices with a unique code, This blockade can be removed through sim network unlock pin. The only way to get it, is the phone`s imei which is also unique of each and every phone/tablet.

When you order it by sending the imei to a legitimate source like 24x7unlockcodes.com, They process it & derived a 100% working Lg Fortune unlock code. It safely unlock your Cricket Devices in skillful manners without damaging it. You can also get it from any cell phone shop.

7 0
2 years ago
Why might you need to convert a file to another file type
Alex17521 [72]
This depends on what program you're using. Some programs can only read certain files exclusive to that program, such as .psd files can usually only be read in Photoshop or other adobe programs. Many fields of work (Journalism, the Arts, Design, etc.) ask for .psd files to be converted to either .png, .jpg, or .tiff so that it can be seen on many other platforms.

For images especially, files are more compatible either on a program or printed. for example, .png files are good for storing color data from computer to computer, but if you print a .png file, the quality is poor. hence it's recommended to save files you want to print for designs as .jpeg, because .jpeg can more easily be printed and will then be presented at a high quality.

Sometimes color quality changes depending on CMYK as well but that's a whole other ball of wax.
8 0
3 years ago
If i were to give you free points woulld you take them?
kipiarov [429]

Answer:

D) friend me

Explanation:

6 0
3 years ago
Read 2 more answers
Ano ang maikling kwento??
marishachu [46]

Answer with Explanation:

Ang "maikling kuwento" ay isang uri ng<em> kathang-isip</em> na may pagkapareho sa nobela. Ito'y may buong tema ngunit mas maikli kaysa sa nobela at mas madali rin itong matapos basahin. Hango ito sa mga tunay na pangyayari sa buhay ng tao. Binubuo ito ng limang elemento: <em>tauhan, tagpuan, hidwaan, tema at plot. </em>Ito'y may balak na pukawin ang damdamin ng nagbabasa ayon sa kalagayan ng mga tauhan sa kuwento at ito'y nag bibigay ng mabuting aral.

Si <em>Edgar Allan Poe</em> ang tinaguriang<em> "Ama ng Maikling Kuwento." </em>

3 0
3 years ago
How do you represent a 3D object with unusual curves in 2D space? CAN SOMEONE HELP PLEASE
levacccp [35]
You have to draw the extra lines out
7 0
2 years ago
Other questions:
  • To include totals and other statistics at the bottom of a datasheet, click the ____ button on the HOME tab to include the Total
    12·1 answer
  • Using information from the lesson, explain how new technologies change your experience as a consumer.
    5·2 answers
  • During an interview, your non-verbal communication (body language, gestures, tone of voice, speed of talking,
    6·1 answer
  • 7. The penalties for a first-time DUI charge include a fine of __________. A. up to $500 for a BAL of .08 to .15 B. $500-$1,000
    5·1 answer
  • In C++ write a program that prints out PI as a type double and a type float EXACTLY as shown below. Your program should have ONE
    13·1 answer
  • Peripeteia is also referred to as __________.
    5·2 answers
  • Define a function pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyram
    6·2 answers
  • How do I create a simple percentage function to gather a score for a quiz in PHP?
    14·1 answer
  • Who is tim berners-lee
    14·2 answers
  • The files in James's computer were found spreading within the device without any human action. As an engineer, you were requeste
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!