Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

for java- use 2nd ArrayList method sheet ArrayLists - discovery - sheet DC Using the Account class - form class - complete the following exercises:

for java- use 2nd ArrayList method sheet

image text in transcribedimage text in transcribed

ArrayLists - discovery - sheet DC Using the Account class - form class - complete the following exercises: (complete these within a main() method) 1. Create an ArrayList reference - myBank - which will manage Accounts. a. Be sure you import the necessary code for ArrayLists 2. Add the following Accounts: a. tom, 344 b. jane, 88 c. mike, 82 3. Print the number of Accounts in your bank - with an appropriate message (ex:We have ## Accounts currently in the bank.") 4. Add the following 2 Accounts: a. ellen, 879 b. joe, 99 5. Print the state of your Bank now. (Place a space and message below the Bank's state.) 6. Deposit 12 into jane's Account 7. Withdraw 33 from mike's Account 8. Place a new Account - gaga, 522 - between jane and mike's Accounts. 9. Print the state 10. Find and print the sum of all the Account balances. 11. Add the following Accounts - in the indicated location(s): a. alan, 34 last b. sarah, 77 - second c. toni, 104 - 4th slot 12. Deduct 42 from all Accounts with balances > 170 a. Count and print how many Accounts were affected 13. Print the status of the first 4 Accounts 14. Delete sarah's account 15. Find the average account balance 16. Add slow, 337 17. Add michelle, 625 18. Deposit 12 into all accounts under 200 19. How many accounts have a balance greater than 120 20. Add elliot, 33 21. Add stephanie, 992 22. Place hunter 552 into the 3rd position 23. Replace toni's account - with sabrina, 43 24. Add lee, 24 after toni's Account 25. Print the final status of the bank ... ArrayList Methods .. Function Instruction add .add( ) // obj added at the end of List insert .add( index #, ) // index # starts at 0 replace .set( index #, ) delete .remove( index #) ** get .get( index #) access obj data, methods ** .clear() clear all objects return # .size() of objs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

2nd Edition

0470624701, 978-0470624708

More Books

Students also viewed these Databases questions

Question

Understand how to design effective service guarantees.

Answered: 1 week ago

Question

Know when firms should not offer service guarantees.

Answered: 1 week ago