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
tangare [24]
3 years ago
6

11.19 (Constructor Failure) Write a program that shows a constructor passing information about constructor failure to an excepti

on handler. Define class SomeClass, which throws an Exception in the constructor. Your program should try to create an object of type SomeClass and catch the exception that’s thrown from the constructor
Computers and Technology
1 answer:
iren2701 [21]3 years ago
6 0

Answer:

You absolutely should throw an exception from a constructor if you're unable to create a valid object. This allows you to provide proper invariants in your class. ... Throw an exception if you're unable to initialize the object in the constructor, one example are illegal arguments.

Explanation:

You might be interested in
What safety do you need to have ready to start a device repair?
lorasvet [3.4K]

Answer:

Make sure to have the right tools for the right job. if you don't it would be probably best to send it to a shop to get fixed.

7 0
2 years ago
2 Manter o autocontrole nos ajuda a evitar muitos problemas na nossa vida pessoal e no ambiente profissional. Em se tratando de
Umnica [9.8K]

Answer:

english please

Explanation:

8 0
4 years ago
michelle works in retail and cant decide what products to include in the stores front window display. what is the first step she
Nataliya [291]

Correct answer is state the problem

5 0
3 years ago
Read 2 more answers
Write a script that will read the file, (strip the carriage returns), create a dictionary of names and favorite radishes and cre
amm1812

Answer:

python code below:

names={}#first dictionary for names and favorite

favor={}#radish type and how many are favorite

f=open("raddish.txt")#opening file

for i in f:#for each line

j=i.strip().split("-")#splitting base on -

names[j[0].strip()]=j[1].strip()#getting first dictionary

if j[1].lower().strip() in favor:#counting the favorite elements

favor[j[1].lower().strip()]+=1

else:

favor[j[1].lower().strip()]=1

print ("First Dictionary",names)#printing the names

print("second dictionary:",favor)#printing the favorite numbers

f.close()#closing file

Explanation:

The program was implemented using python programming language.

Its operation is to read the file, (strip the carriage returns), create a dictionary of names and favorite radishes and create a dictionary of each radish type and the number of people who chose that as their favorite.

It returns as output the names of people entered for the Radishes.

See attachment for screenshot.

8 0
3 years ago
Which of the following words best describes the word icon ​
Usimov [2.4K]

Answer:

symbol

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • In the MOV instruction both operands i.e. source andthe destination cannot be
    15·2 answers
  • List 5 different programming languages calls to print
    8·2 answers
  • PLEASE HELP ME ASAP!!!!
    11·1 answer
  • ERP packages are always quite simple.<br><br> True<br><br> False
    5·1 answer
  • You hash a symmetric key and store the hash on your workstation. You call your friend and verbalize the symmetric key to him or
    7·1 answer
  • What is the importance of effectiveness in communication?
    14·1 answer
  • क) मानौं तिमी बसेको समाजमा मान्छेहरूले सधै फोहर फाल्ने गर्नाले वातावरण प्रदूषित
    13·1 answer
  • The average number of entities completed per unit time -- the output rate -- from a process is called ____.
    9·1 answer
  • Zara wants to create some lines of code that are ignored by the computer. What should these lines begin with?
    5·1 answer
  • What is software?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!