1 write an application that throws and catches an arithmeticexception when you attem 5346936

1. Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative value. Prompt the user for an input value and try the Math.sqrt() method on it. The application either displays the square root or catches the thrown Exception and displays an appropriate message. Save the file as SqrtException.java.

2. Create a ProductException class whose constructor receives a String that
consists of a product number and price. Save the file as ProductException.java.
Create a Product class with two fields, productNum and price. The Product
constructor requires values for both fields. Upon construction, throw a
ProductException if the product number does not consist of three digits, if the
price is less than $0.01, or if the price is over $1,000. Save the class as Product.java.
Write an application that establishes at least four Product objects with valid and invalid values. Display an appropriate message when a Product object is created
successfully and when one is not. Save the file as ThrowProductException.java.

thanks. Points here only, need ASAP!!!

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now