Question

Java Data Structures

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


0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

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.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Java Data Structures
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a contacts database program that presents the user with a menu that allows the user...

    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...

  • I have to use java programs using netbeans. this course is introduction to java programming so...

    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...

    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....

    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...

  • In C++ 1. Write a program that allows a user to enter 10 integer values from...

    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...

    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...

  • Menu-driven programs will display the menu options to the user and then prompt them for a...

    Menu-driven programs will display the menu options to the user and then prompt them for a menu choice. This program will display the following menu in the following format: Calculator Options: Calculate the area of a circle Calculate the area of a rectangle Calculate the area of a triangle Calculate the area of a trapezoid Calculate the area of a sphere Exit Enter your choice (1-6) Once the user enters a choice for the menu, the program should use a...

  • The language is C++ for visual studio express 2013 for windows create a TicketManager class and...

    The language is C++ for visual studio express 2013 for windows create a TicketManager class and a program that uses the class to sell tickets for a performance at a theater. Here are all the specs. This is an intense program, please follow all instructions carefully. -I am only creating the client program that uses the class and all it's functions -The client program is a menu-driven program that provides the user with box office options for a theater and...

  • This is a quick little assignment I have to do, but I missed alot of class...

    This is a quick little assignment I have to do, but I missed alot of class due to the Hurricane and no one here knows what theyre doing. please help! this is Java with intelli-J Overview In this project students will build a four-function one-run calculator on the command line. The program will first prompt the user for two numbers, then display a menu with five operations. It will allow the user to select an option by reading input using...

  • The purpose of this assignment is to get experience with an array, do while loop and...

    The purpose of this assignment is to get experience with an array, do while loop and read and write file operations. Your goal is to create a program that reads the exam.txt file with 10 scores. After that, the user can select from a 4 choice menu that handles the user’s choices as described in the details below. The program should display the menu until the user selects the menu option quit. The project requirements: It is an important part...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT