Questions
It is your job to determine your company’s marginal cost of capital schedule. The firm’s current...

It is your job to determine your company’s marginal cost of capital schedule. The firm’s current capital structure, which it considers optimal, consists of 30% debt, 20% preferred stock, and 50% common equity. The firm has determined that it can borrow up to $15 million in debt at a pre-tax cost of 7%, an additional $9 million at a pre-tax cost of 9%, and any additional debt funds at 11%. The firm expects to retain $25 million of its earnings; any additional income can be raised by issuing new common stock. The firm’s common stock currently trades at $30 per share, and it pays a $3.00 per share dividend. Dividends are expected to grow at a 5% annual rate over time. If the firm issues new common stock it will be sold to the public at a 10% discount. There will also be a $2.00 per share flotation cost. Preferred stock can be issued in unlimited quantities at a pre-tax cost of 12%. If the firm decides to raise more than $80m in capital, what is the cost of that capital? Assume a tax rate of 40%.

In: Finance

summary about US and EU relation after Donald Trump ?

summary about US and EU relation after Donald Trump ?

In: Economics

Beginning an IT project includes a fundamental skill of making the best product decision for your...

Beginning an IT project includes a fundamental skill of making the best product decision for your organization. One decision to make at the beginning of your project plan is to consider options available for your deliverable.

IT projects can be based on existing, off-the-shelf software that is customized to meet the needs of the project deliverables. In other cases, IT projects can be built from the ground up, in-house. Imagine you and your colleagues are consultants who have been asked to weigh in on the custom vs. off-the-shelf question at the beginning of an IT project at a Fortune 500 company.


Respond to the following in a minimum of 175 words:

  • What are 2 benefits of choosing and customizing off-the-shelf software to meet your project’s needs vs. building the entire project in-house?
  • What are the drawbacks?
  • Consider cost, the impact on the in-house team’s development staff, the software’s ability to grow with future project requirements, and how the choice will affect project support and maintenance.

In: Computer Science

1.) Sharon is 45 years old and wants to retire at 65. She wishes to make...

1.) Sharon is 45 years old and wants to retire at 65. She wishes to make monthly deposits in an account paying 9% compounded monthly so when she retires she can withdraw $1000 a month for 20 years. How much should she deposit each month? 2.) David works during the summer to help with expenses at school the following year. He is able to save $250 each week for 12 weeks, and he invests it at an annual rate of 7% that is compounded monthly. When school starts, David will begin to withdraw equal amounts from this account each week. What is the most David can withdraw each week for 34 weeks?

can I get some help please?

In: Finance

#include <chrono.h> #include <stdlib.h> #include <iostream.h> #include<conio.h> #include <iomanip.h> //#include <string.h> #include <fstream.h> //using namespace std;...

#include <chrono.h>

#include <stdlib.h>

#include <iostream.h>

#include<conio.h>

#include <iomanip.h>

//#include <string.h>

#include <fstream.h>







//using namespace std;




int main(int argc, char * argv[])

{

ifstream myfile;

myfile.open("Input.txt");

auto st=high_resolution_clock::now();

float sum = 0;

float a=0;

//myfile >> a;

int i=0;

while (!myfile.eof())

{

   myfile >> a;

   sum+=a;

}




myfile.close();

auto stp=high_resolution_clock::now();

auto dur=duration_cast<microseconds>(stp-st);

cout<<"Total time taken ="<<dur.count()<<"ms"<<endl;// displaying time taken

cout<<"Sum of integers: "<<sum<<endl; // displaying results




getch();

return 0;

}

can someone please tell me what is wrong with this code. Its C++ programming

In: Computer Science

Use Python to solve: show all code: 2) For the last assignment you had to write...

Use Python to solve: show all code:

2) For the last assignment you had to write a program that calculated and displayed the end of year balances in a savings account if $1,000 is put in the account at 6% interest for five years.

The program output looked like this:

Balance after year 1 is $ 1060.0

Balance after year 2 is $ 1123.6

Balance after year 3 is $ 1191.02

Balance after year 4 is $ 1262.48

Balance after year 5 is $ 1338.23

Modify your code so that it displays the balances for interest rates from three to five percent inclusive, in one percent intervals. (Hint: Use an outer loop that iterates on the interest rate, and an inner one that iterates on the year.)

Output:

Interest rate of 3 %:

Balance after year 1 is $ 1030.0

Balance after year 2 is $ 1060.9

Balance after year 3 is $ 1092.73

Balance after year 4 is $ 1125.51

Balance after year 5 is $ 1159.27

Interest rate of 4 %:

Balance after year 1 is $ 1040.0

Balance after year 2 is $ 1081.6

Balance after year 3 is $ 1124.86

Balance after year 4 is $ 1169.86

Balance after year 5 is $ 1216.65

Interest rate of 5 %:

Balance after year 1 is $ 1050.0

Balance after year 2 is $ 1102.5

Balance after year 3 is $ 1157.62

Balance after year 4 is $ 1215.51

Balance after year 5 is $ 1276.28

In: Computer Science

**only need part c and d answered below. It is in bold. In java, please implement...

**only need part c and d answered below. It is in bold. In java, please implement the classes below. Each one needs to be created. Each class must be in separate file. The expected output is also in bold. I have also attached the driver for part 4.

2. The StudentRoster class should be in the assignment package.

a. There should be class variable for storing multiple students (the roster), semester and year. All class variables of the Student class must be private.

b. public StudentRoster(String semester, int year) is the single constructor of the class. All arguments of the constructor should be stored as class variables. There should no getters or setters for semester and year variables.

c. public boolean addStudent(String singleStudentData) takes a single student record as a string and breaks the string (tokenize) into first name, last name, grade1, grade2, grade3. The tokens are separated by comma. These values are used to create a Student object. If the student is already in the roster, then only the grades are updated (an additional student object is not added). If the student is not in the roster, then the Student object is added to the roster. The method returns true if a new student was added, return false otherwise.This method can generate two exceptions, BadGradeException and BadNameException. If first or last names are absent, or an integer is present where first and last names should be, then a BadNameException is generated. The message of this exception should state if it was caused by issues with first or last name. Similarly, a BadGradeException is generated if grades 1, 2 or 3 is absent or is not an integer. The message of this exception should state if it was caused by issues with grades 1, 2 or 3. The exceptions are not handled in this method.

d. public int addAllStudents(Scanner allStudents) takes a scanner object that contains multiple student records. Each student record is separated by a newline. This method must use theaddStudent method by retrieving one student record at a time from the Scanner object and passing that record to the addStudent method. The method returns the number of new students that were successfully added to the roster. This method handles all exceptions generated by the addStudent method. Before returning the count of successful additions to the roster, print to the console the total of each exception handled by the method.

The A4Driver class is attached below for guidance. I have also attached the expected output of the entire program.

package driver;

import java.util.Scanner;

import assignment.Student;
import assignment.StudentRoster;

