Answer to Question #280799 in Java | JSP | JSF for Bjoy

Question #280799

Create a program that will display the corresponding college level of s given input year level. The year and the college are given below:



Note: Use if else if statement.



Year Level College Level


1 Freshmen


2 Sophomore


3 Junior


4 Senior


Other years Unlisted Level

1
Expert's answer
2021-12-17T14:01:31-0500


import java.util.Scanner;


public class App {


	/**
	 * The start point of the program
	 * 
	 * @param args
	 * 
	 */
	public static void main(String[] args) {


		Scanner keyBoard = new Scanner(System.in);
		System.out.print("Enter Year Level: ");
		int yearLevel = keyBoard.nextInt();


		if (yearLevel == 1) {
			System.out.println("College Level: Freshmen");
		} else if (yearLevel == 2) {
			System.out.println("College Level: Sophomore");
		} else if (yearLevel == 3) {
			System.out.println("College Level: Junior");
		} else if (yearLevel == 4) {
			System.out.println("College Level: Senior");
		} else {
			System.out.println("College Level: Unlisted Level");
		}


		keyBoard.close();
	}
}

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