Programming Instructions:
Using Java Object Oriented Principles, write a program which produces the code as indicated in the following specifications:
Your program must be a console application that provides a user this exact menu:
Please select one of the following:
1: Add Client to Bank
2: Display Clients in the Bank
3: Set Bank Name
4: Search for a Client
5: Exit
Enter your Selection: <keyboard input here>
The menu must be displayed repeatedly until 5 is selected.
If the user enters an invalid menu choice, you must display the error "Unsupported choice" and display the menu again.
When the user selects menu item 1:
The program will read data from the keyboard to create a new Client and add it to the Bank, the user will be asked to input as follows:
Please Enter the Client's Name: <keyboard input here>
Please Enter the Client Number: <keyboard input here>
Please Enter the Client's Balance: <keyboard input here>
If invalid input is encountered, the error message "Incorrect format" must be displayed and input is terminated, the client is not created nor added to the Bank. The menu should then be displayed again.
The client list must remain in sorted order by Client Number, you may use the Collection class methods or do this manually. The more efficient you are, the higher your mark. Use a comparator to sort.
You are able to create a get method for clientNumber if you deem this necessary.
When the user selects menu item 2:
The program will display the following information:
Bank Information:
Name: <display business name here>
Client List:
Client #: <client number>, Name: <client name>, Balance: $<balance>
Client #: <client number>, Name: <client name>, Balance: $<balance>
Client #: <client number>, Name: <client name>, Balance: $<balance>
...
If no Bank name is set yet, "Unknown" must be displayed
If no clients are added to the Bank yet, "No Clients in Bank" must be displayed
When the user selects menu item 3:
The program will read data from the keyboard to set the name of the bank, the user will be asked to input as follows:
Please Enter the Bank's Name: <keyboard input here>
Consider any non-blank input a valid name.
When the user selects menu item 4:
The program will read data from the keyboard to search for a client given the client number, the user will be asked to input as follows:
Please Enter the Client Number to Search for: <keyboard input here>
If invalid input is entered, the error message "Incorrect format" must be displayed and no search is performed. The main menu must be displayed.
The search should be performed using the most efficient search you know, you are able to use Collection class methods or create your own.
If the search does not succeed, the message "Client not found in Bank" must be displayed.
If the search succeeds, the following message should be displayed where index is filled in with the zero based index where the client is stored in the Client List:
Client found at index <index>
Client #: <client number>, Name: <client name>, Balance: $<balance>
o When the user selects menu item 5:
§ The program must display the message "Exiting..." and then terminate/end the program.
Sample Output: green is user input
Please select one of the following:
1: Add Client to Bank
2: Display Clients in the Bank
3: Set Bank Name
4: Search for a Client
5: Exit
Enter your Selection: 2
Bank Information:
Name: Unknown
Client List:
No Clients in Bank
Please select one of the following:
1: Add Client to Bank
2: Display Clients in the Bank
3: Set Bank Name
4: Search for a Client
5: Exit
Enter your Selection: 1
Please Enter the Client's Name: James Lancen
Please Enter the Client Number: 112233
Please Enter the Client's Balance: $1
We need at least 9 more requests to produce the answer.
1 / 10 have requested this problem solution
The more requests, the faster the answer.
Write a contacts database program that presents the user with a menu that allows the user to select between the following options: (In Java) Save a contact. Search for a contact. Print all contacts out to the screen. Quit If the user selects the first option, the user is prompted to enter a person's name and phone number which will get saved at the end of a file named contacts.txt. If the user selects the second option, the program prompts...
JAVA PLEASE Create a class called Account with the following instance data Integer id Double balance Provides the following methods Default constructor (defaults balance to 100) Constructor with parameters for the ID and the starting balance Accessor and mutator methods for id and balance Method to perform a withdrawal Method to perform a deposit Create a class called Bank which has an array of Account objects. This class will manage the accounts. It must provide methods Do withdrawal Do deposits...
I have to use java programs using netbeans. this
course is introduction to java programming so i have to write it in
a simple way using till chapter 6 (arrays) you can use (loops ,
methods , arrays)
You will implement a menu-based system for Hangman Game. Hangman is a popular game that allows one player to choose a word and another player to guess it one letter at a time. Implement your system to perform the following tasks: Design...
Please make a JAVA program for the following using switch structures Write a program that simulates a simple Calculator program. The program will display menu choices to the user to Add, Subtract, Multiply and Divide. The program will prompt the user to make a selection from the choices and get their choice into the program. The program will use a nested if….else (selection control structure) to determine the user’s menu choice. Prompt the user to enter two numbers, perform the...
Create a menu-driven program (using the switch) that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1 -- rectangle 2 -- circle 3 -- triangle 4 -- quit If the user selects choice 1, the program should find the area of a rectangle. rectangle area = length * width If the user selects choice 2, the program should find the area of a circle. circle area = PI * radius * radius...
This should be programmed in C LANGUAGE! This lab requires you to use arrays, loop structures and if statements/switch statements. You must use functions where indicated. Test your program often - make sure each bit of functionality works before you continue. In this problem, we want to create a song and play it as we build it. The way we do this is by using arrays to store different notes. Notes are just tones that run for a specific amount...
In C++ 1. Write a program that allows a user to enter 10 integer values from the keyboard. The values should be stored in an array. 2. The program should then ask the user for a number to search for in the array: The program should use a binary search to determine if the number exists in a list of values that are stored in an array (from Step #1). If the user enters a number that is in the...
1- TigerOne Bank is a local bank that intends to install a new automated teller machine (ATM) to allow its customers to perform basic financial transactions. Using the ATM machine users should be able to view their account balance, withdraw cash and deposit funds. The bank wants you to develop the software application that will be installed on the new ATM machines. The following are the requirements for the application: Users are uniquely identified by an account number and...
Write a menu driven program to demonstrate the use of array and switch. It must be written in C language . Here is the menu - Press 1 to add a number to the array. Press 2 to display the numbers entered in the array so far Press 3 to find the average of the numbers entered. Press 4 to exit. Option 1 - The user should be able to enter 20 numbers only. If all twenty numbers are entered...
Hello, Please provide the source code in C++. Must be in 3 different files, please distinguish by comments.: class definitions (session.h), main program (session_main.cpp), and function definitions (session_defs.cpp). Define a class called Date with month, day and year as its data. Member functions must include a constructor, destructor, overloading function for < and ==, and for insertion (>>) and extraction (<<) for reading and displaying data. Also, define a class called Appointment for a consultant (or lawyer) to keep track...