Questions
You must evaluate a proposal to buy a new milling machine. The base price is $138,000,...

You must evaluate a proposal to buy a new milling machine. The base price is $138,000, and shipping and installation costs would add another $10,000. The machine falls into the MACRS 3-year class, and it would be sold after 3 years for $82,800. The applicable depreciation rates are 33%, 45%, 15%, and 7%. The machine would require a $9,500 increase in net operating working capital (increased inventory less increased accounts payable). There would be no effect on revenues, but pretax labor costs would decline by $56,000 per year. The marginal tax rate is 35%, and the WACC is 12%. Also, the firm spent $5,000 last year investigating the feasibility of using the machine.

  1. How should the $5,000 spent last year be handled?
    1. Last year's expenditure is considered as a sunk cost and does not represent an incremental cash flow. Hence, it should not be included in the analysis.
    2. The cost of research is an incremental cash flow and should be included in the analysis.
    3. Only the tax effect of the research expenses should be included in the analysis.
    4. Last year's expenditure should be treated as a terminal cash flow and dealt with at the end of the project's life. Hence, it should not be included in the initial investment outlay.
    5. Last year's expenditure is considered as an opportunity cost and does not represent an incremental cash flow. Hence, it should not be included in the analysis.
  2. What is the initial investment outlay for the machine for capital budgeting purposes, that is, what is the Year 0 project cash flow? Round your answer to the nearest cent.
    $

  3. What are the project's annual cash flows during Years 1, 2, and 3? Round your answer to the nearest cent. Do not round your intermediate calculations.

    Year 1 $

    Year 2 $

    Year 3 $

  4. Should the machine be purchased?

In: Finance

Transport plays an essential role in the supply chain and when managed properly can allow supply...

Transport plays an essential role in the supply chain and when managed properly can allow supply chains to work more efficiently and effectively. Determine the modal split for freight in South Africa. Provide reasons for the choice of the mode with the highest split.

In: Operations Management

I have been working on this assignment in Java programming and can not get it to...

I have been working on this assignment in Java programming and can not get it to work.

This method attempts to DECODES an ENCODED string without the key.
  
public static void breakCodeCipher(String plainText){
char input[]plainText.toCharArray();
for(int j=0; j<25; j++){
for(int i=0; i<input.length; i++)
if(input[i]>='a' && input[i]<='Z')
input[i]=(char)('a'+((input[i]-'a')+25)%26);
else if(input[i]>='A'&& input[i]<='Z')
input[i]=(char)('A'+ ((input[i]-'A')+25)%26);
}
System.out.println(plainText)
  
}

In: Computer Science

Task 3. Falling distance When an object is falling because of gravity, the following formula can...

Task 3. Falling distance

When an object is falling because of gravity, the following formula can be used to determine

the distance the object falls in a specific time period:

d=(1/2)gt2

The variables in the formula are as follows: d is the distance in meters, g is 9.8, and t is the

amount of time, in seconds, that the object has been falling.

3.1.     Create a method: FallingDistance

Parameters:           t, object’s falling time (in seconds). t may or may not be an integer value!

Return value:         the distance, in meters, that the object has fallen during that time interval

Calculations:          Use Math.Pow() to calculated the square in the formula

3.2.     Demonstrate the method by calling it from a loop that passes the values 1 through 20 as arguments, and displays each returned value.

** JAVA PROGRAM **

In: Computer Science

Display the shortest words in a sentence in JAVA Write a method that displays all the...

Display the shortest words in a sentence in JAVA

Write a method that displays all the shortest words in a given sentence. You are not allowed to use array

In the main method, ask the user to enter a sentence and call the method above to display all the shortest words in a given sentence.

You must design the algorithms for both the programmer-defined method and the main method.

In: Computer Science

Leave comments on code describing what does what Objectives: 1. To introduce pointer variables and their...

Leave comments on code describing what does what

Objectives:

1. To introduce pointer variables and their relationship with arrays

2. To introduce the dereferencing operator

3. To introduce the concept of dynamic memory allocation

A distinction must always be made between a memory location’s address and the data stored at that location. In this lab, we will look at addresses of variables and at special variables, called pointers, which hold these addresses.

The address of a variable is given by preceding the variable name with the C++ address operator (&). The & operator in front of the variable sum indicates that the address itself, and not the data stored in that location.

cout << &sum; // This outputs the address of the variable sum

To define a variable to be a pointer, we precede it with an asterisk (*). The asterisk in front of the variable indicates that ptr holds the address of a memory location.

int *ptr;

The int indicates that the memory location that ptr points to holds integer values. ptr is NOT an integer data type, but rather a pointer that holds the address of a location where an integer value is stored.

Explain the difference between the following two statements:

  

