Questions
in java please Project 2: The Triangle Class Problem Description: Design a class named Triangle that...

in java please

Project 2: The Triangle Class

Problem Description:

Design a class named Triangle that extends GeometricObject. The class contains:

• Three double data fields named side1, side2, and side3 with default values 1.0 to denote three sides of the triangle.

• A no-arg constructor that creates a default triangle.

• A constructor that creates a triangle with the specified side1, side2, and side3.

• The accessor methods for all three data fields.

• A method named getArea() that returns the area of this triangle.

• A method named getPerimeter() that returns the perimeter of this triangle.

• A method named toString() that returns a string description for the triangle.

For the formula to compute the area of a triangle, see Exercise 5.19. The toString() method is implemented as follows:

return "Triangle: side1 = " + side1 + " side2 = " + side2 +   " side3 = " + side3;

Coding: (Copy and Paste Source Code here)

public class TheTriangleClass {

public static void main(String[] args) {

    Triangle triangle = new Triangle(1, 1.5, 1);

    triangle.setColor("yellow");

    triangle.setFilled(true);

    System.out.println(triangle);

    System.out.println("The area is " + triangle.getArea());

    System.out.println("The perimeter is " + triangle.getPerimeter());

    System.out.println(triangle);

}

}

class Triangle extends GeometricObject {

// Implement it (See below for a complete example, the example is for Rectangle)

}

abstract class GeometricObject {
private String color = "white";
private boolean filled;
private java.util.Date dateCreated;

/** Construct a default geometric object */
protected GeometricObject() {
dateCreated = new java.util.Date();
}

/** Construct a geometric object with color and filled value */
protected GeometricObject(String color, boolean filled)
{
dateCreated = new java.util.Date();
this.color = color;
this.filled = filled;
}

/** Return color */
public String getColor()
{
return color;
}

/** Set a new color */
public void setColor(String color)
{
this.color = color;
}

/** Return filled. Since filled is boolean,
29 * the get method is named isFilled */
public boolean isFilled()
{
return filled;
}

/** Set a new filled */
public void setFilled(boolean filled)
{
this.filled = filled;
}

/** Get dateCreated */
public java.util.Date getDateCreated()
{
return dateCreated;
}

@Override
public String toString()
{
return "created on " + dateCreated + "\ncolor: " + color + " and filled: " + filled;
}

/** Abstract method getArea */
public abstract double getArea();

/** Abstract method getPerimeter */
public abstract double getPerimeter();
}


In: Computer Science

Ghost, Inc., has no debt outstanding and a total market value of $369,600. Earnings before interest...

Ghost, Inc., has no debt outstanding and a total market value of $369,600. Earnings before interest and taxes, EBIT, are projected to be $51,000 if economic conditions are normal. If there is strong expansion in the economy, then EBIT will be 15 percent higher. If there is a recession, then EBIT will be 24 percent lower. The company is considering a $185,000 debt issue with an interest rate of 6 percent. The proceeds will be used to repurchase shares of stock. There are currently 8,400 shares outstanding. Ignore taxes for questions a and b. Assume the company has a market-to-book ratio of 1.0 and the stock price remains constant.

a1.

Calculate return on equity (ROE) under each of the three economic scenarios before any debt is issued.

a2. Calculate the percentage changes in ROE when the economy expands or enters a recession.
b1. Assume the firm goes through with the proposed recapitalization. Calculate the return on equity (ROE) under each of the three economic scenarios.
b2. Assume the firm goes through with the proposed recapitalization. Calculate the percentage changes in ROE when the economy expands or enters a recession.
Assume the firm has a tax rate of 24 percent.
c-1. Calculate return on equity (ROE) under each of the three economic scenarios before any debt is issued. (Do not round intermediate calculations and enter your answers as a percent rounded to 2 decimal places, e.g., 32.16.)
c-2. Calculate the percentage changes in ROE when the economy expands or enters a recession. (A negative answer should be indicated by a minus sign. Do not round intermediate calculations and enter your answers as a percent rounded to 2 decimal places, e.g., 32.16.)
c-3. Calculate the return on equity (ROE) under each of the three economic scenarios assuming the firm goes through with the recapitalization. (Do not round intermediate calculations and enter your answers as a percent rounded to 2 decimal places, e.g., 32.16.)
c-4. Given the recapitalization, calculate the percentage changes in ROE when the economy expands or enters a recession. (A negative answer should be indicated by a minus sign. Do not round intermediate calculations and enter your answers as a percent rounded to 2 decimal places, e.g., 32.16.)

