LAB211 Assignment: Title Background Program Specifications
LAB211 Assignment: Title Background Program Specifications
Title
Solving the equation, find the square numbers, even numbers, and odd numbers.
Background
N/A
Program Specifications
Design a program that lets users input coefficients of superlative and quadratic equations. Display the odd, even
and square numbers from input coefficients.
Function details:
Users run the program. The program prompts users to select an option.
Users select an option, perform Function 2.
Guidelines
Student must implement the following methods:
calculateEquation
calculateQuadraticEquation
in startup code.
Recommend:
Find the square number by using Math.sqrt to root 2, find odd as a% 2! = 0.
Use public Float checkin (String floatString) in class Number to check if a, b, c enter numerical values Is yet.Use public
boolean isOdd (float number) function to check odd number or not
Use ham isPerfectSquare public boolean (float number) to check the number is a local number or not.
Function 1: Solving superlative equation
o Must write the function: public List <Float> calculateEquation (float a, float b)
Input:
a: a value
b: b value
o Return: list (no solution = null, infinitely many solutions = empty). Function 2: Solving quadratic. Must write the
function: public List<Float> calculateQuadraticEquation(float a, float b, float c)
Return Value: list (where no solution = null, infinitely many solutions = empty).