int sum; // ____________________________

int *sumPtr; // ___________________________

Using the symbols * and &:

  1. The & symbol is basically used on two occasions.

  • reference variable : The memory address of the parameter is sent to the function instead of the value at that address.

  • address of a variable

void swap (int &first, int &second) // The & indicates that the parameters

{ // first and second are being passed by reference.

int temp;

temp = first; // Since first is a reference variable,

// the compiler retrieves the value

// stored there and places it in temp.

first = second // New values are written directly into

second = temp; // the memory locations of first and second.

}

   

2) The * symbol is used on

  • define pointer variables:

  • the contents of the memory location

int *ptr;



Experiment 1

Step 1:

Complete this program by filling in the code (places in bold). Note: use only pointer variables when instructed to by the comments in bold. This program is to test your knowledge of pointer variables and the & and * symbols.

Step 2:

Run the program with the following data: 10 15. Record the output here .

// This program demonstrates the use of pointer variables

// It finds the area of a rectangle given length and width

// It prints the length and width in ascending order

#include <iostream>

using namespace std;

int main()

{

int length; // holds length

int width; // holds width

int area; // holds area

int *lengthPtr; // int pointer which will be set to point to length

int *widthPtr; // int pointer which will be set to point to width

  cout << "Please input the length of the rectangle" << endl;

cin >> length;

cout << "Please input the width of the rectangle" << endl;

cin >> width;

// Fill in code to make lengthPtr point to length (hold its address)

// Fill in code to make widthPtr point to width (hold its address)

area = // Fill in code to find the area by using only the pointer variables

cout << "The area is " << area << endl;

if (// Fill in the condition length > width by using only the pointer variables)

cout << "The length is greater than the width" << endl;

else if (// Fill in the condition of width > length by using only the pointer

// variables)

cout << "The width is greater than the length" << endl;

else

cout << "The width and length are the same" << endl;

return 0;

}




Experiment 2: Dynamic Memory

Step 1:

Complete the program by filling in the code. (Areas in bold) This problem requires that you study very carefully. The code has already written to prepare you to complete the program.

Step 2:

In inputting and outputting the name, you were asked NOT to use a bracketed subscript. Why is a bracketed subscript unnecessary? Would using name [pos] work for inputting the name? Why or why not? Would using name [pos] work for outputting the name? Why or why not?

Try them both and see.

// This program demonstrates the use of dynamic variables

#include <iostream>

using namespace std;

const int MAXNAME = 10;

int main()

{

int pos;

char * name;

int * one;

int * two;

int * three;

int result;

// Fill in code to allocate the integer variable one here

// Fill in code to allocate the integer variable two here

// Fill in code to allocate the integer variable three here

// Fill in code to allocate the character array pointed to by name

cout << "Enter your last name with exactly 10 characters." << endl;

cout << "If your name has < 10 characters, repeat last letter. " << endl

<< "Blanks at the end do not count." << endl;

for (pos = 0; pos < MAXNAME; pos++)

cin >> // Fill in code to read a character into the name array // WITHOUT USING a bracketed subscript

cout << "Hi ";

for (pos = 0; pos < MAXNAME; pos++)

cout << // Fill in code to a print a character from the name array // WITHOUT USING a bracketed subscript

cout << endl << "Enter three integer numbers separated by blanks" << endl;

// Fill in code to input three numbers and store them in the

// dynamic variables pointed to by pointers one, two, and three.

// You are working only with pointer variables

//echo print

cout << "The three numbers are " << endl;

// Fill in code to output those numbers

result = // Fill in code to calculate the sum of the three numbers

cout << "The sum of the three values is " << result << endl;

// Fill in code to deallocate one, two, three and name

return 0;

}

Sample Run:

Enter your last name with exactly 10 characters.

If your name < 10 characters, repeat last letter. Blanks do not count.

DeFinooooo

Hi DeFinooooo

Enter three integer numbers separated by blanks

5 6 7

The three numbers are 5 6 7

The sum of the three values is 18




Experiment 3: Dynamic Arrays

Question: Fill in the code as indicated by the comments in bold.

// This program demonstrates the use of dynamic arrays

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

float *monthSales; // a pointer used to point to an array

// holding monthly sales

float total = 0; // total of all sales

float average; // average of monthly sales

int numOfSales; // number of sales to be processed

int count; // loop counter

cout << fixed << showpoint << setprecision(2);

cout << "How many monthly sales will be processed? ";

cin >> numOfSales;

// Fill in the code to allocate memory for the array pointed to by

// monthSales.

if ( // Fill in the condition to determine if memory has been

// allocated (or eliminate this if construct if your instructor

// tells you it is not needed for your compiler)

)

{

cout << "Error allocating memory!\n";

return 1;

}

cout << "Enter the sales below\n";

for (count = 0; count < numOfSales; count++)

{

cout << "Sales for Month number "

<< // Fill in code to show the number of the month

<< ":";

// Fill in code to bring sales into an element of the array

}

for (count = 0; count < numOfSales; count++)

{

total = total + monthSales[count];

}

average = // Fill in code to find the average

cout << "Average Monthly sale is $" << average << endl;

// Fill in the code to deallocate memory assigned to the array.

return 0;

}

Sample Run:

How many monthly sales will be processed 3

Enter the sales below

Sales for Month number 1: 401.25

Sales for Month number 2: 352.89

Sales for Month number 3: 375.05

Average Monthly sale is $376.40

In: Computer Science

You must evaluate the purchase of a proposed spectrometer for the R&D department. The base price...

You must evaluate the purchase of a proposed spectrometer for the R&D department. The base price is $300,000, and it would cost another $60,000 to modify the equipment for special use by the firm. The equipment falls into the MACRS 3-year class and would be sold after 3 years for $150,000. The applicable depreciation rates are 33%, 45%, 15%, and 7%. The equipment would require a $10,000 increase in net operating working capital (spare parts inventory). The project would have no effect on revenues, but it should save the firm $60,000 per year in before-tax labor costs. The firm's marginal federal-plus-state tax rate is 40%.

  1. What is the initial investment outlay for the spectrometer, that is, what is the Year 0 project cash flow? Round your answer to the nearest cent. Negative amount should be indicated by a minus sign.
    $
  2. What are the project's annual cash flows in Years 1, 2, and 3? Round your answers to the nearest cent.

    In Year 1 $

    In Year 2 $

    In Year 3 $

  3. If the WACC is 14%, should the spectrometer be purchased?

In: Finance

Thoroughly answer the following questions: What is the difference between prevalence and incidence? Provide an example...

Thoroughly answer the following questions:

What is the difference between prevalence and incidence? Provide an example of each. Do not provide the definitions, explain in your own words.

In: Math

JAVA!!!! int[][] BingoCardArray = new int[5][5]; Use a nested for-loop, to populate the 2-D array representing...

JAVA!!!!

int[][] BingoCardArray = new int[5][5];

Use a nested for-loop, to populate the 2-D array representing 5 columns for B – I – N – G – O, where
row 1 =
        col 1 = random # 1- 15
        col 2 = random # 16 – 30
        col 3 = random # 31 – 45
        col 4 = random # 46 – 60
        col 5 = random # 61 – 75

row 2 =
        col 1 = random # 1- 15
        col 2 = random # 16 – 30
        col 3 = random # 31 – 45
        col 4 = random # 46 – 60
        col 5 = random # 61 - 75

row 3 =
        col 1 = random # 1- 15
        col 2 = random # 16 – 30
        col 3 = random # 31 – 45
        col 4 = random # 46 – 60
        col 5 = random # 61 – 75

row 4 =
        col 1 = random # 1- 15
        col 2 = random # 16 – 30
        col 3 = random # 31 – 45
        col 4 = random # 46 – 60
        col 5 = random # 61 - 75

row 5 =
        col 1 = random # 1- 15
        col 2 = random # 16 – 30
        col 3 = random # 31 – 45
        col 4 = random # 46 – 60
        col 5 = random # 61 – 75


The playGame()method in the BingoGame (Driver) class will loop to generate 50 random numbers in the range of 1 to 75.  This simulates drawing 50 numbers in a BINGO game.  The method will pass the number to a method, checkBingo()in the domain class, BingoCard, which will check if the number received as a parameter is in the B range (1 – 15), I range (16 – 30), N range (31 – 45), G range (46 -60) or O range (61 – 75).  According to the range it is in, the method will check each of the cells in designated column (col 0 = B; col 1 = I; col 2 = N; col 3 = G; col 4 = O).  Example: randomNum 27 was randomly generated, which belongs to the I-range, column 1, checking rows 0 to 4.

for (int row = 0; row <= 4; row++)
{  
     //hard-code column 1 since checking I-column:
    if (randomNum == BingoCardArray[row][1])

    {
             BingoCardArray[row][1] = 0;
    }
}

etc.    //the 0 being moved to the number simulates putting a chip on the Bingo card, marking that the
          // number was called.

The gotBingo()method in the Bingo (Domain) class will return TRUE if 5 numbers were set to 0 either horizontally, vertically, or diagonally.  Otherwise, the method will return FALSE.

Each horizontal checkis a set of if-else if statements

for (int row = 0; row < 5; row++)
{
     int rowTotal = 0;

     for (int col = 0; col < 5; col++)
    {

           //add up all the column values in that row, and see if they add up to 0.

           ….

     }

}

Each vertical checkis a set of if-else if statements

for (int col = 0; col  < 5; col++)
{
     int colTotal = 0;

     for (int row = 0; row < 5; row++)
    {

           //add up all the row values in that column, and see if they add up to 0.

           ….

     }

}

//for diagonals check….
for (int row = 0; row < 5; row++)
{
     int diagonal1Total = 0;

     int diagonal2Total = 0;

     for (int col = 0; col < 5; col++)
    {

           //figure out if it is a diagonal going one way

           //figure out if it is a diagonal going the other way

           ….

     }

}

When gotBingo()ends, it will have either returned a TRUE or a FALSE.

In the driver class, the totalGamesWon is a global variable for keeping track of how many games the user wins instead of the computer. Before the

The determineWinner()method in the Bingo (Driver) class will call the gotBIngo() method in the domain class, and if it returns true, it will add 1 to the totalGamesWon, otherwise it will leave the totalGamesWon alone.

Finally, the mainmethod will contain a do-while loop that will execute at least once, and do the following:

  1. Instantiate the BingoCard class into an object
  2. Call the playGame() method in the driver class
  3. The playGame() method will call the checkBingo(int aNum) in the domain class
  4. Call the determineWinner() method in the driver class, which calls the gotBingo() method in the domain class, and add 1 to totalGamesWom whenever gotBingo() returns true.
  5. Ask user if he/she wants to repeat and play BINGO again.

In: Computer Science

Define the Professional Responsibility of Practicing Engineers toward the public, the employer and the environment.

Define the Professional Responsibility of Practicing Engineers toward the public, the employer and the environment.

In: Civil Engineering

Write in drjava Problem Design and implement these 4 files: A parent class called Plant with...

Write in drjava

Problem

Design and implement these 4 files:

  1. A parent class called Plant with name (eg Rose, Douglas Fir) and lifespan (could be in days, weeks, months or years) attributes
  2. Tree inherits from Plant and adds a height attribute
  3. Flower inherits from Plant and adds a color attribute
  4. A driver file to test the 3 classes above.

The classes described in #1, 2 and 3 above should have the usual constructors (default and parameterized), get (accessor) and set (mutator) methods for each attribute, and a toString method

Child classes should call parent methods whenever possible to minimize code duplication.

The driver program must test all the methods in each of the classes. Include comments in your output to describe what you are testing, for example   System.out.println(“testing Plant toString, accessor and mutator”);. Print out some blank lines in the output to make it easier to read and understand what is being output.

Assignment Submission:

Submit a print-out of each class file, the driver file and a sample of the output.

Marking Checklist

  1. Does EACH class have all the usual methods?
  2. Are all methods in EACH class tested, including child objects calling inherited parent methods?
  3. Does the child class call the parent’s constructor?
  4. Does the child class override the parent’s toString?
  5. Does the output produced have lots of comments explaining what is being output?
  6. Does each class, and the output, have blank lines and appropriate indenting to make them more readable?

In: Computer Science

1) Write Java application that asks the user to enter the cost of each apple and...

