⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 menu.java

📁 Produce Java classes to calculate and display the root of a quadratic equation when input the coeffi
💻 JAVA
字号:
import java.util.*;
public class Menu
{

	//-------------FIELDS-----------------
	private static Scanner input = new Scanner(System.in);

	//----------------OUTPUT-----------------
	public static int outputMenu()
	{
		int selector = 0;	
		while (selector < 1 || selector > 2)
		{
			//display menu options
			System.out.println("Please choose one of the methods below");
			System.out.println("======================================");
			System.out.println("1. Calculation");
			System.out.println("2. Exit");
			System.out.println("Please input your Select Option:");

			selector = input.nextInt();
		}

		switch (selector)
		{
			case 1:
				IOManager newIOManager = new IOManager();
				IOManager.dowork();
				break;
			case 2:
				System.out.println("==========");
				System.out.println("Thank you");
				break;
		}
		return (selector);
	}
}


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -