Menu

(Solved) : Part1 Requirement Create Application Use Different Types Hashed Data Structures Manage Ban Q32729718 . . .

PART1 Requirement

Create an application that can use different types of HashedData Structures to manage bank customers.
Class BankCustomers that includes customer id (String, should be SSnumber), lastname(String), firstname(String), user name(String),password(String), address (String)

Also, beside the constructors, the class BankCustomer shouldhave some methods, for example, toString to print out theinformation of a bankCustomer and method writeToFile to write theinformation of a BankCustomer to output file, deepCopy, and methodcompareTo. Etc.

First, display the menu to allow users to select the type ofdata structure to work:

1.LQHashed Data structure

2.Java Hashtable data structure

0. Exit

After select a type of data structure:

First, open and read the file customerInfo.txtFor each line, split information,

create the object of class BankCustomer then insert to the datastructure until the end of the file.
Showing all nodes to verify all bank customers are placed into thedate structure.

Next, provide the menu to allow users to select the followingtasks. After finishing each task, re-display the menu to allow userto continue using the application:

1.Insert Customer

2.Fetch

3.Verify Encapsulation

4.Update

5.Delete

6.Show all

0. Exit

INSERT

-Allow users to enter the information of a bank customer fromthe keyboard -Create the object then insert to the datastructure

FETCH

-Allow users to type customer id then search in the datastructure for looking for the bank customer. If it is found, printout the information on the screen otherwise display the message:“The bank customer cannot be found”

ENCAPSULATION

-Allow users to type a customer id from the keyboard. Search inthe data structure to have the object named temp1. If the bankcustomer is found, ask for new information of customer such asaddress from the keyboard and then change the address of temp1.-Fetch with the customer id to node temp2 with the same id oftemp1. Then compare the address of the temp1 and temp2.

If both the address or phone numbers of are the same thendisplay the message “Java Hashtable is not encapsulated” OR“LQHashed data structure is not encapsulated” otherwise display themessage “Java Hashtable is encapsulated” OR “LQHashed datastructure is encapsulated”

UPDATE

Display the message to ask users to enter the customer id. Usingthe customer id to fetch the account from the data structure toobject temp3. Asking users to enter one new information from thekeyboard then change the this new information of temp3 Update thedata structure with the temp3 with customer id as the same customerid of temp3.

Display the message to see if update successfully or not

DELETE

Display the message to ask users to enter the customer id.Remove the node with the entered id
Display the message to see if delete successfully or not

SHOW ALL

Display all the bank customers are currently stored in the datastructure

Exit program

When users choose to exit the program, open the filecandidateInfo.txt to write. Then write all the nodes stored in thedata structure to the file candidateInfo.txt
Close file

Expert Answer


Answer to Part1 Requirement Create Application Use Different Types Hashed Data Structures Manage Ban Q32729718 . . .

OR