1) Write Java application that asks the user to enter the cost of each apple and number of apples bought. Application obtains the values from the user and prints the total cost of apples.
2) Write a java application that computes the cost of 135 apples, where the cost of each apple is $0.30.
3)Write a java application that prepares the Stationery List. Various entries in the table must be obtained from the user. Display the Stationary list in the tabular format

In: Computer Science

A retaining wall with sloping back, of vertical height 9m retains soil of density 1.6 Mg/m3,...

A retaining wall with sloping back, of vertical height 9m retains soil of density 1.6 Mg/m3, and angle of friction 30o. The soil slopes upwards at 20o to the horizontal from the back edge of the wall, the angle between the slope and the back of the wall is 100o. Cohesion 10kN/m2, angle of friction between soil and wall is 25o but there is no cohesion between them. Find the thrust on the back wall per metre run using trial values of 25, 30, 40, and 45o for the inclination for the plane of rupture to the vertical.

In: Civil Engineering

Endocrine System Oral anti diabetic drug (Glicazide) Instructions: Identify the drug category Identify both Brand name...

Endocrine System Oral anti diabetic drug (Glicazide)

Instructions:

Identify the drug category

Identify both Brand name and Generic Name

Drug Action

Therapeutic effects

Dosages

Routes

Side effects

In: Nursing

Write a function that takes a list of integers as input and returns a list with...

Write a function that takes a list of integers as input and returns a list with only the even numbers in descending order (Largest to smallest)

Example: Input list: [1,6,3,8,2,5] List returned: [8, 6, 2]

Do not use any special or built in functions like append, reverse etc.

In: Computer Science