You are to write a program name Bank.java that maintains a list of records containing names and balance of customers. The program will prompt the user for a command, execute the command, then prompt the user for another command. The commands must be chosen from the following possibilities:
a Show all records
r Remove the current record
f Change the first name in the current record
l Change the last name in the current record
n Add a new record
d Add a deposit to the current record
w Make a withdrawal from the current record
q Quit
s Select a record from the record list to become the current record
The following example illustrates the behavior of each command (user input is in bold)
c:\java Bank [enter]
A Program to keep a Bank Record:
a Show all records
r Remove the current record
f Change the first name in the current record
l Change the last name in the current record
n Add a new record
d Add a deposit to the current record
w Make a withdrawal from the current record
q Quit
s Select a record from the record list to become the current record
Enter a command from the list above (q to quit): a
No records exist!!
a Show all records
r Remove the current record
f Change the first name in the current record
l Change the last name in the current record
n Add a new record
d Add a deposit to the current record
w Make a withdrawal from the current record
q Quit
s Select a record from the record list to become the current record
Enter a command from the list above (q to quit): n
Enter first name: Barry
Enter last name: Drake
Enter the balance amount: 1000
Current record is: Barry Drake $1000.00
a Show all records
r Remove the current record
f Change the first name in the current record
l Change the last name in the current record
n Add a new record
d Add a deposit to the current record
w Make a withdrawal from the current record
q Quit
s Select a record from the record list to become the new current record
Enter a command from the list above (q to quit): n
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): a
Enter first name: Ada
Enter last name: Caswell
Current record is: Ada Caswell
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): a
First Name Last Name Current balance
------------- ------------- ------------------
Ada Caswell $0.00
Barry Drake $1000.00
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): n
Enter first name: Elwood
Enter last name: Havens
Current record is: Elwood Havens
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): a
First Name Last Name Current Balance
------------- ------------- ------------------
Ada Caswell $0.00
Barry Drake $1000.00
Elwood Havens $0.00
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit):
f
Enter new first name: Jake
Current record is: Jake Havens
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): s
Enter first name: Carl
Enter last name: Patton
No matching record found.
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): s
Enter first name: Barry
Enter last name: Drake
Current record is: Barry Drake
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): r
Deleted: Barry Drake
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit):
a
First Name Last Name Current Balance
------------- ------------- ------------------
Ada Caswell $0.00
Elwood Havens $0.00
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): s
Enter first name: Ada
Enter last name: Caswell
Current record is: Ada Caswell
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): d
Enter the deposited amount: 1000.00
Current record is: Ada Caswell with 1000.00 added to deposit
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): a
First Name Last Name Current Balance
------------- ------------- ------------------
Ada Caswell $1000.00
Elwood Havens $0.00
MENU DISPLAYED AGAIN
Enter a command from the list above (q to quit): q
The output of your program must match the format illustrated in this example.
Here are some other additional requirements for this program:
After a deletion, there is no record currently selected
Each record (first name, last name and balance) must be stored as an object. These objects must be stored in a Linked List.
The Linked List must be kept sorted at all times based on last name. Sorting is to be achieved when an insertion or modification is done. NO SORTING ROUTINE IS ALLOWED. ALWAYS INSERT A NEW RECORD OR EDITED RECORD INTO ITS' CORRECT PLACE IN THE LINKED LIST. Note: Changing the last name will require resorting.
Use as many generic algorithm as you can.
We need at least 10 more requests to produce the answer.
0 / 10 have requested this problem solution
The more requests, the faster the answer.
You are to write a program name Bank.java that maintains a list of records containing names...
1. Write a program to input a list of names (strings) from the user and store them in an ArrayList. The input can be terminated by entering the empty string or by entering the string “quit”. 2. Add further functionality to your program so that it searches the ArrayList to find the first string and the last string according to dictionary ordering and then prints out these strings (names). Do this exercise without sorting the names in the ArrayList. For...
Assignment Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It should work something like this (user input highlighted in blue): Array size: 0, capacity: 2 MENU A Add a student D Delete a student L List all students Q Quit ...your choice: a[ENTER] Enter the student name to add: Jonas-Gunnar Iversen[ENTER] Array size: 1, capacity: 2 MENU A Add a student D Delete a student L List all students...
Write a menu-driven C++ program to manage a class roster of student names that can grow and shrink dynamically. It should work something like this (user input highlighted in blue): Array size: 0, capacity: 2 MENU A Add a student D Delete a student L List all students Q Quit ...your choice: a[ENTER] Enter the student name to add: Jonas-Gunnar Iversen[ENTER] Array size: 1, capacity: 2 MENU A Add a student D Delete a student L List all students Q...
Create a java program that reads an input file named Friends.txt containing a list 4 names (create this file using Notepad) and builds an ArrayList with them. Use sout<tab> to display a menu asking the user what they want to do: 1. Add a new name 2. Change a name 3. Delete a name 4. Print the list or 5. Quit When the user selects Quit your app creates a new friends.txt output file. Use methods: main( ) shouldn’t do...
in java Complete Program that simulates a login procedure. The program reads a list of names, email addresses and passwords from a file p3.txt. Store the information in parallel array lists names, emails and passwords. Your program will prompt the user for their email address. If the email is not in the system, prompt the user to try again. Provide the option to quit. If the email is found in the system, prompt the user to enter their password. After...
Write a program that prompts the user to enter a list of names. Each person's name is separated from the next by a semi-colon and a space (: and the names are entered lastName, firstName (i.e. separated by ',). Your program should then print out the names, one per line, with the first names first followed by the last names. A sample run of your program should look like Please enter your list of names: Epstein, Susan; St. John, Katherine;...
C++ program Write a C++ program to manage a hospital system, the system mainly uses file handling to perform basic operations like how to add, edit, search, and delete record. Write the following functions: 1. hospital_menu: This function will display the following menu and prompt the user to enter her/his option. The system will keep showing the menu repeatedly until the user selects option 'e' from the menu. Arkansas Children Hospital a. Add new patient record b. Search record c....
Write a program in C++: Using classes, design an online address book to keep track of the names first and last, addresses, phone numbers, and dates of birth. The menu driven program should perform the following operations: Load the data into the address book from a file Write the data in the address book to a file Search for a person by last name or phone number (one function to do both) Add a new entry to the address book...
Write a program in Java, Python and Lisp When the program first launches, there is a menu which allows the user to select one of the following five options: 1.) Add a guest 2.) Add a room 3.) Add a booking 4.) View bookings 5.) Quit The functionality of these options is as follows: 1.) When users add a guest they provide a name which is stored in some manner of array or list. Guests are assigned a unique ID...
Please help!! (C++ PROGRAM) You will design an online contact list to keep track of names and phone numbers. · a. Define a class contactList that can store a name and up to 3 phone numbers (use an array for the phone numbers). Use constructors to automatically initialize the member variables. b.Add the following operations to your program: i. Add a new contact. Ask the user to enter the name and up to 3 phone numbers. ii. Delete a contact...