In: Finance

Edgerron Company is able to produce two products, G and B, with the same machine in...

Edgerron Company is able to produce two products, G and B, with the same machine in its factory. The following information is available.

Product G Product B
Selling price per unit $ 190 $ 220
Variable costs per unit 80 132
Contribution margin per unit $ 110 $ 88
Machine hours to produce 1 unit 0.4 hours 1.0 hours
Maximum unit sales per month 550 units 200 units

The company presently operates the machine for a single eight-hour shift for 22 working days each month. Management is thinking about operating the machine for two shifts, which will increase its productivity by another eight hours per day for 22 days per month. This change would require $11,000 additional fixed costs per month. (Round hours per unit answers to 1 decimal place. Enter operating losses, if any, as negative values.)

2. How many units of Product G and Product B should the company produce if it continues to operate with only one shift? How much total contribution margin does this mix produce each month?

            Product G        Product B        Total

Hours dedicated to the production of each product                          

Units produced for most profitable sales mix                        

Contribution margin per unit             

Total contribution margin - one shift                        

3. If the company adds another shift, how many units of Product G and Product B should it produce? How much total contribution margin would this mix produce each month?

            Product G        Product B        Total

Hours dedicated to the production of each product                          

Units produced for most profitable sales mix                        

Contribution margin per unit             

Total contribution margin - two shifts                                   

                                   

                                   

                                   

                                   

                                   

4. Suppose that the company determines that it can increase Product G’s maximum sales to 600 units per month by spending $10,000 per month in marketing efforts. Should the company pursue this strategy and the double shift?

            Product G        Product B        Total

Hours dedicated to the production of each product                          

Units produced for most profitable sales mix                        

Contribution margin per unit             

In: Finance

No other data provided 3. The cations on an exchangeable site of a 40 g soil...

No other data provided

3. The cations on an exchangeable site of a 40 g soil were displaced by repeatedly washing by a salt and found to be 40 mg Ca+2, 11.5 mg Na+1, 39 mg K+1, 12 mg Mg+2, and 9 mg Al+3. The pH of the soil was 5.0. Calculate the CEC (cmolc/kg), percentage base saturation (PBS) and percent acidic saturation (PAC) per kg of the soil.

4. A give soil has a CEC of 12.50 cmol of charge per kg of soil. If 70%, 15%, 10% and 5% of the CECis occupied by Ca+2, K+1, Mg and Na+1 , respectively, calculate the weight (grams) of Ca, K, Mg and Na in the soil.

5. A given soil contains the following colloids: 1.0% humus (CEC=200), 30% kaolinite (CEC=5), 5%smectite (montmorillonite) (CEC=80), 10% illite (CEC=20), 5% mica (CEC=70) and 49% sesquioxides (CEC=2). Calculate the CEC of the soil? Which colloids contributed the most and which contributed the least? (All CEC are in molc/kg soil).

6. Calculate the amount of pure CaCO3that could theoretically neutralize the H+ in one-year acid rain if a 1-hectare (ha) site received 200 mm of rain per year and the average pH of the rain was 5.0.

7. Calculate the pH and pOH of a soil with the following H+ concentrations: (a) 0.0000001M (b) 0.00001M (c) 0.005M? Which soil is relatively most acidic? Most basic?

8. Determine the calcium carbonate equivalent (CCE) of the following compounds: (amount that has the same neutralizing value as 100 g pure CaCO3) (a) KOH (b) Mg(OH)2 (c) and CaMg(CO3)2.

9. How many grams of limestone with a CaCO3 equivalent of 100% would you need to apply to an acidic soil with 85% exchangeable Al saturation to reduce it to 10%? The CEC of the soil is 12.5cmolc/kg.

10. How many grams of gypsum (CaSO4.2H2O) would you need to reclaim a sodic soil with an exchangeable sodium percentage (ESP) of 80% to reduce to it to 50%? The CEC of the soil is 12.5cmolc/kg.

In: Chemistry

You have just started a new job and your employer has enrolled you in KiwiSaver. This...

You have just started a new job and your employer has enrolled you in KiwiSaver.

