Linkin Corporation is considering purchasing a new delivery
truck. The truck has many advantages over the company’s current
truck (not the least of which is that it runs). The new truck would
cost $57,120. Because of the increased capacity, reduced
maintenance costs, and increased fuel economy, the new truck is
expected to generate cost savings of $8,400. At the end of 8 years,
the company will sell the truck for an estimated $28,400.
Traditionally the company has used a rule of thumb that a proposal
should not be accepted unless it has a payback period that is less
than 50% of the asset’s estimated useful life. Larry Newton, a new
manager, has suggested that the company should not rely solely on
the payback approach, but should also employ the net present value
method when evaluating new projects. The company’s cost of capital
is 8%.
Click here to view the factor table.
(a)
Compute the cash payback period and net present value of the
proposed investment. (If the net present value is
negative, use either a negative sign preceding the number eg -45 or
parentheses eg (45). Round answer for present value to 0 decimal
places, e.g. 125. Round answer for Payback period to 1 decimal
place, e.g. 10.5. For calculation purposes, use 5 decimal places as
displayed in the factor table provided.)
| Cash payback period | ||||
|---|---|---|---|---|
| Net present value | $ |
(b)
Does the project meet the company’s cash payback
criteria?
| select an option YesNo |
Does it meet the net present value criteria for
acceptance?
| select an option NoYes |
In: Accounting
Swifty Corporation is considering purchasing a new delivery
truck. The truck has many advantages over the company’s current
truck (not the least of which is that it runs). The new truck would
cost $57,270. Because of the increased capacity, reduced
maintenance costs, and increased fuel economy, the new truck is
expected to generate cost savings of $8,300. At the end of 8 years,
the company will sell the truck for an estimated $28,800.
Traditionally the company has used a rule of thumb that a proposal
should not be accepted unless it has a payback period that is less
than 50% of the asset’s estimated useful life. Larry Newton, a new
manager, has suggested that the company should not rely solely on
the payback approach, but should also employ the net present value
method when evaluating new projects. The company’s cost of capital
is 8%.
Click here to view PV table.
(a)
Compute the cash payback period and net present value of the
proposed investment. (If the net present value is
negative, use either a negative sign preceding the number eg -45 or
parentheses eg (45). Round answer for present value to 0 decimal
places, e.g. 125. Round answer for Payback period to 1 decimal
place, e.g. 10.5. For calculation purposes, use 5 decimal places as
displayed in the factor table provided.)
| Cash payback period | years | |||
| Net present value | $ |
(b)
Does the project meet the company’s cash payback
criteria?
|
NoYes |
Does it meet the net present value criteria for
acceptance?
|
NoYes |
In: Accounting
Crane Corporation is considering purchasing a new delivery truck. The truck has many advantages over the company’s current truck (not the least of which is that it runs). The new truck would cost $54,760. Because of the increased capacity, reduced maintenance costs, and increased fuel economy, the new truck is expected to generate cost savings of $7,400. At the end of 8 years, the company will sell the truck for an estimated $27,000. Traditionally the company has used a rule of thumb that a proposal should not be accepted unless it has a payback period that is less than 50% of the asset’s estimated useful life. Larry Newton, a new manager, has suggested that the company should not rely solely on the payback approach, but should also employ the net present value method when evaluating new projects. The company’s cost of capital is 8%.
(a)
Compute the cash payback period and net present value of the
proposed investment. (If the net present value is
negative, use either a negative sign preceding the number eg -45 or
parentheses eg (45). Round answer for present value to 0 decimal
places, e.g. 125. Round answer for Payback period to 1 decimal
place, e.g. 10.5. For calculation purposes, use 5 decimal places as
displayed in the factor table provided.)
| Cash payback period | enter the cash payback period in years rounded to 1 decimal place years | |||
| Net present value | $ | enter the net present value in dollars rounded to 0 decimal places |
In: Accounting
Exercise 24-1
Linkin Corporation is considering purchasing a new delivery
truck. The truck has many advantages over the company’s current
truck (not the least of which is that it runs). The new truck would
cost $57,300. Because of the increased capacity, reduced
maintenance costs, and increased fuel economy, the new truck is
expected to generate cost savings of $7,500. At the end of 8 years
the company will sell the truck for an estimated $28,100.
Traditionally the company has used a rule of thumb that a proposal
should not be accepted unless it has a payback period that is less
than 50% of the asset’s estimated useful life. Larry Newton, a new
manager, has suggested that the company should not rely solely on
the payback approach, but should also employ the net present value
method when evaluating new projects. The company’s cost of capital
is 8%.
Click here to view PV table.
(a)
Compute the cash payback period and net present value of the
proposed investment. (If the net present value is negative, use
either a negative sign preceding the number eg -45 or parentheses
eg (45). Round answer for present value to 0 decimal places, e.g.
125. Round answer for Payback period to 1 decimal place, e.g. 10.5.
For calculation purposes, use 5 decimal places as displayed in the
factor table provided.)
Cash payback period
years
Net present value $
(b)
Does the project meet the company’s cash payback
criteria?
Yes
No
Does it meet the net present value criteria for
acceptance?
Yes
No
In: Accounting
Python
Clean up the code
Recall that once a subclass inherits from a parent class, it automatically has access to all of the parents' methods. Sometimes, the subclass needs to do extra things within a method which the parent does not do. For example, both UserPlayer and BasicMonster have their specialized __init__ methods which override the one from Player. Discuss the following question with your partner: What are the other methods that are being overridden by a subclass in the set of classes you've been given?
Some of these methods are not necessary to override. Clean up your classes by moving the methods that could just be put in the Player class up into the Player class
and remove any unneeded repetition of these methods within subclasses.
import random
import time
class Player:
'''
The Player class includes things that every player has,
which is name and hp (health points).
'''
def __init__(self, name: str, hp: int, strength: int) ->
None:
self.name = name
self.hp = hp
self.strength = strength
class UserPlayer(Player):
'''
UserPlayer inherits from Player, because it is a more
specific
type of Player. This type of Player is controlled by the
user.
'''
def __init__(self, name: str) -> None:
'''
Construct a UserPlayer with the given name, and a set
hp and strength. Also define mp for magic, a list
of possible moves they can make, and an inventory
dictionary of items they can use.
'''
super().__init__(name, 50, 10) # assign attributes name, hp,
strength
self.mp = 50
self.moves = ['attack', 'magic attack', 'defend']
self.inventory = {'potion': 1, 'ether': 1} # potion should restore
hp, ether restores mp
def attack(self, other: 'Player') -> None:
'''
Attack the Player <other> by calling that Player's take_hit
method.
The attack power is based on your own strength.
'''
other.take_hit(self.strength)
def take_hit(self, strength: int) -> None:
'''
Lose some hp based on the <strength> given.
Print message about how much hp you lost.
'''
power = random.randint(strength//2, strength)
print("{} was attacked, and lost {} hp.".format(self.name,
power))
self.hp = self.hp - power
def magic_attack(self, other):
pass
def defend(self):
pass
def make_move(self, opponent: 'Player') -> None:
'''
Make a move based on user input.
'''
not_valid = True
while not_valid:
move = input("What move do you want to take? a: attack, m: magic,
d: defend\n")
not_valid = False
if move == "a":
self.attack(opponent)
elif move == "m":
self.magic_attack(opponent)
elif move == "d":
self.defend()
else:
print("Invalid input. Try again.")
not_valid = True
class Monster(Player):
'''
Monster class represents a Computer controlled player.
The make_move method is thus different for the Monster,
where the move is randomly chosen based on a randomly
generated number, rather than through user input.
'''
def make_move(self, opponent):
move = self.moves[random.randint(0, len(self.moves)-1)]
if move == "basic attack":
self.attack(opponent)
elif move == "special attack":
self.special_attack(opponent)
class BasicMonster(Monster):
'''
BasicMonster class represents a basic type of Monster.
We inherit the make_move from the Monster class, and this
BasicMonster only has those two moves, so we don't need
to add the make_move method here again.
'''
def __init__(self) -> None:
'''
Construct a BasicMonster with a name, hp, strength
and list of moves.
'''
super().__init__('Basic Monster', 50, 10) # assign attributes name,
hp, strength
# the super call above uses the original Player class's init
method
self.moves = ['basic attack']
# Question: What does the following code do?
if self.hp < 25:
self.moves.append = ['special attack']
def attack(self, other: 'Player') -> None:
'''
Attack the Player <other> by calling that Player's take_hit
method.
The attack power is based on your own strength.
'''
other.take_hit(self.strength)
def take_hit(self, strength: int) -> None:
'''
Lose some hp based on the <strength> given.
Print message about how much hp you lost.
'''
power = random.randint(strength//2, strength)
print("{} was attacked, and lost {} hp.".format(self.name,
power))
self.hp = self.hp - power
def special_attack(self, other):
'''
Attack the Player <other> with a special attack that
exceeds
your usual strength.
'''
power = random.randint(strength, strength*2)
other.take_hit(40)
class Game:
def __init__(self, p1: 'Player', p2: 'Player') -> None:
'''
Construct a Game with the given players.
'''
self.players = (p1, p2)
self.turn = 0 # keep track of whose turn it is out of the two
players
def whose_turn(self, count: int) -> 'Player':
'''
Return the Player whose turn it is.
'''
if count % 2 == 0:
next_player = self.players[0]
else:
next_player = self.players[1]
return next_player
def play_game(self) -> None:
'''
Play the game, with each player taking turns making a move,
until
one player runs out of hp.
'''
# print out the starting state of the game
print(self)
print('------------')
winner = None
while (not winner):
if (self.players[0].hp <= 0):
winner = self.players[1]
elif (self.players[1].hp <= 0):
winner = self.players[0]
else:
# if no one has won yet, play one turn of the game (one player
makes one move)
self.play_one_turn()
print('And {} is the winner!!!'.format(winner.name))
def play_one_turn(self) -> None:
'''
Play one turn of the game based on which player's turn it is.
Print state of game that results from this turn.
'''
current_player = self.whose_turn(self.turn) # get the Player whose
turn it currently is
other_player = self.whose_turn(self.turn-1) # get the other Player
in the game
print("{}'s TURN".format(current_player.name))
# if the player is the computer, wait 2 seconds before
# showing the player's move to make the gameflow feel more
natural
if (isinstance(current_player,Monster)):
time.sleep(1)
current_player.make_move(other_player)
# print current state of game
print(self)
print('------------')
self.turn += 1
def __str__(self) -> str:
'''
Return string representation of state of game.
'''
return "Player 1 hp: {}, Player 2 hp:
{}".format(self.players[0].hp, self.players[1].hp)
def main():
'''Prompt the user to configure and play the game.'''
name = input("What is p1's name? ")
p1 = UserPlayer(name) # make the first player a User at position
(0,0)
p2 = BasicMonster()
g = Game(p1, p2)
g.play_game()
if __name__ == '__main__':
main()
In: Computer Science
Consider the following statements.
(i). If we are testing for the difference between two population means, it is assumed that the sample observations from one population are independent of the sample observations from the other population.
(ii). If we are testing for the difference between two population means, it is assumed that the two populations are approximately normal and have equal variances.
(iii). The critical value of t for a two-tail test of the difference of two means, a level of signifi- cance of 0.10 and sample sizes of seven and fifteen, is ±1.734.
Which of the following is true?
A. (i), (ii), and (iii) are all correct statements.
B. (i), (ii), and (iii) are all false statements.
C. (i) and (ii) are correct statements but not (iii).
D. (i) and (iii) are correct statements but not (ii). E. (ii) and (iii) are correct statements but not (i).
In: Statistics and Probability
X = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Y = [-1.5, 16, 44, 90, 141, 207, 292, 398.4, 522, 670]
In: Computer Science
C++ program which partitions n positive integers into two disjoint sets with the same sum. Consider all possible subsets of the input numbers.
All in one C++ file.
This is the sample Input 1
6 3 5 20 7 1 14
Output 1
Equal Set: 1 3 7 14
This is the sample Input 2
5 10 8 6 4 2
Output 2
Equal Set: 0
In: Computer Science
Assume that two months from today you plan to make the first of a series of quarterly deposits into an account that pays an APR of 6.5% with monthly compounding. Your first deposit will equal $100 and your final deposit will occur two years and five months from today. Each deposit will be 1.5% smaller than the previous one. Three years and seven months from today, you plan to make the first of a series of semiannual withdrawals from an account. You will continue to make withdrawals through five years and one month from today. Each withdrawal will be 2.5% larger than the previous one. How large can you make your final withdrawal?
In: Finance
1 Program Summary
We are subcontractors for the Corellian Engineering Corportation (CEC) and we are working on one of the subsystems for the MC85 star cruiser. Our task is to model stress on a particular surface of the cruiser. Stress is defined as σ = Ld Area , where Ld is the load and Area is the area. Let’s say we are working with the metric measure system. So the load would be in kilograms. Area would be meters. We need log into the system and enter the weight (Load) and the Area, (length x width) and calculate and display the stress on that particular area.
2 Program Behavior
The program will do the following.
1: declare floating point variables, fLoad, fWidth, fLength and initialize them
2: declare a string to hold login password
3: display the message ”Stress Modeling SubSystem 0.1a”
4: display the login message ”Login ID: ”
5: get the login id from the user
6: compare it to the special code ”0a132”
7: don’t do the calculation if special code doesn’t match, also print out an error message (see below)
8: if the login id matches the special code we prompt the user for load, length and width
9: make sure that we give the user an error message if either length or width are 0, also print out an error message (see below)
10: we calculate the stress value
11: we display the stress value with accuracy of 2 decimal places.
12: make sure we always show the decimal value
Example display from your program.
What you type in is in bold font below.
Output if login was successful
Login ID: 0a132
Stress Modeling Sub System 0.1a
Enter Load (kg): 1000.2
Enter Length (m): 5.2 Enter Width (m): 3.1 Stress is k/m2̂ = 62.05
Output of login was unsuccessful
Login ID: DVleet
Login Unsuccessful
Output if length and/or width zero
Login id: 0a123
Stress Modeling Sub System 0.1a
Enter Load (kg): 1000.2
Enter Length (m): 0
Enter Width (m) : 0
Error possible divide by zero
Stress not calculated
Please note that I will be compiling your code on my computer and testing your code to see if it runs. use c++ language for this assignment and please do add a screenshot of all your codifications and outputs.
In: Computer Science