Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please Help!! I need a program in JAVA made in multidimensional array and also w

ID: 3552812 • Letter: P

Question





Please Help!! I need a program in JAVA made in multidimensional array and also well commented line by line please.


Thanks!

Banks lend money to each other. In tough economic times, if a bank goes bankrupt, it may not be able to pay back the loan. A bank's total assets are its current balance plus its loans to other banks. Figure 1 is a diagram that shows five banks. The banks 'current balances are 25,125,175, 75, and 181 million dollars, respectively. The directed edge from node 1 to node 2 indicates that bank 1 lends 40 million dollars to bank 2. If a bank's total assets are under a certain limit, the bank is unsafe. The money it borrowed cannot be returned to the lender, and the lender cannot count the loan in its total assets. Consequently, the lender may also be unsafe, if its total assets are under limit. Design (Flow chart) and implement (Write a program) to find all unsafe banks. Your program reads the inputs as follows. It reads two integers n and limit, where n indicates number of banks and limit is the minimum total of assets for keeping a bank safe. It then reads n lines that describe the information for n banks with id 0 to n-1. The first number in the line is the bank's balance, the second number indicates the number of banks borrowed money from the bank, and the rest are pairs of two numbers. Each pair describes a borrower. The first number in the pair is the borrower's id and the second is the amount borrowed. For example, the input for the five banks in figure 1 is as follows The total assets of bank 3 are (75+125). which is the number 201. So bank 3 is unsafe. After bank 3 becomes unsafe, the total assets of bank 1 fall below (125-40). So, bank 1 is also unsafe. The output of the program should be Unsafe banks are 3 1

Explanation / Answer

Find the same here : http://ideone.com/u4RM4P