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
GarryVolchara [31]
3 years ago
7

Assume that processor refers to an object that provides a void method named process that takes no arguments. As it happens, the

process method may throw one of several exceptions. Write some code that invokes the process method provided by the object associated with processor and arrange matters so that your code causes any exception thrown by process to be ignored. Hint: use the catch (Exception ex) and do nothing under the catch clause.
Computers and Technology
1 answer:
Aloiza [94]3 years ago
5 0

Answer:

Following are the code to the given question:

try//defining a try block

{

processor.process();//defining an object processor that calls process method

}

catch(Exception e)//defining a catch block

{

}

Explanation:

In this question, the 'Try' and 'catch' block is used in which both the keywords are used to represent exceptions managed during runtime due to information or code errors. This try box was its code block which includes errors. A message queue catches the block errors and examines these.

In the try block, a method "process" is used which is create the object processor that calls the method.

You might be interested in
Design and implement an algorithm that gets a list of k integar values N1, N2,...Nk as well as a special value SUM. Your algorit
Fittoniya [83]

Answer:

The algorithm is as follows:

1. Start

2. Input List

3. Input Sum

4. For i = 0 to length of list - 1

4.1 num1 = List[i]

5. For j = i to length of list - 1

5.1 num2 = List[j]

6. If SUM = num1 + num2

6.1 Print(num1, num2)

6.2 Break

The algorithm is implemented in python as follows:

def checklist(mylist,SUM):

     for i in range(0, len(mylist)):

           num1 = mylist[i]

                 for j in range(i+1, len(mylist)):

                       num2 = mylist[j]

                       if num1 + num2== SUM:

                             print(num1,num2)

                                   break;

Explanation:

I'll explain the Python code

def checklist(mylist,SUM):

This line iterates from 0 to the length of the the last element of the list

     for i in range(0, len(mylist)):

This line initializes num1 to current element of the list

           num1 = mylist[i]

This line iterates from current element of the list to the last element of the list

                 for j in range(i+1, len(mylist)):

This line initializes num1 to next element of the list

                       num2 = mylist[j]

This line checks for pairs equivalent to SUM

                       if num1 + num2== SUM:

The pair is printed here

                             print(num1,num2)

                                   break;

6 0
3 years ago
As a general rule, the number of bullet points on a slide should not exceed _____. a.2 b.4 c.8 d.10
Paraphin [41]
Letter B is correct!! My teacher told me!!
6 0
3 years ago
When selecting font size in a document, ____ points equals one-inch-tall text?
IgorC [24]
Hello <span>Jhigg4685 
</span><span>

Answer: When selecting font size in a document, 72 points equals one-inch-tall text?


I hope this helps
-Chris</span>
3 0
3 years ago
Write a brief description of what the local authorities are recommending in the news people should do to protect themselves from
lana [24]
The brief description of the local author asbestos is Hope and that's what it would too with a heart and another heart which equals 100 which equals yes
3 0
3 years ago
Prior to the world wide web as we know it today, the internet was chaotic, without any ____.
atroni [7]
Search engines - there was no single way to ask a question
5 0
3 years ago
Other questions:
  • ________ symbol is used in the "Advanced" section of the time range picker to round down to nearest unit of specified time.
    8·1 answer
  • Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
    15·1 answer
  • Clicking on the Spelling &amp; Grammar button is one way to correct a spelling error in Word. Please select the best answer from
    7·2 answers
  • Will a tablecloth that is 155 cm long cover a table that is 1.6 m long?
    12·2 answers
  • When discussing the data-modeling building blocks, anything (a person, a place, a thing, or an event) about which data are to be
    15·1 answer
  • All states that have altered judicial selection techniques in recent years have adopted some form of:
    5·1 answer
  • What is the definition of a digital signal?
    14·1 answer
  • When can you access the BIOS setup utility?
    14·1 answer
  • Convertbinary(111100)to decimal​​​​
    13·2 answers
  • Another term for the plot structure of the hero journey
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!