public class A4Driver {

public static void main(String[] args) {

   //test student class
       System.out.println("test Student class\n++++++++++++++++++++++++++++");
   Student s = new Student("Bugs", "Bunny");
       //same student
       Student s3 = new Student("Bugs", "Bunny");
       System.out.println("Are students s and s3 the same?: "+s.equals(s3)); //true

       //not the same student
       Student s2 = new Student("Buga", "Bunny");
       System.out.println("Are students s and s2 the same?: "+s.equals(s2)); //false

       //uncomment to check if exception is thrown
       s.equal(new Object());

       //compute average 90
       s.setGrade1(100);
       s.setGrade2(90);
       s.setGrade3(80);
       System.out.println("Student s average for the 3 grades is "+s.computeAverage());

       System.out.println("\n\ntest StudentRoster class\n++++++++++++++++++++++++++++");
   String text =""
               + "Bugs, Bunny, 100 , 90, 80\n"
               + "Buga, Bunny, 100 , 80, 90\n"
               + "123, Bunny, 100 , 90, 80\n"
               + "Bugs, 1234 , 100 , 90, 80\n"
               + "BUGS, Bunny, 100 , 90, 80\n"
               + "Bugs, BUNNY, 100 , 90, 80\n"
               + "bugs, bunny, 70 , 90, 80\n"
               + "Betty, Davis, 100 , , \n"
               + "Betty, Davis, 100 , 40 , \n"
               + "Betty, Davis, , , \n"
               + "Betty, Davis, xx ,yy ,zz \n"
               ;

   Scanner scan = new Scanner(text);
   StudentRoster sr = new StudentRoster("Fall", 2019);
       // Add only two students
System.out.println("\nTest addAllStudents, number of new students added: "+sr.addAllStudents(scan));
  
   //average of the two students should be 85
   System.out.println("\nTest computeClassAverage, class average is: "+sr.computeClassAverage());

   //rank by grade1 Buga, Bugs
   System.out.println("\nTest rankByGrade1: "+sr.rankByGrade1());

   //rank by grade2 Bugs, Buga
   System.out.println("\nTest rankByGrade2: "+sr.rankByGrade2());

   //rank by grade3 Buga, Bugs
   System.out.println("\nTest rankByGrade3: "+sr.rankByGrade3());

    //rank by average Buga, Bugs
   System.out.println("\nTest rankByAverage: "+sr.rankByAverage());

   }
}

Example output:

__________Example from A4Driver shown below

test Student class
++++++++++++++++++++++++++++
Are students s and s3 the same?: true
Are students s and s2 the same?: false
Student s average for the 3 grades is 90.0
test StudentRoster class
++++++++++++++++++++++++++++
Exceptions Caught and Handled
==========================
First name: 1
Last name: 1
Grade 1: 2
Grade 2: 1
Grade 3: 1

Test addAllStudents, number of new students added: 2
Test computeClassAverage, class average is: 85.0
Test rankByGrade1: [Buga Bunny grade1:100 grade2:80 grade3:90, Bugs Bunny grade1:70 grade2:90 grade3:80]

Test rankByGrade2: [Bugs Bunny grade1:70 grade2:90 grade3:80, Buga Bunny grade1:100 grade2:80 grade3:90]

Test rankByGrade3: [Buga Bunny grade1:100 grade2:80 grade3:90, Bugs Bunny grade1:70 grade2:90 grade3:80]

Test rankByAverage: [Buga Bunny grade1:100 grade2:80 grade3:90, Bugs Bunny grade1:70 grade2:90 grade3:80]

In: Computer Science

Use Python to solve: show all work 1) Write a program that prints out a deck...

Use Python to solve: show all work

1) Write a program that prints out a deck of cards, in the format specified below. (That is, the following should be the output of your code).

2 of hearts

2 of diamonds

2 of spades

2 of clubs

3 of hearts

3 of diamonds

3 of spades

3 of clubs

4 of hearts

4 of diamonds

4 of spades

4 of clubs

Continue with 5,6,7.. ending with

A of hearts

A of diamonds

A of spades

A of clubs

Start your program by defining the following two lists.

suits = ["hearts", "diamonds", "spades", "clubs"]

ranks = [“2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “10”, “J”, “Q”, “K”, “A”]

Remember you can use the for statement to get elements of a list.

For example if lst = ["A","B","C"] then

for elem in lst:

    print (elem)

would print

A

B

C

In: Computer Science

Project C0 C1 C2 C3 C4 C5 A -2000 +2000 0 0 0 0 B -3000...

Project C0 C1 C2 C3 C4 C5

A -2000 +2000 0 0 0 0

B -3000 +2000 +1000 +2000 +1000 0

C -4000 +0 +2000 +1000 +1000 +3000

1. If the opportunity cost of capital is 12%, which projects have positive NPVs? Which

projects would a firm accept using the NPV rule?

2. Calculate the payback period of each project. Which project(s) would a firm using the

payback rule accept if the cutoff period were three years?

In: Finance

(Net present value calculation) Carson Trucking is considering whether to expand its regional service center in...

(Net present value calculation) Carson Trucking is considering whether to expand its regional service center in Mohab,UT. The expansion requires the expenditure of $9,000,000 on new service equipment and would generate annual net cash inflows from reduced costs of operations equal to $3,000,000 per year for each of the next 9 years. In year 9 the firm will also get back a cash flow equal to the salvage value of the equipment, which is valued at $0.9 million. Thus, in year 9 the investment cash inflow totals $3,900,000. Calculate the project's NPV using a discount rate of 8 percent. If the discount rate is
88
percent, then the project's NPV is ?

In: Finance

What were the case results/ findings of Ted Bundy?

What were the case results/ findings of Ted Bundy?

In: Psychology

java binary heap operation counts /* * Add operation counts to all methods - 4pts *...

java binary heap operation counts

/*
* Add operation counts to all methods - 4pts
* No other methods/variables should be added/modified
*/
public class A6BH <E extends Comparable<? super E>> {
   private int defaultSize = 4;
   private int count = 0;
   private E[] heap;
   private int opCount = 0;
  
   public int getOpCount()
   {
       return opCount;
   }
   public void resetOpCount()
   {
       opCount = 0;
   }

   public A6BH()
   {
       heap = (E[])new Comparable[defaultSize];
   }
   public A6BH(int size)
   {
       heap = (E[])new Comparable[this.nextSize(size)];
   }
   public A6BH(E[] items)
   {
       heap = (E[])new Comparable[this.nextSize(items.length)];
       this.addAll(items);
   }

   public void addAll(E[] items)
   {
       //make sure there is room for all new items
       if(count+items.length >= heap.length)
       {
           growArray(this.nextSize(count+items.length));
       }

       for(E item : items)//copy new items in order
       {
           count++;
           heap[count] = item;
       }

       this.buildHeap();//fix heap order
   }
   private void buildHeap()
   {
       for(int i = count >> 1; i > 0; i--)
       {
           percolateDown(i);
       }
   }

   public void insert(E val)
   {
       //make sure we have room for new item
       if(count+1 >= heap.length)
       {
           growArray();
       }
       count++;
       heap[0] = val;//temporary storage
       percolateUp(count);
   }
   private void percolateUp(int pos)
   {
       //pos>>1 = pos/2 - getting to parent of empty space
       for(;heap[pos>>1].compareTo(heap[0]) > 0;pos = pos>>1)
       {
           heap[pos] = heap[pos>>1];//move parent down a level
       }
       heap[pos] = heap[0];//take value from initial insert and put in correct pos
   }

   public E findMin()
   {
       return (count > 0)?heap[1]:null;
   }
   public E deleteMin()
   {
       if(count > 0)
       {
           E temp = heap[1];

           heap[1] = heap[count];//moved last value to top
           count--;//decrease size
           percolateDown(1);//move top value down to final position

           return temp;
       }
       else
       {
           return null;//no items in heap
       }
   }
   private void percolateDown(int pos)
   {
       int firstChild = pos << 1;//pos * 2
       E temp = heap[pos];
       for(;pos<<1 <= count; pos = firstChild, firstChild = pos<<1)
       {
           if(firstChild+1 <= count)//there is a second child
           {
               if(heap[firstChild].compareTo(heap[firstChild+1]) > 0)
               {
                   firstChild++;
               }
           }
           //firstChild is now the index of the smaller child
           if(temp.compareTo(heap[firstChild]) > 0)
           {
               heap[pos] = heap[firstChild];//move child up to parent and continue
           }
           else
           {
               break;//stop loop because we found correct position for temp
           }
       }
       heap[pos] = temp;
   }

   public String toString()
   {
       String output = "Heap Size:"+heap.length+"\n";
       for(int i = 1; i <= count; i++)
       {
           output += heap[i]+",";
       }
       return output;
   }

