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
Sliva [168]
3 years ago
13

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 if process throws any exception, your code prints the message "process failure" to standard output and does nothing else in regard to the exception. Hint: use the catch (Exception ex) for the catch clause.
Computers and Technology
1 answer:
Kitty [74]3 years ago
3 0

Answer:

Following are the code written in the C# Programming Language:

/*.......exception handling......*/

try{ //if the program is correct

processor.process() //calling of the function

}

catch (Exception ex){ //if the program incorrect

Console.WriteLine("process failure")  //print message

}

Explanation:

Here, the following code we use exception handling in C# Programming Language in which we use the following try and catch block.

  • Firstly, we use the try block if the is correct then, we call the following method through the object.
  • Then, we use the catch block if the program is incorrect then, we print the following message.
You might be interested in
The functions of forums
coldgirl [10]

Answer:

The purpose of the forum is to talk about features that are currently in the game, whether they’re working, whether they’re not working, what we enjoy or dislike, what we would like to see in future, and what we would like to see less of, sharing tips and advice, and sharing creative stuff in the player content section.

Explanation:

Alliance wars is currently in beta testing. Anyone enrolled in the testing has their own access to a separate forum for discussion to discuss amongst themselves, and to provide feedback to the devs, on what is working and what isn’t. None of that information needs to be shared outside of the beta forum. Anyone NOT enrolled in the testing has no idea what is going on with it, so has no reason to be involved with discussing that side of things. If you don’t like that, you had your chance to apply the same as they did.

So yes, that thread should have been removed.

8 0
3 years ago
C++ code pls write the code
Mariana [72]

Answer:

Following are the code to this question:

#include<iostream>//defining header file

using namespace std;

class vec//defining class vec  

{

int x, y, z; //defining integer varaible x, y, z

public: // using public access specifier

vec() //defining default constructor

{

   x = 0; //assign value 0 in x variable  

   y = 0; //assign value 0 in y variable

   z = 0;//assign value 0 in z variable

}

vec(int a, int b , int c) //defining parameterized constructor vec

{

   x = a; //assign value a in x variable

   y = b; //assign value b in y variable

   z = c;//assign value c in z variable

}

void printVec() //defining a method printVec

{

   cout<<x<<","<<y<<","<<z<<endl; //use print method to print integer variable value

}

//code

vec& operator=(const vec& ob) //defining operator method that create object "ob" in parameter  

{

x=ob.x; //use ob to hold x variable value

y=ob.y;//use ob to hold y variable value

z=ob.z;//use ob to hold z variable value

return *this;//using this keyword to return value  

}

};

int main()//defining main method

{

vec v(1,2,3);//calling parameterized constructor

vec v2; //creating class object to call method

v2=v; //creatring reference of object

v2.printVec(); //call method printVec

return 0;

}

Output:

1, 2, 3

Explanation:

In the above-given code part, a method "operator" is defined, that accepts an object or we can say that it is a reference of the class "ob", which is a constant type. Inside the method, the object is used to store the integer variable value in its variable and use the return keyword with this point keyword to return its value.    

6 0
3 years ago
If you feel that an OSHA inspection is needed to get hazards corrected at your workplace, which is your best option?
KATRIN_1 [288]
Most likely bring it to your managers attention and and have him contact an OSHA employee.
4 0
4 years ago
HELP PLZZZZZZ
Brums [2.3K]

Answer:

Do you want me the money for the policy that has been canceled

3 0
3 years ago
Which of the below statements describes the nature of HTML elements - check as many as apply
slava [35]

Answer:

The answer to this question is option 1,2 and 4.

Explanation:

Some html elements does not contain anything or having no content are called empty html elements.for ex:- <br>,<hr> etc.

HTML elements are of two types block and inline.block elements starts with new line for ex:-div,body etc.Inline elements does not starts with new line.for ex:-<style>,<meta>,<head>etc.

Html elements also contains attributes that modify the element for ex:-

<body style="background-color:blue;">

where style is an attribute.

5 0
3 years ago
Other questions:
  • You are given a network of 10.50.24.0/21, which contains 2,048 addresses. what subnet mask should you use to divide this into fo
    7·1 answer
  • Given two int variables, i and j, which have been declared and initialized, and two other int variables, itemp and jtemp, which
    14·1 answer
  • Determine and prove whether an argument in English is valid or invalid. About Prove whether each argument is valid or invalid. F
    5·1 answer
  • Python: initalize the variable first_name with the value from the user prompt "What is your first name? " initalize the variable
    9·1 answer
  • A method that movie distributors are adopting to make it possible to view movies instantly, without DVD, is known as:
    11·1 answer
  • Eric’s computer slows down when he open several computer programs. Why does this happen?
    15·2 answers
  • Since we know that this particular instance of the AppMaker implements a customer-facing store that processes financial transact
    6·1 answer
  • A qué escala está dibujado el plano del Instituto si sabemos que la puerta principal de entrada tiene un ancho 3,40 metros y en
    14·1 answer
  • $
    15·2 answers
  • See attached. I have code typed out but still having problems.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!