Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java - oop Create the an application that can use different types of Linked List to manage either Checking Account or Saving Account. The application

Java - oop

Create the an application that can use different types of Linked List to manage either Checking Account or Saving Account. The application should allow users can select the type of Linked List to work on. After finishing one, users can select to work with other type of Linked List until they want to exit 1. Singly Linked List 2. Singly Linked List with Iterator 3. Java Linked List with Iterator You can re-use the class Account_yourLastName, CheckingAccount_yourLastName and SavingAccount_yourLastName FOR SINGLY LINKED LIST DO THE FOLLOWING TASKS: Create a Singly Linked List then allow users to do the following tasks: 1. Insert account 2. Read account 3. Verify Encapsulation 4. Close account 5. Delete account 6. Show all accounts 0. Exit After finishing one task, the program should re-display the menu to allow users to continue to do other tasks until they want to exit Insert Account -display message to ask users to enter all the information that needs to create either a Checking account or Saving account -Insert that account to the Singly Linked List. -Check if Insert returns true, display message The account is open -If insert returns false, display message: Cannot open this account Read Account Allow users to enter the account number to look for the Checking Account or Saving Account. - If the Singly Linked List is empty, display the message: There is no node in the Singly Linked List - If the account cannot be found, display the message: Account cannot be found - If the it is found, display the information of the chekcing account or saving account found VERIFY UNCAPSULATION -ask for information of either a Checking account or Saving account named temp1 -insert account temp1 to the Singly Linked List -Change the address or one filed of account temp1 -fetch one account from Singly Linked List with the same account number of temp1 to the variable temp2 -compare the address of temp1 and temp2 (or the field you have change on temp1) Liem Le | COSC2435 #3 * if both address are the same: display the message: Singly Lnked List is not encapsulated * If their addresses are different, display the message: Singly Linked Lst is encapsulateded UPDATE -ask for information of either a Checking account or Saving account named temp -insert account temp to the Singly Linked List -Change the address or one filed of account temp -Update temp to the Singly Linked List -Check if update returns true, display message Update successfully -if update returns false, display message Update Not successfully DELETE - allow users to enter the account number of the account that they want to delete Delete the account with the id. -Check if delete returns true, display message Account is closed -If delete returns false, display message Delete account failed SHOW ALL -show all accounts in the Singly Linked list FOR SINGLY LINKED LIST WITH ITERATOR Create a Singly Linked List with Iterator then do the following steps: INSERT -Allow users to insert 5 accounts (either Checking Account or Saving Account) to the Singly Linked List with Iterator SHOW ALL -show all 5 accounts in the Singly Linked List with Iterator DELETE -move iterator to delete the third account in the Singly Linked List with Iterator -show all accounts to verify the account is deleted FOR THE JAVA LinkedList Create a java LinkedList then do the following steps: INSERT -Allow users to insert 5 accounts (either Checking Account or Saving Account) to the Singly Linked List with Iterator FETCH -Fetch two first accounts in the Java LinkedList UPDATE -fetch the node at the current location of iterator to variable temp -change the address or a field of account temp -update the account at the current location with new temp -check if update returns true, display message Account is updated -if update returns false, display message: Update failed SHOW ALL -show all the LinkedList to see all accounts

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

2nd Edition

1597499471, 978-1597499477

More Books

Students also viewed these Databases questions