Package pacman.score
Class ScoreBoard
public class ScoreBoard extends ObjectScoreBoard contains previous scores and the current score of the PacmanGame. A score is a name and value that a valid name only contains the following characters:
Implement this for Assignment 1
Constructor Summary
| Constructor | Description |
|---|---|
| ScoreBoard() |
Creates a score board that has no entries and a current score of 0. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| List<String> | getEntriesByName() |
Gets the stored entries ordered by Name in lexicographic order. |
| List<String> | getEntriesByScore() |
Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match. |
| int | getScore() |
Get the current score. |
| void | increaseScore(int additional) |
Increases the score if the given additional is greater than 0. |
| void | reset() |
Set the current score to 0. |
| void | setScore(String name, int score) |
Sets the score for the given name if: name is not null name is a valid score name score is equal to or greater than zero. This should override any score stored for the given name if name and score are valid. |
| void | setScores(Map<String,Integer> scores) |
Sets a collection of scores if "scores" is not null, otherwise no scores are modified. |
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitConstructor Detail
ScoreBoard
public ScoreBoard()
Creates a score board that has no entries and a current score of 0.
Implement this for Assignment 1
Method Detail
getEntriesByName
public List<String> getEntriesByName()Gets the stored entries ordered by Name in lexicographic order. The format of the list should be:
ScoreBoard board = new ScoreBoard();
board.setScore("Fred", 100);
board.setScore("fred", 20);
board.setScore("Fred", 24);
List<String> scores = board.getEntriesByName();
System.out.println(scores);
// this outputs:
// [Fred : 24, fred : 20]
Returns:
List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.
Implement this for Assignment 1
getEntriesByScore
public List<String> getEntriesByScore()Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match. The format of the list should be:
ScoreBoard board = new ScoreBoard();
board.setScore("Alfie", 100);
board.setScore("richard", 20);
board.setScore("Alfie", 24);
board.setScore("ben", 20);
List<String> scores = board.getEntriesByScore();
System.out.println(scores);
// this outputs
// [Alfie : 24, ben : 20, richard : 20]
Returns:
List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.
Implement this for Assignment 1
setScore
public void setScore(String name, int score)Sets the score for the given name if:
Parameters:
name - of scorer.
score - to set to the given name.
Implement this for Assignment 1
setScores
public void setScores(Map<String,Integer> scores)Sets a collection of scores if "scores" is not null, otherwise no scores are modified. For each score contained in the scores if:
Parameters:
scores - to add.
Implement this for Assignment 1
increaseScore
public void increaseScore(int additional)
Increases the score if the given additional is greater than 0. No change to the current score if additional is less than or equal to 0.
Parameters:
additional - score to add.
Implement this for Assignment 1
getScore
public int getScore()
Get the current score.
Returns:
the current score.
Implement this for Assignment 1
reset
public void reset()
Set the current score to 0.
How to use treemap to solve this problem?
In: Computer Science
Package pacman.score
Class ScoreBoard
public class ScoreBoard extends ObjectScoreBoard contains previous scores and the current score of the PacmanGame. A score is a name and value that a valid name only contains the following characters:
Implement this for Assignment 1
Constructor Summary
| Constructor | Description |
|---|---|
| ScoreBoard() |
Creates a score board that has no entries and a current score of 0. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
| List<String> | getEntriesByName() |
Gets the stored entries ordered by Name in lexicographic order. |
| List<String> | getEntriesByScore() |
Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match. |
| int | getScore() |
Get the current score. |
| void | increaseScore(int additional) |
Increases the score if the given additional is greater than 0. |
| void | reset() |
Set the current score to 0. |
| void | setScore(String name, int score) |
Sets the score for the given name if: name is not null name is a valid score name score is equal to or greater than zero. This should override any score stored for the given name if name and score are valid. |
| void | setScores(Map<String,Integer> scores) |
Sets a collection of scores if "scores" is not null, otherwise no scores are modified. |
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitConstructor Detail
ScoreBoard
public ScoreBoard()
Creates a score board that has no entries and a current score of 0.
Implement this for Assignment 1
Method Detail
getEntriesByName
public List<String> getEntriesByName()Gets the stored entries ordered by Name in lexicographic order. The format of the list should be:
ScoreBoard board = new ScoreBoard();
board.setScore("Fred", 100);
board.setScore("fred", 20);
board.setScore("Fred", 24);
List<String> scores = board.getEntriesByName();
System.out.println(scores);
// this outputs:
// [Fred : 24, fred : 20]
Returns:
List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.
Implement this for Assignment 1
getEntriesByScore
public List<String> getEntriesByScore()Gets the stored entries ordered by the score in descending order ( 9999 first then 9998 and so on ...) then in lexicographic order of the name if the scores match. The format of the list should be:
ScoreBoard board = new ScoreBoard();
board.setScore("Alfie", 100);
board.setScore("richard", 20);
board.setScore("Alfie", 24);
board.setScore("ben", 20);
List<String> scores = board.getEntriesByScore();
System.out.println(scores);
// this outputs
// [Alfie : 24, ben : 20, richard : 20]
Returns:
List of scores formatted as "NAME : VALUE" in the order described above or an empty list if no entries are stored.
Implement this for Assignment 1
setScore
public void setScore(String name, int score)Sets the score for the given name if:
Parameters:
name - of scorer.
score - to set to the given name.
Implement this for Assignment 1
setScores
public void setScores(Map<String,Integer> scores)Sets a collection of scores if "scores" is not null, otherwise no scores are modified. For each score contained in the scores if:
Parameters:
scores - to add.
Implement this for Assignment 1
increaseScore
public void increaseScore(int additional)
Increases the score if the given additional is greater than 0. No change to the current score if additional is less than or equal to 0.
Parameters:
additional - score to add.
Implement this for Assignment 1
getScore
public int getScore()
Get the current score.
Returns:
the current score.
Implement this for Assignment 1
reset
public void reset()
Set the current score to 0.
I don't know how to deal with this part.
In: Computer Science
PROBLEM 19-7Investment PoolThree funds of the Leukemia Foundation, a nonprofit welfare organization, began an investment pool on January 1, 2016. The costs and fair market values on this date were as follows:MarketCostValueRestricted fund$55,000$70,000Lambert endowment fund215,000210,000Plant fund200,000220,000Total$470,000$500,000During 2016 the investment pool reinvested $20,000 in realized gains and received interest of $15,000 and dividends of $10,000. Interest and dividend income was distributed to the respective funds. The Plant Fund withdrew from the investment pool on December 31, 2016, when the total current market value was $540,000. It distributed securities in the amount of its percentage share. On January 3, 2017, the Fargot Annuity Fund entered the investment pool with investments costing$100,000 and having a current market value of $117,600. During 2017 the pool received interest of $25,000 and dividends of $15,000, which were distributed to the participating funds. Realized gains of $30,000 were rein-vested in the pool.
Required:
A. Calculate the equity percentages of the contributing funds in the investment pool at January 1, 2016, and January 3, 2017.
B.Using the format shown below, prepare entries necessary on the records of the funds that contributed securities to the investment pool to account for the earnings of the investment pool in 2016 and 2017.DateFundJournal EntryLO11
In: Accounting
At year-end 2016, Wallace Landscaping’s total assets were $1.9 million and its accounts payable were $390,000. Sales, which in 2016 were $2.3 million, are expected to increase by 25% in 2017. Total assets and accounts payable are proportional to sales, and that relationship will be maintained. Wallace typically uses no current liabilities other than accounts payable. Common stock amounted to $380,000 in 2016, and retained earnings were $240,000. Wallace has arranged to sell $100,000 of new common stock in 2017 to meet some of its financing needs. The remainder of its financing needs will be met by issuing new long-term debt at the end of 2017. (Because the debt is added at the end of the year, there will be no additional interest expense due to the new debt.) Its profit margin on sales is 4%, and 60% of earnings will be paid out as dividends.
What was Wallace's total long-term debt in 2016? Round your
answer to the nearest dollar.
$
What were Wallace's total liabilities in 2016? Round your answer to
the nearest dollar.
$
How much new long-term debt financing will be needed in 2017?
(Hint: AFN - New stock = New long-term debt.) Round your
answer to the nearest dollar.
$
In: Finance
|
At the end of 2015, Payne Industries had a deferred tax asset account with a balance of $8 million attributable to a temporary book-tax difference of $40 million in a liability for estimated expenses. At the end of 2016, the temporary difference is $20 million. Payne has no other temporary differences. Taxable income for 2016 is $80 million and the tax rate is 20% |
|
Payne has a valuation allowance of $1 million for the deferred tax asset at the beginning of 2016.
|
||||||
In: Accounting
James acquired 40% of the outstanding voting shares of Schott Co. on January 1, 2015 for $210,000 in cash when Schott’s owners’ equity was $400,000. One of the company’s buildings, that had a 20-year remaining life, was worth $100,000, even though its net book value was $60,000. Schott also had an unrecorded patent having a value of $85,000 that had a 10-year life. In 2015, Schott recorded net income of $60,000 and distributed a total cash dividend of $12,000. Its fortunes changed in 2016 when it recorded a $40,000 net loss, but the Board still paid $10,000 in dividends. This was a strategic investment and James began purchasing inventory from Schott right away. In 2015, Schott sold inventory with an original cost of $60,000 to James for $90,000. James had $15,000 of these goods in inventory (at the selling price) at December 31, 2015, but it was all sold in 2016. In 2016, Schott sold another $80,000 of inventory to James and had a gross profit on the sale of 37.5%. All but 30% of this was sold to third parties during the year.
Required: 1. Record the entries James needs in 2015 and 2016 in conjunction with this investment. 2. What is the balance in the investment account at December 31, 2016?
In: Accounting
Should have two general journals, one for dec 31 2016 and one for dec 31 2017.
The inventories of Berry Company for the years 2016 and 2017 are as follows:
Cost
Market
January 1, 2016 $10,000 $10,000
December 31, 2016 13,000 11,500
December 31, 2017 15,000 14,000
Berry uses a perpetual inventory system.
Required:
1. Assume the inventory that existed at the end of 2016 was sold in
2017. Prepare the necessary journal entries at the end of each year
to record the correct inventory valuation if Berry uses the:
a. direct method
b. allowance method
2. Next Level Explain any differences in inventory valuation and income between the two methods.
NEXT LEVEL: Complete the statements below that explain any differences in inventory valuation and income between the two methods.
The two methods produce the same net inventory valuations and have the same effects on net income. At the end of 2017, inventory would be valued at ______ under the direct method and _______ under the allowance method. Income would be reduced by _________ after the entry to reduce inventory to market under the direct method and ________ after the entry to reduce inventory to market under the allowance method.
In: Accounting
Bluecap Co. uses a standard cost system and flexible budgets for control purposes. The following budgeted information pertains to 2016:
| Denominator volume-number of units | 8,000 |
| Denominator volume-percent of capacity | 80% |
| Denominator volume-standard direct labor hours | 24,000 |
| Budgeted variable factory overhead cost at the denominator volume | $103,200 |
| Total standard factory overhead rate per direct labor hour | $15.10 |
During 2016, Bluecap worked 28,000 direct labor hours and manufactured 9,600 units. The actual factory overhead was $14,000 greater than the flexible budget amount for the units produced, of which $6,000 was due to fixed factory overhead. In preparing a budget for 2017 Jensen decided to raise the level of operation to 90% of capacity, to manufacture 9,000 units at a budgeted total of 27,000 direct labor hours.
a. Compute variable overhead variances for 2016:
b. Compute fixed overhead variances for 2016:
c. Under the assumption that the total budgeted fixed overhead for 2017 is the same as it was for 2016, what is the standard fixed overhead application rate per direct labor hour for Bluecap Co. for 2017?
d. Must be done in excel and show all work.
In: Accounting
At year-end 2016, Wallace Landscaping’s total assets were $1.5 million and its accounts payable were $395,000. Sales, which in 2016 were $2.0 million, are expected to increase by 30% in 2017. Total assets and accounts payable are proportional to sales, and that relationship will be maintained. Wallace typically uses no current liabilities other than accounts payable. Common stock amounted to $420,000 in 2016, and retained earnings were $260,000. Wallace has arranged to sell $160,000 of new common stock in 2017 to meet some of its financing needs. The remainder of its financing needs will be met by issuing new long-term debt at the end of 2017. (Because the debt is added at the end of the year, there will be no additional interest expense due to the new debt.) Its profit margin on sales is 6%, and 35% of earnings will be paid out as dividends.
What was Wallace's total long-term debt in 2016? Round your
answer to the nearest dollar.
$
What were Wallace's total liabilities in 2016? Round your answer to
the nearest dollar.
$
How much new long-term debt financing will be needed in 2017? (Hint: AFN - New stock = New long-term debt.) Round your answer to the nearest dollar.
In: Finance
ABSORPTION AND VARIABLE (DIRECT) COSTING
Facer Electronics produces high quality cellphone charging cords,
and in the 2016 calendar year, it produced 9000 saleable charging
cords. In the same year, the company achieved sales of 11,000
charging cords, at a per unit sales price of $18. The firm had 3000
cords in stock on 1 January 2016. Facer Electronics uses normal
costing and a standard costing system. Normal volume of production
was the same for the last three years.
Fixed manufacturing overhead costs for the year were budgeted at
$30,000 and these costs were allocated at a rate of $3/charging
cord. Other manufacturing costs were $5 per cord for direct
materials, $3 per cord for direct labour and $2 per cord for other
variable manufacturing costs. Marketing and administration costs
for 2016 amounted to $10,000 in fixed costs, and $2 per cord
sold.
Required:
(a) Prepare an absorption costing income statement for Facer
Electronics for the calendar year of 2016. Assume that there are no
taxes, or price, spending or efficiency variances.
(b) What would be the 2016 profit under the variable (direct)
costing method? Explain why your profit in (a) and (b) are the same
or different.
In: Accounting