Utilizing the following Christmas Tree production function that you had completed in Homework 2 that includes output and cost information for a firm, respond to the questions given, assuming the firm is a perfectly competitive firm:
|
Input (Units of Water) |
Output (Christmas Trees) |
MPP |
TFC |
TVC |
TC |
AFC |
AVC |
ATC |
MC |
|
0 |
0 |
4500 |
0 |
4500 |
|||||
|
10 |
70 |
7 |
4500 |
3500 |
8000 |
64.29 |
50.00 |
114.29 |
50.00 |
|
20 |
145 |
7.5 |
4500 |
7000 |
11500 |
31.03 |
48.28 |
79.31 |
46.67 |
|
30 |
220 |
7.5 |
4500 |
10500 |
15000 |
20.45 |
47.73 |
68.18 |
46.67 |
|
40 |
290 |
7 |
4500 |
14000 |
18500 |
15.52 |
48.28 |
63.79 |
50.00 |
|
50 |
345 |
5.5 |
4500 |
17500 |
22000 |
13.04 |
50.72 |
63.77 |
63.64 |
|
60 |
395 |
5 |
4500 |
21000 |
25500 |
11.39 |
53.16 |
64.56 |
70.00 |
|
70 |
440 |
4.5 |
4500 |
24500 |
29000 |
10.23 |
55.68 |
65.91 |
77.78 |
|
80 |
480 |
4 |
4500 |
28000 |
32500 |
9.38 |
58.33 |
67.71 |
87.50 |
|
90 |
515 |
3.5 |
4500 |
31500 |
36000 |
8.74 |
61.17 |
69.90 |
100.00 |
|
100 |
545 |
3 |
4500 |
35000 |
39500 |
8.26 |
64.22 |
72.48 |
116.67 |
a.) Assume that the selling price for Christmas Trees is
$80/tree. What would be the approximate profit-maximizing rate of
output that you would want to produce? Would the firm be generating
profit above all costs at that selling price? Why or Why
not?
b.)If the price of Christmas Trees drops to $60/tree, approximately how many trees would now be produced for the optimum level? Are you making a profit above all costs at $60/tree? Why or Why not?
c.)At what price would be the short-run break-even point? At what price would be the firm’s short-run shutdown point?
In: Economics
Utilizing the following Christmas Tree production function that you had completed in Homework 2 that includes output and cost information for a firm, respond to the questions given, assuming the firm is a perfectly competitive firm:
|
Input (Units of Water) |
Output (Christmas Trees) |
MPP |
TFC |
TVC |
TC |
AFC |
AVC |
ATC |
MC |
|
0 |
0 |
4500 |
0 |
4500 |
|||||
|
10 |
70 |
7 |
4500 |
3500 |
8000 |
64.29 |
50.00 |
114.29 |
50.00 |
|
20 |
145 |
7.5 |
4500 |
7000 |
11500 |
31.03 |
48.28 |
79.31 |
46.67 |
|
30 |
220 |
7.5 |
4500 |
10500 |
15000 |
20.45 |
47.73 |
68.18 |
46.67 |
|
40 |
290 |
7 |
4500 |
14000 |
18500 |
15.52 |
48.28 |
63.79 |
50.00 |
|
50 |
345 |
5.5 |
4500 |
17500 |
22000 |
13.04 |
50.72 |
63.77 |
63.64 |
|
60 |
395 |
5 |
4500 |
21000 |
25500 |
11.39 |
53.16 |
64.56 |
70.00 |
|
70 |
440 |
4.5 |
4500 |
24500 |
29000 |
10.23 |
55.68 |
65.91 |
77.78 |
|
80 |
480 |
4 |
4500 |
28000 |
32500 |
9.38 |
58.33 |
67.71 |
87.50 |
|
90 |
515 |
3.5 |
4500 |
31500 |
36000 |
8.74 |
61.17 |
69.90 |
100.00 |
|
100 |
545 |
3 |
4500 |
35000 |
39500 |
8.26 |
64.22 |
72.48 |
116.67 |
Assume that the selling price for Christmas Trees is
$80/tree.What would be the approximate profit maximizing rate of
output that you would want to produce?Would the firm be generating
profit above all costs at that selling price? Why or Why
not?
If the price of Christmas Trees drops to $60/tree, approximately
how many trees would now be produced for the optimum level?Are you
making profit above all costs at $60/tree? Why or Why
not?
At what price would be the short-run breakeven point?At what
price would be the firm’s short-run shut down point?
In: Economics
A doctor claims that the number of births by day of the week is uniformly distributed. To test this claim, you randomly select 700 births from a recent year and record the day of the week on which each takes place. The table shows the results.
| Day: | Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
|---|---|---|---|---|---|---|---|
| Births: | 68(100) | 107(100) | 117(100) | 110(100) | 114(100) | 109(100) | 75(100) |
Test the doctor's claim at the significance level a=0.05.
a) What is the assumed proportion of births in each day?(in fractions)
b) State H0 and Ha.
c) What is the degrees of freedom of the test?
d) Calculate the x^2 test statistic.
e) Decide whether to reject the null hypothesis.
g) Interpret the decision in the context of the original claim.
In: Statistics and Probability
The programming language that is being used here is JAVA, below I have my code that is supposed to fulfill the TO-DO's of each segment. This code in particular has not passed 3 specific tests. Below the code, the tests that failed will be written in bold with what was expected and what was outputted. Please correct the mistakes that I seem to be making if you can. Thank you kindly.
OverView:
For this project, you will develop a game program called Stick, Water. Fire- a version of the game Rock, Paper, Scissors. The user plays against the computer. You will use conditional expressions in several ways in this project. Primarily, you will write code to implement the game rules using conditional statements. You will also utilize Java’s Random class to generate random outcomes used in the game for the computer’s choice. The Random class can be seeded so that development and testing can be more easily done. Another aspect of this project is the use of a private method in a class. Private methods are used only within a class to help other methods with their calculations.
Program Interaction:
Our goal is to make a fun and interactive game for users. The user will be able to enter their choice of Stick, Water, or Fire. The computer will also make a choice, and the winner will be chosen based on the following three rules:
Stick beats Water by floating on top of it
Water beats Fire by putting it out
Fire beats Stick by burning it
The user is prompted to enter S, W or F (Note that the input can
be upper or lower case). The computer then makes its choice
(randomly generated) and the program applies the game rules to the
user and computer’s choices.
The user and computer’s scores are recorded as well as the number
of rounds played.
Ties result in no increase in either user or computer scores, but the round is counted.
A sample of the program’s behavior is given below. This is how the program should function when you have it working:
======Code===============
import java.util.Random;
/* This class ecapsulates the state and logic required to play
the
Stick, Water, Fire game. The game is played between a user and the
computer.
A user enters their choice, either S for stick, F for fire, W for
water, and
the computer generates one of these choices at random- all equally
likely.
The two choices are evaluated according to the rules of the game
and the winner
is declared.
Rules of the game:
S beats W
W beats F
F beats S
no winner on a tie.
Each round is executed by the playRound method. In addition to
generating the computer
choice and evaluating the two choices, this class also keeps track
of the user and computer
scores, the number of wins, and the total number of rounds that
have been played. In the case
of a tie, neither score is updated, but the number of rounds is
incremented.
NOTE: Do not modify any of the code that is provided in the starter
project. Additional instance variables and methods
are not required to make the program work correctly, but you may
add them if you wish as long as
you fulfill the project requirements.
*/
public class StickWaterFireGame {
// TODO 1: Declare private instance variables here:
private static Random rand;
public static int computerScore;
public static int rounds;
public static int playerScore;
private static boolean playerWins;
private static boolean isTie;
private static String computerChoice = "";
private static String playerChoice = "";
/* This constructor assigns the member Random variable, rand,
to
* a new, unseeded Random object.
* It also initializes the instance variables to their default
values:
* rounds, player and computer scores will be 0, the playerWins and
isTie
* variables should be set to false.
*/
public StickWaterFireGame() {
// TODO 2: Implement this method.
rand = new Random();
playerScore = 0;
computerScore = 0;
rounds = 0;
playerWins = false;
isTie = false;
}
/* This constructor assigns the member Random variable, rand,
to
* a new Random object using the seed passed in.
* It also initializes the instance variables to their default
values:
* rounds, player and computer scores will be 0, the playerWins and
isTie
* variables should be set to false.
*/
public StickWaterFireGame(int seed) {
// TODO 3: Implement this method.
rand = new Random(seed);
playerScore = 0;
computerScore = 0;
rounds = 0;
playerWins = false;
isTie = false;
}
/* This method returns true if the inputStr passed in is
* either "S", "W", or "F", false otherwise.
* Note that the input can be upper or lower case.
*/
public boolean isValidInput(String inputStr) {
// TODO 4: Implement this method.
if (inputStr.equalsIgnoreCase("S") ||
inputStr.equalsIgnoreCase("W") || inputStr.equalsIgnoreCase("F"))
{
return true;
}
return false;
}
/* This method carries out a single round of play of the SWF
game.
* It calls the isValidInput method and the getRandomChoice
method.
* It implements the rules of the game and updates the instance
variables
* according to those rules.
*/
// Returns the choice of the computer for the most recent round of
play
public String getComputerChoice(){
// TODO 5: Implement this method.
return computerChoice;
}
// Returns true if the player has won the last round, false
otherwise.
public boolean playerWins(){
// TODO 6: Implement this method.
if
((playerChoice.equalsIgnoreCase("s"))&&(computerChoice.equalsIgnoreCase("w"))){
return true;
}
else if
((playerChoice.equalsIgnoreCase("f"))&&(computerChoice.equalsIgnoreCase("w"))){
return true;
}
else if
((playerChoice.equalsIgnoreCase("s"))&&(computerChoice.equalsIgnoreCase("f"))){
return true;
}
else {
return false;
}
}
// Returns the player's cumulative score.
public int getPlayerScore(){
// TODO 7: Implement this method.
return playerScore;
}
// Returns the computer's cumulative score.
public int getComputerScore(){
// TODO 8: Implement this method.
return computerScore;
}
// Returns the total nuber of rounds played.
public int getNumRounds(){
// TODO 9: Implement this method.
return rounds;
}
// Returns true if the player and computer have the same score
on the last round, false otherwise.
public boolean isTie(){
// TODO 10: Implement this method.
if (playerChoice.equals(computerChoice)) {
return true;
}
return false;
}
/* This "helper" method uses the instance variable of Random to
generate an integer
* which it then maps to a String: "S", "W", "F", which is
returned.
* This method is called by the playRound method.
*/
private String getRandomChoice() {
// TODO 11: Implement this method.
int number = rand.nextInt(3)+1;
String choice = null;
if(number == 1) {
choice = "S";
}
else if (number == 2) {
choice = "W";
}
else if (number == 3) {
choice = "F";
}
return choice;
}
public void playRound(String playerChoice) {
// TODO 12: Implement this method.
if(isValidInput(playerChoice)) {
this.playerChoice = playerChoice.toLowerCase();
rounds++;
this.computerChoice = getRandomChoice();
if(playerWins()) {
playerScore++;
playerWins=true;
}
else if(isTie())
isTie=true;
else
computerScore++;
}
}
}
Tests that failed
Test 11: computer score is updated if user enters an invalid input. (0.0/5.0)
Test Failed!
Test computer score is updated if user enters an invalid input. expected:<1> but was:<0>
at StickWaterFireGameTest.computerScoreUpdateInvalidPlayerInputTest:241 (StickWaterFireGameTest.java)
Test 8: playRound updates scores correctly on many rounds with unseeded generator. (0.0/5.0)
Test Failed!
playRound updates player scores correctly using unseeded generator. expected: but was:
at StickWaterFireGameTest.playManyRoundsTestUnseeded:170 (StickWaterFireGameTest.java)
Test 7: playRound updates scores correctly on many rounds. (0.0/5.0)
Test Failed!
playRound updates player scores correctly using seeded generator. expected: but was:
at StickWaterFireGameTest.playManyRoundsTestSeeded:142 (StickWaterFireGameTest.java)
========Main.Java code============
import java.util.*;
public class StickWaterFireMain{
public static void main(String[] args){
//StickWaterFireGame game = new StickWaterFireGame();
StickWaterFireGame game = new StickWaterFireGame(1234);
Scanner scan = new Scanner(System.in);
boolean keepGoing = true;
String playerChoice = "";
// Greet the user and state the rules:
System.out.println("Welcome to Stick-Water-Fire!\n");
System.out.println("Rules:");
System.out.println("\tYou will play against the computer for the
specified number of rounds.");
System.out.println("\tYou will make a choice: 'S', 'W', or 'F' to
represent 'Stick', 'Water', or 'Fire'.");
System.out.println("\tThe computer will also make a choice, and the
winner is chosen as follows:");
System.out.println("\t\t Stick beats Water (it floats on
top)");
System.out.println("\t\t Water beats Fire (extinguishes the
fire)");
System.out.println("\t\t Fire beats Stick (burns the
stick)");
System.out.println("\tIn the event of a tie, there is no
winner.");
System.out.println("\tEach round, the winner will have their score
incremented.");
System.out.println("\tA report of scores and number of rounds will
be displayed at the end of each round.");
System.out.println("\tEnter X to quit.");
System.out.println("\tGood luck!");
// begin the game loop.
while(keepGoing){
System.out.println("Enter 'S' for Stick, 'W' for
Water, 'F' for Fire, or X to quit:");
playerChoice = scan.nextLine();
if(playerChoice.equalsIgnoreCase("X"))
keepGoing = false;
else{ // Handle round of play
// validate input
if(!game.isValidInput(playerChoice))
System.out.println("\tInvalid input entered:
"+playerChoice+"\n");
else {
game.playRound(playerChoice);
String computerChoice =
game.getComputerChoice();
System.out.println("You chose " + playerChoice + " and
the computer chose " + computerChoice);
// report winner
if(game.isTie()){
System.out.println("You tied!");
} else if (game.playerWins()) {
System.out.println("You won! Nice job!\n");
} else { // Computer won
System.out.println("You lost. Better luck next
time!\n");
}
// Print report
System.out.println("Game summary:");
System.out.println(getScoreReportStr(game));
System.out.println(" ");
}
}//end of round
}// end loop
System.out.println("Thanks for playing!");
} // end main
public static String getScoreReportStr(StickWaterFireGame
game){
return "Total plays: " + game.getNumRounds() + "\nYour total score:
"+ game.getPlayerScore() +
", computer total score: " + game.getComputerScore();
}
}// end class
In: Computer Science
Monthly adjusted closing prices for Stock A for the months of November, October, Sept, Aug, July, June and May are $98, 100, 90, 100, 110, 105, 100 respectively. The corresponding market index are $100, 105, 110, 115, 118, 120 and 118. Based on the above data,
1. The annualized volatility of stock A is...
2. The beta of stock A is...
3. If the market index goes up from $100 to $120, what is the estimated percentage change in stock A
In: Finance
In: Advanced Math
You paid $100 dollars to participate in a bet. If you win you will get $200 back. If you lose, you will get nothing. If the odds are 50-50, what is the mean and standard deviation of this bet (investment)?
A) 100% and 100% B) 0 % and 50% C) 100% and 50 % D) 0 % and 0 %
In: Finance
11. The current in the circuit for Platinum at 100% intensity, 100nm wavelength, and zero battery voltage is __________ Amps.
12. he current in the circuit for Platinum at 100% intensity, 200nm wavelength, and zero battery voltage is __________ Amps.
13. The current in the circuit for Calcium at 100% intensity, 100nm wavelength, and zero battery voltage is __________ Amps.
14. The current in the circuit for Calcium at 100% intensity, 200nm wavelength, and zero battery voltage is __________ Amps.
15. The current in the circuit for Calcium at 100% intensity, 300nm wavelength, and zero battery voltage is __________ Amps.
16. The current in the circuit for Calcium at 100% intensity, 400nm wavelength, and zero battery voltage is __________ Amps.
In: Physics
On November 1, 20X1, ABC Co. received a $30,000 note receivable from a client for services rendered. The note receivable will be due on February 1, 20X2 with interest at 4% per year. ABC Co. adjusts its books monthly. What adjusting entry is needed on ABC Co.’s books on December 31, 20X1?
| a. |
Debit: Interest receivable…………………..100 Credit: Interest income..…….…….…....100 |
|
| b. |
Debit: Interest expense……………………..100 Credit: Interest payable………………….100 |
|
| c. |
Debit: Interest receivable…………………..200 Credit: Interest income.....……….……..200 |
|
| d. |
Debit: Cash………….. ……………….……100 Credit: Interest income…………………..100 |
In: Accounting
Don Hawk Furnishings sells a variety of decorative pieces including a variety of candle holders. The business began the second quarter (April to June) of 2018 with 15 (Alanea) candle holders at a total cost of $108,750. The following transactions relating to the “Alanea” candle holders were completed during the quarter.
April 7 90 candle holders were purchased at a cost of $6,850 each. In addition the business paid freight charges of $800 cash on each candle holder to have the inventory shipped from the point of purchase to their warehouse.
April 30 The sales for April were 75 candle holders which yielded total sales revenue of $803,250. ( 15 of these units were sold on account to longstanding customers of the business)
May 6 A new batch of 80 candle holders was purchased at a total cost of $654,800
May 9 Upon inspection of the candle holders purchased on May 6, five (5) of the units were found to be defective and were returned to the supplier.
May 31 During the month 62 of the decorative pieces were sold at a price of $11,450 each.
June 5 A customer, to whom 7 of the candle holders were sold during the first business day of May, returned 3 of the candle holders, as they were of another make & model.
June 14 Owing to an increased demand, a further 110 candle holders were purchased at a cost of $9,000 each; the supplier gave a 3% quantity discount on the purchase.
June 30 116 candle holders were sold during June at a unit selling price of $12,250.
June 30 An actual count of inventory was carried out at the close of business which revealed that there were 36 pieces of the Alanea brand of merchandise in the store room. Unless otherwise stated, assume that all purchases were on account and received on the dates stated.
Required:
(A) Prepare a perpetual inventory record for this merchandise, using the first in, first out (FIFO) method of inventory valuation to determine the company’s cost of goods sold for the quarter and the value of ending.
(B) Given that selling, distribution and administrative costs associated with the Alanea brand of candle holders for the quarter were $27,255, $42,400 and $145,600 respectively, prepare an income statement for Don Hawk Furnishings (Alanea) for the quarter ended June 30, 2018.
(C) Journalize the transactions for the month of April, assuming the company uses a:
- Periodic inventory system
- Perpetual inventory system
(D) The manager of the business, Don Hawk, has stated that his
objective is to cut back on his tax liability as much as possible
and is of the view that the FIFO method would be best. Do you agree
with Don? Explain your answer clearly distinguishing between the
first in, first out (FIFO) and last in, first out (LIFO) methods of
inventory valuation.
In: Accounting