Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use this pseudocode to add code to the program below: Start input testScore, classRank if testScore >= 90 then if ClassRank >= 25 then output

Use this pseudocode to add code to the program below:

Start

input testScore, classRank

if testScore >= 90 then

if ClassRank >= 25 then

output "Accept"

else

output "Reject"

endif

else

if testScore >= 80 then

if classRank >= 50 then

output "Accept"

else

output "Reject"

endif

else

if testScore >= 70 then

if classRank >= 75 then

output "Accept"

else

output "Reject"

endif

else

output "Reject"

endif

endif

endif

stop

/* Program Name: CollegeAdmission.java Function: This program determines if a student will be admitted or rejected. Input: Interactive Output: Accept or Reject */

import javax.swing.JOptionPane; public class CollegeAdmission { public static void main(String args[]) { // Declare variables

// Get input and convert to correct data type

// Test using admission requirements and print Accept or Reject if( testScore >= 90 ) { if( classRank >= 25) { System.out.println("Accept"); } else System.out.println("Reject"); } else { if( testScore >= 80 ) { if( classRank >= 50 ) System.out.println("Accept"); else System.out.println("Reject"); } else { if( testScore >= 70 ) { if( classRank >=75 ) System.out.println("Accept"); else System.out.println("Reject"); } else System.out.println("Reject"); } } } // End of main() method } // End of CollegeAdmission class

1. declare two string variables named testScoreString and classRankString

2. declare two integer vaiables named testScore and classRank

3. write the interactive input statements to retrieve a student's test score and class rank from the user of the program

4. write the statements to convert the string representation of a student's test score and class rank to the integer data type

5. compile and excute by entering 60 for the test score 87 for the class rank

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Handbook Of Database Security Applications And Trends

Authors: Michael Gertz, Sushil Jajodia

1st Edition

1441943056, 978-1441943057

More Books

Students also viewed these Databases questions

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago