Questions
Exception handling All Exceptions that can be thrown must descend from this Java class: The getMessage(...

Exception handling

All Exceptions that can be thrown must descend from this Java class:

The getMessage( ) method is inherited from this class?

What are the two broad catagories of Exceptions in Java?

If an Exception is not a checked exception it must extend what class?

What is the difference between a checked Exception and an unchecked Exception?

What are the two options a programmer has when writing code that may cause a checked Exception to be thrown? Can a try block contain code that would cause more than one type of Exception to possibly be thrown?

Is it true that a try block can only be followed by ONE catch block?

What is the purpose of the finally block?

When is the code in the finally block executed?

What happens when a try block throws an Exception object? Is an Exception the same thing as a syntax or logic error?

In: Computer Science

A bag of cookies contains 40 cookies. The calorie information printed on the bag claims that...

A bag of cookies contains 40 cookies. The calorie information printed on the bag claims that there are 8 servings in each bag and that a single serving equals 300 calories. Design and write a C++ program that prompts your user for the number of cookies that he or she ate and then displays the calories they consumed.

Use variables to represent the given information, such as the number of cookies in each bag and the number of calories in each serving. Compose statements using the given variables to calculate the number of calories in each cookie. Use the number of cookies and the number of calories per cookie to determine how many calories were consumed. The use of magic is not permitted in computer programming. You, as the programmer must compose steps that store given information in variables and then use these variables to determine values such as the number of calories in each cookie.

CODE IN C++

In: Computer Science

Question 1 (20 marks) Refer to the operations below: Add (10 + 5) Add (4+8) Add...

Question 1

Refer to the operations below:

Add (10 + 5)

Add (4+8)

Add (7*2)

Add (90 – 3)

Print list

Print peek

Remove an item from the list

Print list

1.1 Implement the operations above into a Queue structure called q1.

(10)

1.2 Implement the operations above into a Stack structure called s1.

(10

Guidelines: Please take note!

(a) Name your program Question1_1 for the queue structure and Question1_2 for the stack structure

(b) The Java Programmer is required to include screenshots from a JGrasp IDE which displays their commented code and the output and also indicates their laptop date and time of code execution, the screenshot of the code needs to be error-free and must not produce any logic errors!

In: Computer Science

Two skaters at rest, one of 120 kg and the second of 60 kg, push off...

  1. Two skaters at rest, one of 120 kg and the second of 60 kg, push off against another. Which will gain the largest magnitude of momentum? A. Both skaters will gain momentum of the same magnitude B. Neither skaters will gain any momentum C. the 120-kg skater D. the 60-kg skater E. the momentum of each skater is conserved

  2. Momentum changes for each of these scenarios except for A. a neutron in a nuclear reactor that changes the direction but not the magnitude of its velocity when it scatters off another neutron B. a falling rock from an instant after initial drop from a high tower until an instant before impact C. a block sliding at constant speed (with friction) down an inclined plane D. a movie stunt performer flying on a parabolic path before the performer stops on the ground E. a rocket sled on a horizontal track from an instant after the drag parachute opens until an instant before the sled comes to rest

In: Physics

Write the balanced equation in ACID solution for the reaction below: Fe2++MnO-4→Fe3++Mn2+

 

a. Write the balanced equation in ACID solution for the reaction below:

Fe2++MnO-4→Fe3++Mn2+

b. To standardize a potassium permanganate solution (purple in appearance), a 0.250 g sample of FAS (iron II ammonium sulfate hexahydrate; molar mass = 342 g/mol) is dissolved in 25.00 mL distilled water, then acidified with sulfuric acid. The solution is then titrated with 35.00 mL potassium permanganate solution from a buret until a pale persistent purple color is attained. Calculate the molarity of the potassium permanganate solution.

c. What would be the effect, if any, on the value of the reported standard molarity of the potassium permanganate if the following errors were made? Explain each of your 3 answers.

1.Some drops of water remained in the buret after cleaning but before the permanganate solution was added to the buret.

2.The student neglected to run some permanganate solution through the tip of the buret before taking the initial reading.

3.The student’s lab partner spilled some FAS after weighing it but before titration.

In: Chemistry

The U.S. government has decided to decrease the corporate tax rate from 35% to 20% (for...

The U.S. government has decided to decrease the corporate tax rate from 35% to 20% (for the record, I originally wrote this problem long before this actually happened). You have been tasked with re-estimating the remaining PV of a project’s cash flows. The project will operate for the next 4 years before shutting down. It will produce yearly revenue of $40k with yearly operating costs of $20k. The project utilizes some heavy machinery which has a current book value of $80k and is being depreciated on a straight-line basis by $15k per year for the remainder of the project. (IMPORTANT: This does not mean that you purchase the machine today for $80k. You bought the machine in the past when you started the project). The machinery will have a resell value of $30k at the completion of the project. The firm’s discount rate is 10%.

  1. Show how much each of the project’s OCFs will change on a timeline once the tax rate is decreased.
  2. Compute the after-tax salvage both before and after the tax change.

In: Finance

A political candidate wishes to determine if endorsing increased social spending is likely to decrease her...

A political candidate wishes to determine if endorsing increased social spending is likely to decrease her popularity (α = .05). She has access to data on the popularity of several other candidates who have endorsed increased spending. The data were available both before and after the candidates announced their positions on the issue. The data are as follows:

Popularity rating

Participant

Before

After

1

42

43

2

41

45

3

50

56

4

52

54

5

58

65

6

32

29

7

39

46

8

42

48

Will we need a one- or two-tailed hypothesis test?

State your null hypothesis

State your alternative hypothesis

Provide the SPSS output for your test and identify (circle or highlight) the t-obtained and the p-value

Did you reject or fail to reject the null hypothesis?

What can you conclude?

Calculate the 95 confidence interval for the “Before” mean

Calculate Cohens D

In: Math

E6.14 (LO 5) (Computation of Pension Liability) Nerwin, Inc. is a furniture manufacturing company with 50...

E6.14 (LO 5) (Computation of Pension Liability) Nerwin, Inc. is a furniture manufacturing company with 50 employees. Recently, after a long negotiation with the local labor union, the company decided to initiate a pension plan as a part of its compensation plan. The plan will start on January 1, 2020. Each employee covered by the plan is entitled to a pension payment each year after retirement. As required by accounting standards, the controller of the company needs to report the pension obligation (liability). On the basis of a discussion with the supervisor of the Personnel Department and an actuary from an insurance company, the controller develops the following information related to the pension plan.

Average length of time to retirement 15 years
Expected life duration after retirement 10 years
Total pension payment expected each year after retirement for all employees. Payment made at the end of the year. $700,000 per year

The interest rate to be used is 8%.

Instructions

On the basis of the information above, determine the present value of the pension obligation (liability).

In: Accounting

Determine the pH change when 0.089 mol KOH is added to 1.00 L of a buffer...

Determine the pH change when 0.089 mol KOH is added to 1.00 L of a buffer solution that is 0.343 M in HCN and 0.386 M in CN-. pH after addition − pH before addition = pH change =

In: Chemistry

If your organization is going to apply for a grant, when do you think, if ever,...

If your organization is going to apply for a grant, when do you think, if ever, it would be appropriate to make the application public? What would be the benefits and drawbacks of doing it before the application is submitted? What about after?

In: Finance