Lebanese International University CSCI 250 - Introduction to Programming- Assignment 2 Problem #1: Write a program that

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

Lebanese International University Csci 250 Introduction To Programming Assignment 2 Problem 1 Write A Program That 1
Lebanese International University Csci 250 Introduction To Programming Assignment 2 Problem 1 Write A Program That 1 (164.53 KiB) Viewed 139 times
java
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply