Questions
Consider the following program that creates an ArrayList of objects of a type A, and sorst...

Consider the following program that creates an ArrayList of objects of a type A, and sorst them. Supply the missing code. Sample output when you run the program is shown below.

import java.util.*;

class A

{ int i, j, k;

public A(int i, int j, int k){

this.i=i;

this.j=j;

this.k=k;

}

public String toString(){

return "A("+i+","+j+","+k+")";

}

}

class SortA {

public static void main(String[] args){

ArrayList aL=new ArrayList();

Random rand= new Random(1000); //1000 is a seed value

for (int p=0; p<10; p++){

int i = rand.nextInt(100);

int j = rand.nextInt(200);

int k = rand.nextInt(300);

aL.add(new A(i, j, k));

}

System.out.println("----- Original arraylist------");

for (A a: aL){

System.out.println(a);

}

System.out.println("----- Sorting by first integer-------");

/*YOUR CODE - Use anonymous interface types to sort by first integer Field in A, and then print the resulting ArrayList */

System.out.println("----- Sorting by second integer-------");

/*YOUR CODE - Use anonymous interface types to sort by the second integer Field in A, and then print the resulting ArrayList */

System.out.println("----- Sorting by third integer-------"); /*YOUR CODE - Use anonymous interface types to sort by the third integer Field in A, and then print the resulting ArrayList */

} }

Output

----- Original list -------

A(87,135,276)

A(24,192,149)

A(41,45,164)

A(50,179,259)

A(72,183,36)

A(75,46,202)

A(23,41,222)

A(71,189,202)

A(93,142,49)

A(42,35,176)

----- Sorting by first integer-------

A(23,41,222)

A(24,192,149)

A(41,45,164)

A(42,35,176)

A(50,179,259)

A(71,189,202)

A(72,183,36)

A(75,46,202)

A(87,135,276)

A(93,142,49)

----- Sorting by second integer-------

A(42,35,176)

A(23,41,222)

A(41,45,164)

A(75,46,202)

A(87,135,276)

A(93,142,49)

A(50,179,259)

A(72,183,36)

A(71,189,202)

A(24,192,149)

----- Sorting by third integer-------

A(72,183,36)

A(93,142,49)

A(24,192,149)

A(41,45,164)

A(42,35,176)

A(75,46,202)

A(71,189,202)

A(23,41,222)

A(50,179,259)

A(87,135,276)

In: Computer Science

The RAND Health Insurance Experiment found that inpatient and outpatient care were complements. What implications does...

The RAND Health Insurance Experiment found that inpatient and outpatient care were complements. What implications does this have regarding the potential for saving money by increasing coverage for outpatient care?

In: Economics

Learning Outcome: identify and illustrate how the principles of internal control are used to manage and...

Learning Outcome:

  • identify and illustrate how the principles of internal control are used to manage and control a firm's resources and minimize risk.

Ebeneezer Company  

Edward Ebeneezer founded Ebeneezer Company, a rapidly growing start-up business, in 2018. Edward hired a record keeper seven months ago.   The record keeper, Wanda Wonderful, left town after the company’s manager discovered that $65,000 had disappeared over the past five months. An audit disclosed that Wanda had written and signed several checks made payable to her husband, Robbing Ron. Wanda recorded the checks as salaries expense.   Robbing, who cashed the checks but never worked for the company, left town with Wanda. As a result, the Ebeneezer Company incurred an uninsured loss of $65,000.

  1. Evaluate Ebeneezer Company’s internal control system by listing one principle of internal control that appears to have been ignored.
  2. Recommend to Edward how to avoid such a loss in the future with an explanation of the process to mitigate the internal control that was ignored.
  3. This first post must include a minimum of 100 words.

In: Accounting

Consider a 30-year bond that pays semi-annual coupons of $500. The face value of the bond...

Consider a 30-year bond that pays semi-annual coupons of $500. The face value of the bond is $100, 000. If the annual yield rate is 3%, calculate the following:

a) the annual coupon rate of the bond

b) the price of the bond, one period before the first coupon is paid

c) the price of the bond, immediately after the 15th coupon is paid

d) the price of the bond, 2 months after the 30th coupon is paid

*No financial Calculator*

In: Finance

Ann, age 18, lived with her parents Jim and Amy all year. She is married, and...

Ann, age 18, lived with her parents Jim and Amy all year. She is married, and her husband is stationed overseas. Ann’s parents provided more than 50% of her support for the year. Ann and her husband file a joint return. When Jim and Amy file their joint return, they should: a) Not claim Ann as a dependent. b) Claim Ann and her husband as dependents. c) Claim Ann as a dependent since she is under 19 and they provided more than half of her support. d) Claim Ann as a dependent because she is their daughter under age 19.

In: Accounting

Ann, age 18, lived with her parents Jim and Amy all year. She is married, and...

Ann, age 18, lived with her parents Jim and Amy all year. She is married, and her husband is stationed overseas. Ann’s parents provided more than 50% of her support for the year. Ann and her husband file a joint return. When Jim and Amy file their joint return, they should: a) Not claim Ann as a dependent. b) Claim Ann and her husband as dependents. c) Claim Ann as a dependent since she is under 19 and they provided more than half of her support. d) Claim Ann as a dependent because she is their daughter under age 19.

In: Accounting

A.) What is the price of a Treasury STRIPS with a face value of $100 that...

A.) What is the price of a Treasury STRIPS with a face value of $100 that matures in 12 years and has a yield to maturity of 6.5 percent? (Do not round intermediate calculations. Round your answer to 2 decimal places.)

B.)  A Treasury STRIPS is quoted at 93.333 and has 4 years until maturity. What is the yield to maturity? (Do not round intermediate calculations. Enter your answer as a percent rounded to 2 decimal places.)  

In: Finance

The current price of a non-dividend-paying stock is $100 and you expect the stock price to...

The current price of a non-dividend-paying stock is $100 and you expect the stock price to be either $180 or $40 after 0.5 years. A European call option on the stock has a strike price of $121 and expires in 0.5 years. The risk-free rate is 8% (EAR).

Part 1. What is the hedge ratio (delta)?

Part 2. How much money do you need to borrow to create a portfolio that replicates the payoff from one call option?

Part 3.  What should be the price (premium) of the call option?

In: Finance

Initially the price of good Xis $2 and the price of good Yis $1.  Income is $100...

Initially the price of good Xis $2 and the price of good Yis $1.  Income is $100 per unit of time.  Income decreases from $100 per unit of time to $50 per unit of time.  Yis an inferior good.

a.  What happens to the slope of the budget line?

b.  Is there a substitution effect?  If so, how is the utility maximizing quantity of good Xaffected?

c.  What happens to the X-intercept of the budget line?  (Be specific)

d.  What happens to the Y-intercept of the budget line?  (Be specific)

e.  Is there an income effect?  If so, how is the utility maximizing quantity of good Yaffected?

f.  Accounting for both the income and substitution effects, how is the utility maximizing quantity of Xaffected?

In: Economics

The current stock price is $100, the exercise price is $105.1271, the risk-free interest rate is...

The current stock price is $100, the exercise price is $105.1271, the risk-free interest rate is 5

percent (continuously compounded), the volatility is 30 percent, and the time to expiration is

one year (365 days).

a. Using the BSM model, compute the call and put prices for a stock option.

b. In the previous question (3a) you should get the same price for the call and the put, or very

similar (the differences are due to the rounding of the decimal points). Knowing this, explain

why this happens. (HINT: Look at the put-call parity formula).

In: Finance