Write a java program that prompts the user to enter a client's account ID, then displays the name of the branch in which this client has an account. The account id is a positive integer composed of 6 digits. An account belongs to Boston branch if its id starts with 11 An account belongs to New York branch if its id starts with 12 An account id is invalid if it is not composed of 6 digits or it does not start with 11 or 12 Sample run 1: Enter your ID: 114587 It is Boston Branch Sample run 2: Enter your ID: 3245 Invalid ID Sample run 3: Enter your ID: 311245 Invalid ID
Write a java program that prompts the user to enter a client's account ID, then displays the name of the branch in which this client has an account. The account id is a positive integer composed of 6 digits. An account belongs to Boston branch if its id starts with 11 An account belongs to New York branch if its id starts with 12 An account id is invalid if it is not composed of 6 digits or it does not start with 11 or 12 Sample run 1: Enter your ID: 114587 It is Boston Branch Sample run 2: Enter your ID: 3245 Invalid ID Sample run 3: Enter your ID: 311245 Invalid ID
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
Related questions
Question
100%
Write a java program that prompts the user to enter a client's account ID, then displays the name of the branch in which this client has an account. The account id is a positive integer composed of 6 digits.
An account belongs to Boston branch if its id starts with 11
An account belongs to New York branch if its id starts with 12
An account id is invalid if it is not composed of 6 digits or it does not start with 11 or 12
Sample run 1:
Enter your ID: 114587
It is Boston Branch
Sample run 2:
Enter your ID: 3245
Invalid ID
Sample run 3:
Enter your ID: 311245
Invalid ID
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 5 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT