C++
9.12: Element Shifter Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument array should be copied to element 1 of the new array, element 1 of the argument array should be copied to element 2 of the new array, and so forth. The function should return a pointer to the new array. Demonstrate the function by using it in a main program that reads an integer N (that is not more than 50) from standard input and then reads N integers from a file named data into an array. The program then passes the array to your element shifter function, and prints the values of the new expanded and shifted array on standard output, one value per line. You may assume that the file data has at least N values. Prompts And Output Labels. There are no prompts for the integer and no labels for the reversed array that is printed out. Input Validation. If the integer read in from standard input exceeds 50 or is less than 0 the program terminates silently.
In: Computer Science
Suppose you need to decide whether to keep a machine or replace it with a new one:
Old machine: The old machine can operate for 5 years with operating cost of $120,000 per year.
New machine: Replacing the old machine with a new one requires a capital cost of $250,000 in year zero (assume that there is zero salvage value for old machine). The capital cost is depreciable from year 0 to year 5 (over six years) based on MACRS 5-year life depreciation with the half year convention (table A-1 at IRS). The new machine has a lower operating cost of $45,000 per year for 5 years (from year 1 to year 5).
Assume both machines produce similar good with similar value that yields similar revenue.
Consider income tax of 35% and a discount rate of 10% annually. In present discounted value terms, how much will you save by replacing the old machine with the new machine?
(Note: What you are being asked to do here is to conduct incremental NPV analysis on the new machine versus the old machine, NPVnew machine - old machine.)
In: Finance
Proposal #1 would extend trade credit to some customers that previously have been denied credit because they were considered poor risks. Sales are projected to increase by $150,000 per year if credit is extended to these new customers. Of the new accounts receivable generated, 7% are projected to be uncollectible. Additional collection costs are projected to be 3% of incremental sales (whether they actually end up collected or not), and production and selling costs are projected to be 80% of sales. Your firm expects to pay a total of 40% of its income after expenses in taxes.
1)Compute the incremental income after taxes that would result from these projections:
2)Compute the incremental Return on Sales if these new credit customers are accepted:
If the receivable turnover ratio is expected to be 3 to 1 and no other asset buildup is needed to serve the new customers…
3)Compute the additional investment in
Accounts Receivable
4)Compute the incremental Return on New Investment
5)If your company requires a 20% Rate of Return on Investment for all proposals, do the numbers suggest that trade credit should be extended to these new customers? Explain.
In: Accounting
Corriedale Ltd plan to introduce a new line of organically produced wool for textile production. The new wool will generate incremental revenues of $57,000 per year for 8 years. The incremental operating costs of producing the wool are projected to be $20,000 per year. As a result of the new type of wool, demand for Corriedale’s other products will decrease significantly. Corriedale estimate that EBITDA from other product lines will fall by $10,000 per year as customers switch to the organic wool. The initial capital expenditure to purchase wool processing equipment will be $70,000. Producing and distributing the new wool will increase the working capital requirements of the business by $4,000 for the life of the project. This investment in working capital will be fully recovered when the new wool is discontinued in 8 years. For tax purposes, the wool processing equipment can be depreciated on a straight-line basis to zero over 8 years. Corriedale expect that at the end of the 8 years the scrap value of the equipment will be $12,000. Corriedale face a corporate tax rate of 30%. Compute the net incremental cash flow for the new organic wool for its final year (only the final year is required).
In: Finance
Java Code Question:
The program is supposed to read a file and then do a little
formatting and produce a new txt file. I have that functionality
down.
My problem is that I also need to get my program to correctly identify if a file is empty, but so far I've been unable to. Here is my program in full:
import java.io.*;
import java.util.Scanner;
public class H1_43 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter java file: ");
String fileName = scanner.nextLine();
if (fileName.isEmpty()) {
System.out.println("This is an empty file");
} else {
try {
Scanner fileReader = new Scanner(new File(fileName));
PrintWriter printWriter = new PrintWriter(new FileWriter(fileName + ".txt"));
int lineNumber = 1;
while (fileReader.hasNextLine()) {
String line = fileReader.nextLine();
printWriter.printf("[%03d]", lineNumber++);
printWriter.println(line);
printWriter.flush();
}
fileReader.close();
printWriter.close();
} catch (FileNotFoundException e) {
System.out.println("Error: Unable to open/read data from file: " + fileName);
System.exit(0);
} catch (IOException e) {
System.out.println("Error: Unable to open/write data to file: " + fileName);
System.exit(0);
}
System.out.println("File generated successfully.");
}
}
}
In: Computer Science
I am working on these study questions and am having trouble understanding how it all works together. Any help would be greatly appreciated!!
An all equity firm is expected to generate perpetual EBIT of $50 million per year forever. The corporate tax rate is 0% in a fantasy no tax world. The firm has an unlevered (asset or EV) Beta of 1.0. The risk-free rate is 5% and the market risk premium is 6%. The number of outstanding shares is 10 million.
1. Calculate the existing WACC of this all equity or unlevered
firm. Calculate the total value of
this all equity firm and the existing share price.
2. The firm decides to replace part of the equity financing with
perpetual debt. The firm issues
$100 million of permanent debt at the riskless interest rate of 5%, and repurchases $100 million of equity.
A. Find the new value of the levered firm.
B. Find the new number of shares outstanding, and the new share
price.
3. Calculate the new equity Beta, new cost of equity, and new WACC
following this capital
structure change. Assume a debt beta of zero.
In: Finance
You need to make an AngryBear class.(In java)
The AngryBear class must have 2 instance variables.
The first instance variable will store the days the bear has been awake.
The second instance variable will store the number of teeth for the bear.
The AngryBear class will have 1 constructor that takes in values for days awake and number of teeth.
The AngryBear class will have one method isAngry();
An AngryBear is angry if it has been awake for more than 3 days and has less than 10 teeth or has no teeth or has been awake for more than 5 days.
Otherwise, the AngryBear is not really angry but he could be quite annoyed.
to test this code use
public void run() {
AngryBear a = new AngryBear( 10, 3 );
System.out.println( a.isAngry() ); //prints true
AngryBear b = new AngryBear( 10, 35 );
System.out.println( b.isAngry() );
AngryBear c = new AngryBear( 1, 25 );
System.out.println( c.isAngry() );
AngryBear d = new AngryBear( 6, 40 );
System.out.println( d.isAngry() );
AngryBear e = new AngryBear( 1, 1 );
System.out.println( e.isAngry() );
AngryBear f = new AngryBear( 111, 111 );
System.out.println( f.isAngry() );
}
In: Computer Science
Consider the case of Newcastle Coal Company:
Newcastle Coal Company is considering a project that requires an investment in new equipment of $4,410,000. Under the new tax law, the equipment is eligible for 100% bonus depreciation at t = 0 so the equipment will be fully depreciated at the time of purchase. Newcastle estimates that its accounts receivable and inventories need to increase by $840,000 to support the new project, some of which is financed by a $336,000 increase in spontaneous liabilities (accounts payable and accruals). The company's tax rate is 25%.
1) The after-tax cost of Newcastle’s new equipment is
A. $3,307,500
B. $840,000
C.$3,811,500
2) Newcastle’s initial net investment outlay is .
A. $3,811,500
B. $3,601,500
C. $3,475,500
Suppose Newcastle’s new equipment is expected to sell for $1,200,000 at the end of its four-year useful life, and at the same time, the firm expects to recover all of its net operating working capital (NOWC) investment. Remember, that under the new tax law, this equipment was fully depreciated at t = 0. If the firm’s tax rate is 25%, what is the project’s total termination cash flow?
A. $804,000
B. $900,000
C. $1,404,000
D. $1,200,000
In: Finance
Element Shifter: Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is one element larger than the argument array. The first element of the new array should be set to 0. Element 0 of the argument array should be copied to element 1 of the new array, element 1 of the argument array should be copied to element 2 of the new array, and so forth. The function should return a pointer to the new array. Demonstrate the function by using it in a main program that reads an integer N (that is not more than 50) from standard input and then reads N integers from a file named data into an array. The program then passes the array to your element shifter function, and prints the values of the new expanded and shifted array on standard output, one value per line. You may assume that the file data has at least N values. Prompts And Output Labels. There are no prompts for the integer and no labels for the reversed array that is printed out. Input Validation. If the integer read in from standard input exceeds 50 or is less than 0 the program terminates silently.
In: Computer Science
In: Finance