   public boolean isEmpty()
   {
       return count == 0;
   }
   public void makeEmpty()
   {
       count = 0;
   }

   private void growArray()//O(N)
   {
       growArray(heap.length << 1);//heap.length * 2
   }
   private void growArray(int size)
   {
       //new array that is twice as big
       E[] newArr = (E[])new Comparable[size];
       //Move values to new array
       for(int i = 1; i <= count; i++)//O(N)
       {
           newArr[i] = heap[i];
       }
       //System.out.println(Arrays.toString(newArr));
       heap = newArr;//replace small array with new one
   }
   private int nextSize(int size)
   {
       return 1 << (Integer.toBinaryString(size).length() + 1);//2^(number of bits to represent number)
   }
}


======================================================================================================

import java.util.Arrays;
import java.util.Random;

public class A6Driver {

   public static void main(String[] args) {
       Random randGen = new Random();
       randGen.nextInt(10);//better timing values
       long time = System.nanoTime();//better timing values
       A6BH<Integer> heap = new A6BH<>();
       heap.insert(5);//better timing values
       int testCases = 7;
       for(int i = 1; i <= testCases; i++)
       {
           System.out.println("Test "+i);
           int N = (int)Math.pow(10, i);
           Integer[] randoms = new Integer[N];
           time = System.nanoTime();
           for(int j = 0; j < randoms.length; j++)
           {
               randoms[j] = randGen.nextInt(N)+1;
           }
           time = System.nanoTime() - time;
           System.out.println("Generate "+N+" Randoms: "+(time/1000000000.0)+ " seconds");
           time = System.nanoTime();
           heap = new A6BH<>(randoms);
           time = System.nanoTime() - time;
           System.out.println("Bulk insert: " + (time/1000000000.0)+" seconds");
           System.out.println("Bulk insert: " + heap.getOpCount()+" operations");
           time = System.nanoTime();
           heap = new A6BH<>();
           for(int j = 0; j < randoms.length; j++)
           {
               heap.insert(randoms[j]);
           }
           time = System.nanoTime() - time;
           System.out.println("Individual insert: " + (time/1000000000.0)+" seconds");
           System.out.println("Individual insert: " + heap.getOpCount()+" operations");
           System.out.println();
       }
   }

}

In: Computer Science

DNS Query and Web Page Access Time: Suppose you click on a hyperlink on a webpage...

DNS Query and Web Page Access Time:

Suppose you click on a hyperlink on a webpage you are currently viewing -- this causes a new web page to be loaded and displayed. Suppose the IP address for the host in the new URL is not cached in your local DNS server (AKA local name server), so your Client (browser) makes a DNS query to obtain the IP address before the page can be requested from the web server.

To resolve the DNS (obtain the IP Address for the web server), three separate DNS servers are queried (local DNS Name Server, TLD1 and Authoritative NS). Finally, the local name server returns the IP address of the web server to the Client and the DNS is resolved. The round trip times (RTT) to reach the DNS servers are: RTT0 = 3 msec, RTT1 =40 msec and RTT2 = 20 msec.

The requested Web page contains a base HTML page and no objects. RTTHTTP = 60msec is the time to send an HTTP request to the Web Server hosting the webpage and receive a response is. In other words, it takes 60msecs for the Client to fetch a web page/object from the web server. (Note: RTT = Round Trip Time = the time to send request and receive a response – inclusive, both directions).

Authoritative NS TLD1

With respect to the above information, answer the following questions:

A. DNS

a. Make a list describing in words (not numbers) each step in the DNS resolution:

What does the Client have at the end of this query?

    

Local Name Server

b. How much time in total is spent on the DNS query (show your numbers)?

B. Accessing the Web Page
c. Now that the client has the IP address of the web server, what step must the Client do before

