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
VikaD [51]
3 years ago
8

Use the code below to answer the following questions. Note that the catch statements in the code are not implemented, but you wi

ll not need those details. Assume filename is a String, x is an int, a is a double array and i is an int. Use the comments i1, i2, i3, e1, e2, e3, e4, e5 to answer the questions (i for instruction, e for exception handler)
try { BufferedReader infile = new BufferedReader(new FileReader(filename)); // i1
int x = Integer.parseInt(infile.readLine( )); // i2
a[++i] = (double) (1 / x); // i3
}
catch (FileNotFoundException ex) {...} // e1
catch (NumberFormatException ex) {...} // e2
catch (ArithmeticException ex) {...} // e3
catch (ArrayIndexOutOfBounds ex) {...} // e4
catch (IOException ex) {...} // e5

An exception raised by the instruction in i1 would be caught by the catch statement labeled:

a) e1
b) e2
c) e5
d) either e1 or e5
e) either e1, e4, or e5
Computers and Technology
1 answer:
anzhelika [568]3 years ago
4 0

Answer:

d) either e1 or e5

Explanation:

Here, the instruction i1 goes ahead in trying to open the given file through an input stream buffer reader. If the given file name is wrong, it will indicate that an e1 file is not found or if any other IO errors due to invalid stream, no disc in drive e5 IO exception will be drawn.

You might be interested in
What are motion graphics?
AysviL [449]
D)Animated abstract shapes
3 0
2 years ago
Jana works in a call center helping people who are having trouble setting up their
olchik [2.2K]

Answer:

Information Support and Services

Explanation:

She works helping people setting up their accounts so she supports with information from her services

4 0
2 years ago
Read 2 more answers
Normal or random variations that are considered part of operating the system at its current capability are ______: ​ a. systemic
Effectus [21]

Normal or random variations that are considered part of operating the system at its current capability are <u> c. common cause variations.</u>

Explanation:

Common cause variation is fluctuation caused by unknown factors resulting in a steady but random distribution of output around the average of the data.

Common-cause variation is the natural or expected variation in a process.

Common-cause variation is characterised by:

  1. Phenomena constantly active within the system
  2. Variation predictable probabilistically
  3. Irregular variation within a historical experience base

It is a measure of the process potential, or how well the process can perform when special cause variation removed.

Common cause variation arises from external sources that are not inherent in the process and is where statistical quality control methods are most useful.

Statistical process control charts are used when trying to monitor and control 5- and 6-sigma quality levels.

4 0
3 years ago
Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
defon

Performance monitor tool can you use to display hardware utilization statistics.

<h3>what is a performance Monitor?</h3>
  • Performance Monitor is a system monitoring program introduced in Windows NT 3.1. It monitors various activities on a computer such as CPU or memory usage.

To learn more about performance monitoring, refer

to brainly.com/question/12960090

#SPJ4

7 0
2 years ago
Write a function sample_median(n,P) that generates n random values using distribution P and returns the median of the collected
TiliK225 [7]

Answer:

import numpy as np

def sample_median(n, P):  

   return np.median( np.random.choice ( np.arange (1, len(P) + 1 ), n, p = P ) )

print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))

print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2]))

print(sample_median(5, [0.3,0.7])

print(sample_median(5, [0.3,0.7])

Explanation:

  • Bring in the numpy library to use the median function provided by the numpy library.
  • Define the sample_median function that takes in 2 parameters and returns the median with the help of built-in random, choice and arrange functions.
  • Call the sample_median function by providing some values to test and then display the results.    

Output:

4.5

4.0

2.0

1.0

7 0
2 years ago
Other questions:
  • What is the last step in conducting url search
    11·1 answer
  • Effective character encoding requires:
    8·1 answer
  • . char values are surrounded by _____ quotes
    15·1 answer
  • Write a program that calculates the amount of money the salesperson will earn from selling discount cards. java program
    8·1 answer
  • The merge sort algorithm____________.A. Can be used only on vectors of even length.B. Works by reducing vectors down to the base
    9·1 answer
  • What soft ware can you use to erase all of your data from a hard drive safely
    13·1 answer
  • Answer this question for points lol
    7·2 answers
  • Why was it important for the date format to be standardized by the
    7·1 answer
  • Ask the user to input a number less than 100. Print all the numbers from that number to 100.
    6·2 answers
  • Software that displays advertising material when online.
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!