Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please answer in java. Homework 5 Due Date: Thursday, March 31, 2022 Part1: Write a java program to solve the quadratic equations. Note that the
Please answer in java.
Homework 5 Due Date: Thursday, March 31, 2022 Part1: Write a java program to solve the quadratic equations. Note that the program will return Nan if the b - 4ac is negative number. -bb2-4ac X = 2a Create your own exception, name it NanException In the main method: The program should handle this issue by throwing an exception and display a message such as "No square root for negative numbers make sure that b^2 is greater than 4*a*c" The user should be able to enter the values of a, b, and c. The output will be the two values of x1, and x2. Part2: Create a text file that include different integer numbers, name the file numbers.txt. Write a program that reads the numbers from the text file and writes in a different file the number and if the number is odd or even, name the file output.txt Your submission should include the following: 1- NanException class (NanException.java) 2- NanExceptionTester.java which includes the main method 3- Numbers.txt 4- Output.txt 5- InputOutputTester.java Show transcribed image text
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Part 1 NanExceptionjava public class NanException extends Exception public NanExceptionString messag...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started