Question: Question 1 Create your own IllegalDivisorException class. Make it a checked exception. Throw it from a divide ( int numerator, int denominator ) method from

Question 1
Create your own IllegalDivisorException class. Make it a checked exception. Throw it from
a divide(int numerator, int denominator) method from a Math class. From a main() method
in the same class, divide 5 by 2 and print the result "5 divided by 2 is 2.5" by using your
divide method. Also from the main() method call divide(5,0) and see the error displayed.
Question 2
Write a class Main with the main() method, which writes the command line arguments (all of
them) to a file named "data.txt". Then read the file and print all the data to the console, in
uppercase.
Question 3
Type in the Quiz
Question 4
Create your OWN jUnit test cases, for all positive and negative scenarios, and then write code
to pass it. A test case should test just one scenario.
Here are the requirements:
Class Name has two instance variables: first and last. The constructor throws
IllegalArgumentExceptions if either is null. The getName() method returns the first and last
names in Title Case, concatenated with a space between ("tiger", "woods" becomes "Tiger
Woods").

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!