sending the HTTP request? How long does this step take?

  1. How long does it take to retrieve the base web page from the web server? (include step c)

  2. How much total time IN TOTAL elapses from the instant the client first clicks on the hyperlink until the web page is displayed? This time includes (b),(c) and (d). (Assume 0 seconds transmission time for the web page – makes the problem easier, but not really true for large files!)

C. New Page / New Objects

Now suppose you request another page on the same web server: a base HTML page and 4 small objects. Neglecting transmission time, how much time elapses from the instant the new link is clicked until the entire page can be displayed? Assume the local DNS server has cached the IP address of the web server. Show your work. Assume persistent connection and pipelining.

In: Computer Science

For this assignment, you will modify existing code to create a single Java™ program named BicycleDemo.java...

For this assignment, you will modify existing code to create a single Java™ program named BicycleDemo.java that incorporates the following:

  • An abstract Bicycle class that contains private data relevant to all types of bicycles (cadence, speed, and gear) in addition to one new static variable: bicycleCount. The private data must be made visible via public getter and setter methods; the static variable must be set/manipulated in the Bicycle constructor and made visible via a public getter method.
  • Two concrete classes named MountainBike and RoadBike, both of which derive from the abstract Bicycle class and both of which add their own class-specific data and getter/setter methods.

Read through the "Lesson: Object-Oriented Programming Concepts" on The Java™ Tutorials website.

Download the linked Bicycle class, or cut-and-paste it at the top of a new Java™ project named BicycleDemo.

Download the linked BicycleDemo class, or cut-and-paste it beneath the Bicycle class in the BicycleDemo.java file.

Optionally, review this week's Individual "Week One Analyze Assignment," to refresh your understanding of how to code derived classes.

Adapt the Bicycle class by cutting and pasting the class into the NetBeans editor and completing the following:

  • Change the Bicycle class to be an abstract class.
  • Add a private variable of type integer named bicycleCount, and initialize this variable to 0.
  • Change the Bicycle constructor to add 1 to the bicycleCount each time a new object of type Bicycle is created.
  • Add a public getter method to return the current value of bicycleCount.
  • Derive two classes from Bicycle: MountainBike and RoadBike. To the MountainBike class, add the private variables tireTread (String) and mountainRating (int). To the RoadBike class, add the private variable maximumMPH (int).

Using the NetBeans editor, adapt the BicycleDemo class as follows:

  • Create two instances each of MountainBike and RoadBike.
  • Display the value of bicycleCount on the console.

Comment each line of code you add to explain what you added and why. Be sure to include a header comment that includes the name of the program, your name, PRG/421, and the date.

Rename your JAVA file to have a .txt file extension.

Submit your TXT file.

*******************CODE**************************

class Bicycle {

    int cadence = 0;
    int speed = 0;
    int gear = 1;

    void changeCadence(int newValue) {
         cadence = newValue;
    }

    void changeGear(int newValue) {
         gear = newValue;
    }

    void speedUp(int increment) {
         speed = speed + increment;   
    }

    void applyBrakes(int decrement) {
         speed = speed - decrement;
    }

    void printStates() {
         System.out.println("cadence:" +
             cadence + " speed:" + 
             speed + " gear:" + gear);
    }
}

***********************************SECOND CLASS********************************************

class BicycleDemo {
    public static void main(String[] args) {

        // Create two different 
        // Bicycle objects
        Bicycle bike1 = new Bicycle();
        Bicycle bike2 = new Bicycle();

        // Invoke methods on 
        // those objects
        bike1.changeCadence(50);
        bike1.speedUp(10);
        bike1.changeGear(2);
        bike1.printStates();

        bike2.changeCadence(50);
        bike2.speedUp(10);
        bike2.changeGear(2);
        bike2.changeCadence(40);
        bike2.speedUp(10);
        bike2.changeGear(3);
        bike2.printStates();
    }
}

In: Computer Science

im applying for a customer service clerk job as a student who just graduated college please...

im applying for a customer service clerk job as a student who just graduated college please send an example on how to do this.

In: Operations Management