Answer to Question #250793 in Java | JSP | JSF for NUCHO

Question #250793
  1. To qualify for a loan award, a student should score between 25 -100 points and should have been admitted to an accredited institution.  Write a program that accept points, institution and their gender(f for female and m for male) separated by spaces and determine if the student qualifies for an award or not. The program should also, print their gender in full and capitalized. Please see sample runs below for appropriate messages/input/output.    

 

 String processing methods of String class should be used where necessary!! 



1
Expert's answer
2021-10-13T07:30:46-0400
import java.util.Scanner;

public class QuizFl {

    
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        int studentScore;
        String gender;
        Scanner sc=new Scanner(System.in);
        
        System.out.println("Please enter the student's score:");
        
        studentScore=sc.nextInt();
        System.out.println("Student's score is:"+studentScore);
        
        
        System.out.println("Please enter the gender of student:");
        gender=sc.next();
        
        
        if(studentScore>25 & studentScore<=100){
            System.out.println("Student is qualified for the loan.");
            System.out.println("Student's gender is:"+gender);
        }else{
            System.out.println("Student is not qualified for the loan.");
        }

    }

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS