Create an array to hold four account objects

Assignment Help JAVA Programming
Reference no: EM13809571

Program 1:

1. Add an instance method called transferTo to the Account class we discussed-

a. The transferTo method should transfer a specified amount of money to another bank account if there is enough balance. In this case, a successful tranerring message is returned. Otherwise (i.e., no enough balance), the transferring request should be denied and return a warning message to the caller.

b. Hence the method should accept two parameters: the destination bank account and the amount for transfer.

c. The transferTo method should return a stringback to the caller: "Transferred Successfully: $amount!" or "Transferred failure: no enough balance!".

2. Write Mybank class in Mybank.java

a. Create an array to hold four Account objects

b. For each account, randomly set the balance in the range of $0-$1000.00; print out the balance of each account

c. Transfer a random amount in the range of ($0-$100.00) from the 1st account to 2nd account; printout transferring results and their remaining balance.

d. Transfer a random amount in the range of ($0-$300.00) from the 3rd account to 4th account; printout transferring results and their remaining balance.

Program 2:

Write a program called Print2DArray.java which will ask the user to enter the number of rows and the number of column for a 2-dimention array. Then the program generates an integer number in the range of [0, 10000] for each element of the array.

1. Print the header including your name and panther ID; print a blank line after the header;

2. Print the 2-dimention array and each column is center-aligned;

3. Print out a blank line followed by the maximum, average and minimum values of the 2-dimention array.

Reference no: EM13809571

Questions Cloud

What must the expected return on this stock be : A stock has a beta of 1.25, the expected return on the market is 12 percent, and the risk-free rate is 2 percent. What must the expected return on this stock be?
Compare the movie duck and cover to the threat of terrorism : Write a 300- to 350-word paper in which you consider what it would have been like to live under the threat of nuclear war. Compare the movie "Duck and Cover" to the threat of terrorism. What are the similarities?
Calculate depreciation for each year-after-tax salvage value : Geary Machine Shop is considering a four-year project to improve its production efficiency. Buying a new machine press for $681,600 is estimated to result in $227,200 in annual pretax cost savings. Calculate the depreciation for each year and use to ..
Theories of poverty discussion : Theories of Poverty Discussion
Create an array to hold four account objects : Write Mybank class in Mybank.java. Create an array to hold four Account objects. For each account, randomly set the balance in the range of $0-$1000.00; print out the balance of each account
Calculate all other cash flows except : Alson needs someone to supply it with 120,000 cartons of machine screws per year to support its manufacturing needs over the next 7 years, and you've decided to bid on the contract. Calculate all other cash flows except the OCF related to the contrac..
Identify each type of energy source : Identify each type of energy source and its relative abundance and environmental impact.
Sharing information across groups : The planning for the community building session is almost complete. The last details are how to conduct the plenary sessions for sharing information across groups to develop key priorities and themes that will need to be addressed.
Write a summary of the video four women of egypt : Write a summary of the video "Four Women of Egypt".

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd