Questions
You must program the game called MaDi which is described below. There is a board of...

You must program the game called MaDi which is described below. There is a board of NxN (the size N is defined by the user and must be a number greater than or equal to 2), where in each box there is an instruction. The first (the [0] [0]) and the last box (the [N-1] [N-1]) have no instruction. Possible instructions are:
1. Don't move
2. Advance 4 places
3. Jump to the next row
4. Go back 2 places
5. It exploded! End of the game.
In order to facilitate the visualization of the matrix for the player, the instruction number will be displayed on the board and below it the list of instructions with their numbering.
Instructions:
1. Don't move
2. Advance 4 places
3. Jump to the next row
4. Go back 2 places
5. Bomb! Exploded.
The instruction that goes in each square of the board will be assigned randomly each time the game starts.
The player starts with his chip in the first position (row: 0, column: 0) and (bottom-right corner). On each turn the player rolls a die that will tell him how many spaces to advance. You advance across the board from left to right and from top to bottom as follows:
On each turn the player rolls a dice that tells him how many positions on the board to advance. After advancing, he must execute what is indicated in the instruction of the box where he fell. For each turn, only execute one instruction on the board. The player has a maximum number of rolls of the dice, which will be asked to the player when starting the game.
The game is lost if the dice are thrown without having reached the goal or if the product of rolling the dice advances to a square with a bomb. The game is won if you reach the goal (it does not have to be by exact count) before the roll of the dice runs out.

In: Computer Science

The last digit of a credit card number is the check digit, which protects againts transaction...

The last digit of a credit card number is the check digit, which protects againts transaction errors. The following method is used to veryfy credit card numbers. For the simplicity we can assume that the credit card has 8 digits instead of 16. Follwing steps explains the algorithm in determining if a credit card number is a valid card.  Starting from the right most digit, form the sum of every other digit. For example, if the credit card is number is 43589795 then you form the sum 5+7+8+3 = 23 2  Double each digit that we have not included in the preceding step. Add all digits of resulting numbers. For example, with the number given above, doubling the digits starting with next to last one, yields 18, 18, 10, 8. Adding all digits in these values yield 1+8+1+8+1+0+8 = 27  Add sum of the two preceding steps. If the last digit of the result is zero, then the number is valid number Write a Java program that implements this algorithm (Designing your solution and perhaps wring the algorithm in pseudocode might be helpful). Your program should ask the user 8 digit credit card number and the printout if the credit card is valid or invalid card Grading Criteria: a) The correctness of your program/solution b) Variable naming (self describing) c) Identification of proper data type and constants (if applicable) d) Appropriate commenting and Indentation.

In: Computer Science

Write a java program The last digit of a credit card number is the check digit,...

Write a java program

The last digit of a credit card number is the check digit, which protects againts transaction errors. The following method is used to veryfy credit card numbers. For the simplicity we can assume that the credit card has 8 digits instead of 16. Follwing steps explains the algorithm in determining if a credit card number is a valid card.

 Starting from the right most digit, form the sum of every other digit. For example, if the credit card is number is 43589795 then you form the sum 5+7+8+3 = 23

1

  •  Double each digit that we have not included in the preceding step. Add all digits of resulting numbers. For example, with the number given above, doubling the digits starting with next to last one, yields 18, 18, 10, 8. Adding all digits in these values yield 1+8+1+8+1+0+8 = 27

  •  Add sum of the two preceding steps. If the last digit of the result is zero, then the number is valid number

    Write a Java program that implements this algorithm (Designing your solution and perhaps wring the algorithm in pseudocode might be helpful). Your program should ask the user 8 digit credit card number and the printout if the credit card is valid or invalid card

    Grading Criteria:

    a) The correctness of your program/solution
    b) Variable naming (self describing)
    c) Identification of proper data type and constants (if applicable) d) Appropriate commenting and Indentation.

NOTE: the given card number 43589795 should produce a valid number

In: Computer Science

Michelangelo Shoes was founded by Buonarroti Simoni in 1996 and has grown steadily over the years....

Michelangelo Shoes was founded by Buonarroti Simoni in 1996 and has grown steadily over the years. Buonarroti Simoni now has 23 stores located throughout the Southern and Eastern parts of Australia. Buonarroti Simoni, born of migrant Italian parents, was an accounting major in college but loved high fashion shoes for men and women. He worked for a large regional CPA firm for 13 years prior to opening his first shoe store. He places a lot of value on internal controls. Further, he has always insisted on a state-of-the art accounting system that connects all of his stores’ financial transactions and reports. Buonarroti Simoni employs two internal auditors who monitor internal controls and also seek ways to improve operational effectiveness. As part of the monitoring process, the internal auditors take turns conducting periodic reviews of the accounting records. For instance, the company takes a physical inventory at all stores once each year, and an internal auditor oversees the process. Chris Chen, the most senior internal auditor, just completed a review of the accounting records and discovered several items of concern. These were: Physical inventory counts varied from inventory book amounts by more than 5% at two of the stores. In both cases, physical inventory was lower. Two of the stores seem to have an unusually high amount of sales returns for cash. In 10 of the stores gross profit has dropped significantly from the same time last year. At four of the stores, bank deposit slips did not match cash receipts. One of the stores had an unusual number of bounced cheques. It appeared that the same employee was responsible for approving each of the bounced cheques. In seven of the stores, the amount of petty cash on hand did not correspond to the amount in the petty cash account. Requirements For each of these concerns, identify a risk that may have created the problem. Recommend an internal control procedure to prevent the problem in the future. PLEASE PROVIDE ANSWER IN DETAIL AS IT IS REQUIRED FOR EXAM PREPARATION

In: Accounting

A 20 year loan of $120, 000 at i = 6% is paid off by paying...

A 20 year loan of $120, 000 at i = 6% is paid off by paying 130% of each year’s interest at the end of each year for the first 12 years, and then for the next 8 years pay off the loan by paying off constant principle at the end of each year. Find the value of the last payment.

In: Accounting

Exercise 1: probability Concepts Part one: Contingency table and Probability rules A study on speeding violation...

Exercise 1: probability Concepts

Part one: Contingency table and Probability rules

A study on speeding violation and driver age produced the following contingency table.

        Speeding

Age

speeding violation

last year

No speeding violation

last year

20 -29

95

70

30 -39

101

97

40 -49

70

85

50 -59

45

90

60 -69

19

103

  1. Does it appear that being 60 years of age or more and speed violating are mutually exclusive events? Explain your reasoning

If a driver is selected at random from this sample, find the following probabilities:

Round your answers to 3 decimals

  1. The driver had a speeding violation in the last year
  2. The driver age is less than 50 years
  3. The driver is aged between 30 to 39 and had speeding violation last year
  4. The driver had no speeding violation last year or is aged between 60 to 69 years
  5. The driver had a speeding violation if he is aged between 20 to 29 years
  6. The driver had a speeding violation if he is more than 49 years of age.
  7. Does it appear that speed violation is independent from age group for this sample of drivers? Explain your reasoning

Part two: Classical probabilities, counting rules and probabilities

1. A fair coin and then a die with 6 sides are tosses find the probabilities of the six events occurring respectively

  1. P(Tails)          
  2. P(3)                               
  3. P(tails and 3)                
  4. P(tails | 3)                  
  5. P(3 | tails)                       
  6. P(4 or a 5)                      

2. An urn contains 5 white ,4 black and 3 red marbles. If 3 marbles are selected from this urn.

Find the probability that at least one of the 3 marbles is black

In: Statistics and Probability

There are two firms in an industry with demand P=130-Q. Both firms have a constant marginal...

There are two firms in an industry with demand P=130-Q. Both firms have a constant marginal cost of production equal to $40.

a) If there are no fixed costs what will be the Cournot equilibrium levels of output for each firm?

(b) In part a), what is the market price and the profit for each individual firm?

(c) If the fixed cost is instead $1300 for each firm and there is entry and exit in the market, how many firms will be in the market, and what is the industry level of output?

In: Economics

Match the letter corresponding to one of the basic elements of accounting to each of the...

Match the letter corresponding to one of the basic elements of accounting to each of the accounts below:

A = Asset​​L = Liability​​OE = Owner's Equity

​1. Rent Expense​​__________​​​6. Cash​​​__________

2. Office Equipment​__________​​​7. Insurance Expense​__________

3. Accounts Payable​__________​​​8. Owner’sWithdrawals​__________

4. Owner’s Capital​​__________​​​9. Service Revenue​__________

5. Accounts Receivable​__________​​​10.Prepaid Insurance​__________

For the accounts listed below, indicate if the normal balance of the account is a debit (DR) or a credit (CR).

1. Service Revenue​__________​​​6. Office Supplies​​__________

2. Rent Expense​​__________​​​7. Insurance Expense​__________

3. Accounts Receivable​__________​​​8. Owner’s Capital​​__________

4. Accounts Payable​__________​​​9. Office Building​​__________

5. Owner’s Withdrawals​__________​​​10. Notes Payable​​__________

In: Accounting

If the government persistently runs a budget deficit, government debt will rise. If this debt rises faster than GDP, then it will account for a growing proportion of GDP.

If the government persistently runs a budget deficit, government debt will rise. If this debt rises faster than GDP, then it will account for a growing proportion of GDP. There is then likely to be an increasing problem of ‘servicing’ this debt, i.e. paying the interest on it. What effects will government investment expenditure have on general government deficits in the short run and in the long run


In: Economics

Creation of the FDIC encouraged reluctant depositors to put their money into the banking system. a)...

Creation of the FDIC encouraged reluctant depositors to put their money into the banking system.

a) Aside from the benefit of reducing the probability of bank runs, what other positive impact has this policy had in the performance of the overall economy?

b) How could higher deposit insurance premiums for banks with riskier assets benefit the economy?

In: Accounting