This is the first time you have been enrolled in KiwiSaver and you decide not to “opt out”.

You are interested in estimating how much your KiwiSaver fund could be worth when you retire.

You make the following assumptions:

• You have just turned 30 and will retire in exactly 35 years when you are 65.

• Your salary is $50,000 this year and you expect this to increase by 3% every year.

• You can choose to contribute either 3% or 8% of your salary into your KiwiSaver fund each year. https://www.kiwisaver.govt.nz/already/contributions/you/amount/

• Your employer must contribute 3% of your pay into your KiwiSaver fund each year. https://www.kiwisaver.govt.nz/already/contributions/employers/ You can ignore any tax implications and assume your account receives the full 3%. (KIWI SAVER ACC)

• You will be entitled to the annual member tax credit of $521.43 which will be credited into your KiwiSaver fund at the end of every year. https://www.kiwisaver.govt.nz/new/benefits/mtc/

• Your KiwiSaver fund will invest in a diversified portfolio of assets to earn a return on your investment. Of course, there is uncertainty around the actual annual rate of return that your fund will earn over the 35 years but you decide that 6% and 12% represent a good range of potential rates of return to conduct your analysis on.

• Regardless of the return earned, the manager of your KiwiSaver fund will charge a management fee of 1.0% at the end of each year, based on the opening balance of your fund each year.

• You will make no withdrawals or additional contributions (other than those mentioned above) to your fund until you retire in 35 years.

• For simplicity, assume that all contributions to your KiwiSaver fund are made once per year, at the end of the year. The first lot of contributions will be made in one year from today.

Construct a spreadsheet that will allow you to answer the following questions on Canvas.

How much will be in your KiwiSaver account when you retire if you contributed 8% of your salary and the fund earned 12%p.a.?

Options:

$2,942,716

$2,361,383

$1,088,765

$897,665

$1,875,698

$2,225,775

In: Finance

You have just started a new job and your employer has enrolled you in KiwiSaver. This...

You have just started a new job and your employer has enrolled you in KiwiSaver.

This is the first time you have been enrolled in KiwiSaver and you decide not to “opt out”.

You are interested in estimating how much your KiwiSaver fund could be worth when you retire.

You make the following assumptions:

• You have just turned 30 and will retire in exactly 35 years when you are 65.

• Your salary is $50,000 this year and you expect this to increase by 3% every year.

• You can choose to contribute either 3% or 8% of your salary into your KiwiSaver fund each year. https://www.kiwisaver.govt.nz/already/contributions/you/amount/

• Your employer must contribute 3% of your pay into your KiwiSaver fund each year. https://www.kiwisaver.govt.nz/already/contributions/employers/ You can ignore any tax implications and assume your account receives the full 3%. (KIWI SAVER ACC)

• You will be entitled to the annual member tax credit of $521.43 which will be credited into your KiwiSaver fund at the end of every year. https://www.kiwisaver.govt.nz/new/benefits/mtc/

• Your KiwiSaver fund will invest in a diversified portfolio of assets to earn a return on your investment. Of course, there is uncertainty around the actual annual rate of return that your fund will earn over the 35 years but you decide that 6% and 12% represent a good range of potential rates of return to conduct your analysis on.

• Regardless of the return earned, the manager of your KiwiSaver fund will charge a management fee of 1.0% at the end of each year, based on the opening balance of your fund each year.

• You will make no withdrawals or additional contributions (other than those mentioned above) to your fund until you retire in 35 years.

• For simplicity, assume that all contributions to your KiwiSaver fund are made once per year, at the end of the year. The first lot of contributions will be made in one year from today.

Construct a spreadsheet that will allow you to answer the following questions on Canvas.

How much will be in your KiwiSaver account when you retire if you contributed 3% of your salary and the fund earned 6%p.a.?

Options:

$484,003

452,419

$595,113

$395,485

$500,000

$475,375

In: Finance

Consider the following information on Huntington Power Co. Debt: 4,000, 7% semiannual coupon bonds outstanding, $1,000...

Consider the following information on Huntington Power Co.

Debt: 4,000, 7% semiannual coupon bonds outstanding, $1,000 par value, 18 years to maturity, selling for 102 percent of par; the bonds make semiannual payments.

