subject

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

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 16:00, raizagisselle1273
If a client wants to make minor edits, what should he/she use?
Answers: 3
image
Computers and Technology, 23.06.2019 05:00, mikeysoulemison
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
image
Computers and Technology, 23.06.2019 22:20, kandi2565
What is a programming method that provides for interactive modules to a website?
Answers: 1
You know the right answer?
Use this pseudocode to add code to the program below:

Start

input testScore,...

Questions in other subjects:

Konu
History, 25.01.2020 08:31