Question: 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

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

1 Expert Approved Answer
Step: 1 Unlock

Part 1 NanExceptionjava public class NanException extends Exception public NanExceptionString messag... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!