Preferred Stock: 10,000 outstanding with par value of $100 and a market value of 105 and $10 annual dividend.

Common Stock: 84,000 shares outstanding, selling for $56 per share, the beta is 2.08

The market risk premium is 5.5%, the risk free rate is 3.5% and Huntington’s tax rate is 32%.

Huntington Power Co. is evaluating two mutually exclusive project that is somewhat riskier than the usual project the firm undertakes; management uses the subjective approach and decided to apply an adjustment factor of +2.1% to the cost of capital for both projects.

Project A is a five-year project that requires an initial fixed asset investment of $2.4 million. The fixed asset falls into the five-year MACRS class. The project is estimated to generate $2,050,000 in annual sales, with costs of $950,000. The project requires an initial investment in net working capital of $285,000 and the fixed asset will have a market value of $225,000 at the end of five years when the project is terminated.

Project B requires an initial fixed asset investment of $1.0 million. The marketing department predicts that sales related to the project will be $920,000 per year for the next five years, after which the market will cease to exist. The machine will be depreciated down to zero over four-year using the straight-line method (depreciable life 4 years while economic life 5 years). Cost of goods sold and operating expenses related to the project are predicted to be 25 percent of sales. The project will also require an addition to net working capital of $150,000 immediately. The asset is expected to have a market value of $120,000 at the end of five years when the project is terminated.

Use the following rates for 5-year MACRS: 20%, 32%, 19.2%, 11.52%, 11.52%, and 5.76%

Please show your work.

  1. What is the appropriate discount rate for project A and project B (Risk adjusted rate)?
  1. Calculate project A’s cash flows for years 0-5

In: Finance

In a recent year, according to the Bureau of Labor Statistics, the median number of years...

In a recent year, according to the Bureau of Labor Statistics, the median number of years that wage and salary workers had been with their current employer (called employee tenure) was 3.5 years. Information on employee tenure has been gathered since the early 1950's using the Current Population Survey (CPS), a monthly survey of 50,000 households that provides information on employment, unemployment, earnings, demographics, and other characteristics of the U. S. population. With respect to employee tenure, the questions measure how long workers had been with their current employer, not how long they plan to stary with their employer.

Employee Tenure of 20 workers


4.1, 2.3, 3.5, 4.6, 3.1, 1.2, 3.9, 2.1, 1.0, 4.5, 3.2, 3.4, 4.1, 3.1, 2.8, 1.4, 3.4, 4.9, 5.7, 2.6

A) A congressional representative claims that the median tenure for workers from the representative's district is less than the national median tenure of 3.5 years. Thae claim is based on the representative's data shown above. Assume that the employees were randomly selected.

1) How would you test the representative's claim?

2) Can you use a parametric test, or do you need a nonparametric test? Why?

3) State the null and alternative hypothesis.

4) Test the claim using alpha = 0.05. What can you conclude? Show your work, the process that you used, and the result.

Employee tenure for a sample of male workers


3.3, 3.9, 4.1, 3.3, 4.4, 3.3, 3.1, 4.1, 2.7, 4.9, 0.9, 4.6

Employee tenure for a sample of female workers


3.7, 4.2, 2.7, 3.6, 3.3, 1.1, 4.4, 4.4, 2.6, 1.5, 4.5, 2.0

B) A congressional representative claims that the median tenure for male workers is greater that the median tenure for female workers. The claim is based on the data shown above.

5) How would you est the representative's claim?

6) Can you use a parametric test, or do you need to use a nonparametric test?

7) State the null hypothesis and the alternative hypothesis.

8) Test the claim using alpha = 0.05. What can you conclude. Show your work, the process that you used, and the result.

In: Math

This was my prompt, and I'm not quire sure what to do. 1. Circle: Implement a...

This was my prompt, and I'm not quire sure what to do.

1. Circle:

Implement a Java class with the name Circle. It should be in the package edu.gcccd.csis.

The class has two private instance variables: radius (of the type double) and color (of the type String).

The class also has a private static variable: numOfCircles (of the type long) which at all times will keep track of the number of Circle objects that were instantiated.

Construction:

A constructor that constructs a circle with the given color and sets the radius to a default value of 1.0.

A constructor that constructs a circle with the given, radius and color.

Once constructed, the value of the radius must be immutable (cannot be allowed to be modified)

Behaviors:

