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

📄 iomanager.java

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

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

	//----------------METHOD---------------
	public static void dowork(){
		//Input a
		System.out.println("Please input the value of coefficient a:");
		double a =input.nextDouble();
		//When a is within the range of -100 to 100
		if ((a>=-100)&&(a<=100))
		{
			//Input b
			System.out.println("Please input the value of coefficient b:");
			double b =input.nextDouble();
			//When b is within the range of -100 to 100
			if ((b>=-100)&&(b<=100))
			{
				//Input c
				System.out.println("Please input the value of coefficient c:");
				double c =input.nextDouble();
				//When c is within the range of -100 to 100
				if ((c>=-100)&&(c<=100))
				{
					QuadraticEquation newQuadraticEquation=new QuadraticEquation(a,b,c);
					QuadraticEquation.calcRoot();
				}
				else
				{ System.out.println("Error! Please check your input."); }
			}
			else
			{ System.out.println("Error! Please check your input."); }
		}
		else
		{ System.out.println("Error! Please check your input."); }
	}	
}

⌨️ 快捷键说明

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