Lebanese International University CSCI 250 - Introduction to Programming- Assignment 2 Problem #1: Write a program that
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Lebanese International University CSCI 250 - Introduction to Programming- Assignment 2 Problem #1: Write a program that
Lebanese International University CSCI 250 - Introduction to Programming- Assignment 2 Problem #1: Write a 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 Beirut branch if its id starts with 11 An account belongs to Akkar 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 Beirut Branch Sample run 2: Enter your ID: 3245 Invalid ID Sample run 3: Enter your ID: 311245 Invalid ID Problem #2: Write a program that prompts the user to enter two integers: the number of adults and the number of children for a restaurant table reservation. Then, the program will display the total payment of reservation and meal according to the following rule: a. The inputs cannot be negative. b. The total number of reservation should not exceed 20 people. c. The basic reservation cost: $30 for adult and $15 for children d. The service payment is as following: reservation cost Service cost ≤ $150 15% 10% > $150 Sample Run1: Enter the number of adults and the number of children: 6 11 The reservation cost is $345 The service cost is $34.5 The total cost is $379.5 Sample Run2: Enter the number of adults and the number of children: 10 12 The number of people exceeds 20. The reservation cannot be produced. Sample Run 3: Enter the number of adults and the number of children: -3 10. Wrong inputs. Values cannot be negative. Assignment Guidelines: This assignment is handed on Wednesday, July 6th and is due by classroom on Monday, July 11th at midnight. • Your assignment (a complete java project that has been compressed using WinZip or WinRar) should be sent to the classroom. Do not send files with the .docx or .txt extension. . The title of your file should be: Assignment 1 - "Your name" e.g. Assignment 1 - Sami Jaber. The assignment should be done on individual basis and not in groups.