Accessor and Mutator aka Getter and Setter for the color attribute

Accessor for the radius.

getArea() and getCircumference() methods, hat return the area and circumference of this Circle in double.

Hint: use Math.PI (https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#PI (Links to an external site.))

2. Rectangle:

Implement a Java class with the name Rectangle. It should be in the package edu.gcccd.csis.

The class has two private instance variables: width and height (of the type double)

The class also has a private static variable: numOfRectangles (of the type long) which at all times will keep track of the number of Rectangle objects that were instantiated.

Construction:

A constructor that constructs a Rectangle with the given width and height.

A default constructor.

Behaviors:

Accessor and Mutator aka Getter and Setter for both member variables.

getArea() and getCircumference() methods, that return the area and circumference of this Rectangle in double.

a boolean method isSquare(), that returns true is this Rectangle is a square.

Hint: read the first 10 pages of Chapter 5 in your text.

3. Container

Implement a Java class with the name Container. It should be in the package edu.gcccd.csis.

The class has two private instance variables: rectangle of type Rectangle and circle of type Circle.

Construction:

No explicit constructors.

Behaviors:

Accessor and Mutator aka Getter and Setter for both member variables.

an integer method size(), that returns 0, if all member variables are null, 1 either of the two member variables contains a value other than null, and 2, if both, the rectangle and circle contain values other than null.

In: Computer Science

Pargo Company is preparing its budgeted income statement for 2017. Relevant data pertaining to its sales,...

Pargo Company is preparing its budgeted income statement for 2017. Relevant data pertaining to its sales, production, and direct materials budgets are as follows.

Sales. Sales for the year are expected to total  1,100,000 units. Quarterly sales are  22%,  24%,  25%, and  29%, respectively. The sales price is expected to be $ 41 per unit for the first three quarters and $ 47 per unit beginning in the fourth quarter. Sales in the first quarter of 2018 are expected to be  15% higher than the budgeted sales for the first quarter of 2017.

Production. Management desires to maintain the ending finished goods inventories at  20% of the next quarter’s budgeted sales volume.

Direct materials. Each unit requires  2 pounds of raw materials at a cost of $ 9 per pound. Management desires to maintain raw materials inventories at  10% of the next quarter’s production requirements. Assume the production requirements for first quarter of 2018 are  510,000 pounds.

Pargo budgets  0.3 hours of direct labor per unit, labor costs at $ 11 per hour, and manufacturing overhead at $ 17 per direct labor hour. Its budgeted selling and administrative expenses for 2017 are $ 6,558,000.

Calculate the budgeted total unit cost. (Round answer to 2 decimal places, e.g. 12.25.)

Total unit cost

$

Prepare the budgeted multiple-step income statement for 2017. (Ignore income taxes.)

PARGO COMPANY
Budgeted Income Statement
  For the Year Ending December 31, 2017December 31, 2017For the Quarter Ending December 31, 2017

  Beginning InventoryCost of Goods SoldEnding InventoryGross ProfitIncome Before Income TaxesIncome from OperationsIncome Tax ExpenseNet Income / (Loss)Operating ExpensesPurchasesSalesSelling and Administrative ExpensesTotal Operating Expenses

$

  Beginning InventoryCost of Goods SoldEnding InventoryGross ProfitIncome Before Income TaxesIncome from OperationsIncome Tax ExpenseNet Income / (Loss)Operating ExpensesPurchasesSalesSelling and Administrative ExpensesTotal Operating Expenses

  Beginning InventoryCost of Goods SoldEnding InventoryGross ProfitIncome Before Income TaxesIncome from OperationsIncome Tax ExpenseNet Income / (Loss)Operating ExpensesPurchasesSalesSelling and Administrative ExpensesTotal Operating Expenses

  Beginning InventoryCost of Goods SoldEnding InventoryGross ProfitIncome Before Income TaxesIncome from OperationsIncome Tax ExpenseNet Income / (Loss)Operating ExpensesPurchasesSalesSelling and Administrative ExpensesTotal Operating Expenses

  Beginning InventoryCost of Goods SoldEnding InventoryGross ProfitIncome Before Income TaxesIncome from OperationsIncome Tax ExpenseNet Income / (Loss)Operating ExpensesPurchasesSalesSelling and Administrative ExpensesTotal Operating Expenses

$

In: Accounting