1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tiny-mole [99]
4 years ago
11

1. Write an application that throws and catches an ArithmeticException when you attempt to take the square root of a negative va

lue. 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.
Computers and Technology
1 answer:
Inessa05 [86]4 years ago
4 0

Answer:

Hence the answer is given as follows,

You might be interested in
Many application controls are useful for enhancing the reliability of both transaction data and master record data. This applica
Rzqust [24]

Answer:

True

Explanation:

In most accounting software like SAP, Application control performs what is known as validity check.

And Validity check is when this application control compares the data entered into a field for a transaction to that in a master record to verify the data entered exists.

With above definition we can infer that the question statement is true.

5 0
3 years ago
Select the correct answer.
bagirrra123 [75]

Answer:

I think the answer is C

Explanation:

Because if you use context clues for the word CINEMATOGRAPHER, cinema is like scene and lights and tographer is the person who adjusts it

4 0
3 years ago
For a data structure, such as a stack, who is responsible for throwing an exception if the stack is empty and a pop() is called:
lubasha [3.4K]

Answer:

D. End-User Programmer.

Explanation:

A stack data structure is used to holds data for programs. The first data to go into a stack is always the last to be extracted (First-in-Last-out). Data is read into the stack with the push function and retrieved with the pop function.

When the stack is empty, it means there are no data left to pop from it. If a pop function is issued at this time, the program conventionally throws an error, there is no need for the end-user to write an exception handler for it because the end-user programmer has done that already.

4 0
3 years ago
Max shot a video with a digital camera. Where did the video files get stored in the camera?
Arturiano [62]

Answer:

In the memory sticks/cards of the digital camera

Explanation:

Many digital cameras come with removable storage cards in the form of memory cards, memory sticks and flask cards. Activities (pictures and videos) captured with these digital cameras are stored in these removable storage cards. These makes it easy for users to remove the storage cards and insert into other devices.

3 0
3 years ago
What are invoices? A. Documents that convey a company's liabilities B. Documents that convey how much a company was earning and
grandymaker [24]
<span>C. Documents that convey buyers, sellers, and purchases made</span>
5 0
4 years ago
Read 2 more answers
Other questions:
  • Explain why the 7 bit standard ASCII code needs to have the highest bit set to a zero
    11·1 answer
  • How do computer worms spread​
    11·1 answer
  • According to Ohm's Law current equals what?
    7·2 answers
  • What is the value of the average variable after the following code is executed? var sum = 0; var prices = [14, 10, 9, 12, 11, 14
    14·1 answer
  • Linux is a kind of software whose code is provided for use, modification, and redistribution. what kind of software is this?
    5·1 answer
  • List 2 end to end test commands. <br><br> Will mark Brainliest!!
    13·1 answer
  • If you forget your privacy password what will you do if the ask this question what is the name of one of your teacher?​
    12·1 answer
  • Raman will perform in pune tomorrow(simple past)​
    11·2 answers
  • In a mobile app for computer technicians in a large college, an initial trigger event could be ____.
    7·1 answer
  • MSWord is a popular___________ program.​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!