In java. I have class ScoreBoard that holds a 2d array of each player's score. COde Bellow
Example:
| Score 1 | score 2 | |
| Player1 | 20 | 21 |
| Player2 | 15 | 32 |
| Player3 | 6 | 7 |
Using the method ScoreIterator so that it returns anonymous object of type ScoreIterator , iterate over all the scores, one by one. Use the next() and hasNext()
public interface ScoreIterator {
int next();
boolean hasNext();
Class ScoreBoard :
import java.util.*;
public class ScoreBoard {
int[][] scores ;
public ScoreBoard (int numOfPlayers, int numOfRounds) {
scores = new int[numOfPlayers][numOfRounds];
Random rand = new Random();
for (int i = 0; i < numOfPlayers; i++) {
for (int j = 0; j < numOfRounds; j++) {
scores [i][j] = 50 + rand.nextInt(51);
}
}
}
public ScoreIterator scoreIterator () {
// return anonymous object of type ScoreIterator
}
public static void main(String[] args) {
ScoreBoard sb = new ScoreBoard (3, 2);
ScoreIterator iterator = sb.ScoreIterator ();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
}
}
}
In: Computer Science
In java. I have class ScoreBoard that holds a 2d array of each player's score. COde Bellow
Example:
| Score 1 | score 2 | |
| Player1 | 20 | 21 |
| Player2 | 15 | 32 |
| Player3 | 6 | 7 |
Using the method ScoreIterator so that it returns anonymous object of type ScoreIterator , iterate over all the scores, one by one. Use the next() and hasNext()
public interface ScoreIterator {
int next();
boolean hasNext();
Class ScoreBoard :
import java.util.*;
public class ScoreBoard {
int[][] scores ;
public ScoreBoard (int numOfPlayers, int numOfRounds) {
scores = new int[numOfPlayers][numOfRounds];
Random rand = new Random();
for (int i = 0; i < numOfPlayers; i++) {
for (int j = 0; j < numOfRounds; j++) {
scores [i][j] = 50 + rand.nextInt(51);
}
}
}
public ScoreIterator scoreIterator () {
// return anonymous object of type ScoreIterator
}
public static void main(String[] args) {
ScoreBoard sb = new ScoreBoard (3, 2);
ScoreIterator iterator = sb.ScoreIterator ();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
}
}
}
In: Computer Science
Java. I have class ScoreBoard that holds a 2d array of each player's score. COde Bellow
Example:
| Score 1 | score 2 | |
| Player1 | 20 | 21 |
| Player2 | 15 | 32 |
| Player3 | 6 | 7 |
Using the method ScoreIterator so that it returns anonymous object of type ScoreIterator , iterate over all the scores, one by one. Use the next() and hasNext()
public interface ScoreIterator {
int next();
boolean hasNext();
Class ScoreBoard :
import java.util.*;
public class ScoreBoard {
int[][] scores ;
public ScoreBoard (int numOfPlayers, int numOfRounds) {
scores = new int[numOfPlayers][numOfRounds];
Random rand = new Random();
for (int i = 0; i < numOfPlayers; i++) {
for (int j = 0; j < numOfRounds; j++) {
scores [i][j] = 50 + rand.nextInt(51);
}
}
}
public ScoreIterator scoreIterator () {
// return anonymous object of type ScoreIterator
}
public static void main(String[] args) {
ScoreBoard sb = new ScoreBoard (3, 2);
ScoreIterator iterator = sb.ScoreIterator ();
while (iterator.hasNext()) {
System.out.println(iterator.next());
}
}
}
}
In: Computer Science
I want to print out the array as well as its intersection, and also it doesn't show the time elapsed after 100,000
Missing is: 1,000,000 and 10,000,000
import java.util.Random;
import java.util.HashSet;
import java.util.Arrays;
public class array_intersect {
public static void main(String[] args)
{
for(int i=1000; i <= 10000000; i= i*10)
{
Integer[] array1 = generate_random_array(i);
Integer[] array2 = generate_random_array(i);
long startTime = System.nanoTime();
get_intersection(array1, array2);
long stopTime = System.nanoTime();
long elapsedTime = stopTime - startTime;
System.out.println("Time elapsed for dataset of " + i + " points :
"+ elapsedTime + " in nanoseconds");
}
}
public static Integer[] generate_random_array(int size)
{
Random rand = new Random();
Integer[] return_array = new Integer[size];
for(int i=0;i< size ; i ++)
{
return_array[i] = rand.nextInt(size);
}
return return_array;
}
public static Integer[] get_intersection(Integer[] array1,
Integer[] array2)
{
HashSet<Integer> set = new HashSet<>();
set.addAll(Arrays.asList(array1));
set.retainAll(Arrays.asList(array2));
Integer[] intersection = {};
intersection = set.toArray(intersection);
return intersection;
}
}
In: Computer Science
SecuriCorp operates a fleet of armored cars that make scheduled pickups and deliveries in the Los Angeles area. The company is implementing an activity-based costing system that has four activity cost pools: Travel, Pickup and Delivery, Customer Service, and Other. The activity measures are miles for the Travel cost pool, number of pickups and deliveries for the Pickup and Delivery cost pool, and number of customers for the Customer Service cost pool. The Other cost pool has no activity measure because it is an organization-sustaining activity. The following costs will be assigned using the activity-based costing system:
| Driver and guard wages | $ | 940,000 |
| Vehicle operating expense | 370,000 | |
| Vehicle depreciation | 250,000 | |
| Customer representative salaries and expenses | 280,000 | |
| Office expenses | 140,000 | |
| Administrative expenses | 440,000 | |
| Total cost | $ | 2,420,000 |
The distribution of resource consumption across the activity cost pools is as follows:
| Travel |
Pickup and Delivery |
Customer Service |
Other | Totals | ||||||
| Driver and guard wages | 50 | % | 35 | % | 10 | % | 5 | % | 100 | % |
| Vehicle operating expense | 70 | % | 5 | % | 0 | % | 25 | % | 100 | % |
| Vehicle depreciation | 60 | % | 15 | % | 0 | % | 25 | % | 100 | % |
| Customer representative salaries and expenses | 0 | % | 0 | % | 90 | % | 10 | % | 100 | % |
| Office expenses | 0 | % | 20 | % | 30 | % | 50 | % | 100 | % |
| Administrative expenses | 0 | % | 5 | % | 60 | % | 35 | % | 100 | % |
Required:
Complete the first stage allocations of costs to activity cost pools.
| Pickup and | Customer | ||||
| Travel | Delivery | Service | Other | Totals | |
| Driver and Guard wages | |||||
| Vehicle operating expense | |||||
| Vehicle Depreciation | |||||
| Customer Representative salaries and expenses | |||||
| Office Expenses | |||||
| Administrative expenses | |||||
| Total Cost |
In: Accounting
SecuriCorp operates a fleet of armored cars that make scheduled pickups and deliveries in the Los Angeles area. The company is implementing an activity-based costing system that has four activity cost pools: Travel, Pickup and Delivery, Customer Service, and Other. The activity measures are miles for the Travel cost pool, number of pickups and deliveries for the Pickup and Delivery cost pool, and number of customers for the Customer Service cost pool. The Other cost pool has no activity measure because it is an organization-sustaining activity. The following costs will be assigned using the activity-based costing system:
| Driver and guard wages | $ | 720,000 |
| Vehicle operating expense | 280,000 | |
| Vehicle depreciation | 120,000 | |
| Customer representative salaries and expenses | 160,000 | |
| Office expenses | 30,000 | |
| Administrative expenses | 320,000 | |
| Total cost | $ | 1,630,000 |
The distribution of resource consumption across the activity cost pools is as follows:
| Travel |
Pickup and Delivery |
Customer Service |
Other | Totals | ||||||
| Driver and guard wages | 50 | % | 35 | % | 10 | % | 5 | % | 100 | % |
| Vehicle operating expense | 70 | % | 5 | % | 0 | % | 25 | % | 100 | % |
| Vehicle depreciation | 60 | % | 15 | % | 0 | % | 25 | % | 100 | % |
| Customer representative salaries and expenses | 0 | % | 0 | % | 90 | % | 10 | % | 100 | % |
| Office expenses | 0 | % | 20 | % | 30 | % | 50 | % | 100 | % |
| Administrative expenses | 0 | % | 5 | % | 60 | % | 35 | % | 100 | % |
Required:
Complete the first stage allocations of costs to activity cost pools.
|
In: Accounting
SecuriCorp operates a fleet of armored cars that make scheduled pickups and deliveries in the Los Angeles area. The company is implementing an activity-based costing system that has four activity cost pools: Travel, Pickup and Delivery, Customer Service, and Other. The activity measures are miles for the Travel cost pool, number of pickups and deliveries for the Pickup and Delivery cost pool, and number of customers for the Customer Service cost pool. The Other cost pool has no activity measure because it is an organization-sustaining activity. The following costs will be assigned using the activity-based costing system:
| Driver and guard wages | $ | 1,040,000 |
| Vehicle operating expense | 470,000 | |
| Vehicle depreciation | 350,000 | |
| Customer representative salaries and expenses | 380,000 | |
| Office expenses | 240,000 | |
| Administrative expenses | 540,000 | |
| Total cost | $ | 3,020,000 |
The distribution of resource consumption across the activity cost pools is as follows:
| Travel | Pickup and Delivery |
Customer Service |
Other | Totals | ||||||
| Driver and guard wages | 50 | % | 35 | % | 10 | % | 5 | % | 100 | % |
| Vehicle operating expense | 70 | % | 5 | % | 0 | % | 25 | % | 100 | % |
| Vehicle depreciation | 60 | % | 15 | % | 0 | % | 25 | % | 100 | % |
| Customer representative salaries and expenses | 0 | % | 0 | % | 90 | % | 10 | % | 100 | % |
| Office expenses | 0 | % | 20 | % | 30 | % | 50 | % | 100 | % |
| Administrative expenses | 0 | % | 5 | % | 60 | % | 35 | % | 100 | % |
Required:
Complete the first stage allocations of costs to activity cost pools.
|
In: Accounting
SecuriCorp operates a fleet of armored cars that make scheduled pickups and deliveries in the Los Angeles area. The company is implementing an activity-based costing system that has four activity cost pools: Travel, Pickup and Delivery, Customer Service, and Other. The activity measures are miles for the Travel cost pool, number of pickups and deliveries for the Pickup and Delivery cost pool, and number of customers for the Customer Service cost pool. The Other cost pool has no activity measure because it is an organization-sustaining activity. The following costs will be assigned using the activity-based costing system:
| Driver and guard wages | $ | 920,000 |
| Vehicle operating expense | 350,000 | |
| Vehicle depreciation | 230,000 | |
| Customer representative salaries and expenses | 260,000 | |
| Office expenses | 120,000 | |
| Administrative expenses | 420,000 | |
| Total cost | $ | 2,300,000 |
The distribution of resource consumption across the activity cost pools is as follows:
| Travel | Pickup and Delivery |
Customer Service |
Other | Totals | ||||||
| Driver and guard wages | 50 | % | 35 | % | 10 | % | 5 | % | 100 | % |
| Vehicle operating expense | 70 | % | 5 | % | 0 | % | 25 | % | 100 | % |
| Vehicle depreciation | 60 | % | 15 | % | 0 | % | 25 | % | 100 | % |
| Customer representative salaries and expenses | 0 | % | 0 | % | 90 | % | 10 | % | 100 | % |
| Office expenses | 0 | % | 20 | % | 30 | % | 50 | % | 100 | % |
| Administrative expenses | 0 | % | 5 | % | 60 | % | 35 | % | 100 | % |
Required:
Complete the first stage allocations of costs to activity cost pools.
|
In: Accounting
compute the statement of cash flows -- compute the amount of cash from operating activities, cash from investing activities, and cash from financing activities.
INCOME STATEMENT, 2018
|
REVENUES |
$1,000 |
|
COGS EXCL. DEPRECIATION |
600 |
|
DEPRECIATION |
100 |
|
EXPENSES |
200 |
|
EBIT |
100 |
|
INTEREST |
50 |
|
EBT |
50 |
|
TAXES @ 40% |
20 |
|
NET INCOME |
30 |
BALANCE SHEETS
|
12/31/17 |
12/31/18 |
|
CASH $100 |
CASH $280 |
|
A/R 50 |
A/R 100 |
|
INVENTORIES 90 |
INVENTORIES 150 |
|
CURRENT ASSETS 240 |
CURRENT ASSETS 530 |
|
GROSS PP&E 1,000 |
GROSS PP&E 1,000 |
|
- ACCUM. DEPRE. 300 |
- ACCUM. DEPRE 400 |
|
NET PP&E 700 |
NET PP&E 600 |
|
TOTAL ASSETS 940 |
TOTAL ASSETS 1,130 |
|
A/P 40 |
A/P 50 |
|
ACCRUALS 50 |
ACCRUALS 50 |
|
ST DEBT 50 |
ST DEBT 100 |
|
CURRENT LIAB. 140 |
CURRENT LIAB. 200 |
|
LONG TERM DEBT 400 |
LONG TERM DEBT 500 |
|
TOTAL LIAB. 540 |
TOTAL LIAB 700 |
|
TOTAL EQUITY 400 |
TOTAL EQUITY 430 |
|
TOTAL LIAB.+EQ. 940 |
TOTAL LIAB.+EQ. 1,130 |
|
TOTAL COMMON SH. 200 |
TOTAL COMMON SH. 200 |
CURRENT PRICE/SHARE = $10
In: Finance
This company uses a perpetual inventory system. It had the following beginning inventory and current year purchases of its product.
Jan 1. Beginning Inventory ..... 50 units @ $100 = $5,000
Jan 14. Purchase .......................150 units @ $120 = 18,000
Apr 30. Purchase........................ 200 units @ $150= 30,000
Sept 26th. Purchase................... 300 units @ $200= 60,000
The company transacted sales on the following dates at $350 per unit sales price.
Jan 10. 30 units (specific cost: 30 @ $100)
Feb 15. 100 units (specific cost: 100 @ $120)
Oct 5. 350 units (specific cost: 100 @ $150 and 250 @ $200)
USING (THE WEIGHTED AVERAGE COSTING METHOD) ANSWER THE FOLLOWING QUESTIONS:
A. Identify and compute the costs to assign to the units sold. (Round per unit costs to three decimals.)
B. Identify and compute the costs to assign to the units in ending inventory. (Round inventory balances toe the dollar)
C. How likely is it that the Weighted Average method will reflect the actual physical flow of goods? How relevant is that factor in determining wether this is an acceptable method to use?
D. What is the impact of this method versus others in determining net income and income taxes?
E. How closely does the ending inventory amount reflect replacement cost?
In: Accounting