Provide the solution with the all the validations and exceptions classes and does the problem statement requires validation in the model class and how to provide the check for total guest equals Sum of adult veg, adult non veg kid veg and kid non veg
Added by Edward E.
Step 1
```python class Booking: def __init__(self, total_guests, adult_veg, adult_non_veg, kid_veg, kid_non_veg): self.total_guests = total_guests self.adult_veg = adult_veg self.adult_non_veg = adult_non_veg self.kid_veg = kid_veg Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 98 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Design and develop a small restaurant reservation program. The application offers different reservation rate for adults and children. (See sample below.) 1. When the application starts, it will display the following options. 2. When the VIEW RESERVATIONS is clicked, this will display all the reservations made # Date Time Name Adults Children 1 Nov 10, 2020 10:00 am John Doe 1 1 2 Nov 25, 2020 11:00 am Michelle Franks 2 1 3 Dec 10, 2020 9:00 am Ella Flich 1 1 4 Dec 21, 2020 12:00 pm Dylan Cloze 2 1 3. If the user selects MAKE RESERVATION, the user needs to input the following: a. Name (String) b. Date (String) c. Time (String) d. No of Adults (Integer) e. No of Children (Integer) Note: Adult is 500 per head and Kids is 300 per head reservation. REPORT Total number of Adults: 6 Total number of Kids: 6 Grand Total: PHP 4800.00 nothing follows 4. If DELETE RESERVATION is selected, the user needs to input the reservation number to remove the existing reservation. 5. If the GENERATE REPORT is clicked, display the report of all reservations # Date Time Name Adults Children Subtotal 1 Nov 10, 2020 10:00 am John Doe 1 1 800.00 2 Nov 25, 2020 11:00 am Michelle Franks 2 1 1300.00 3 Dec 10, 2020 9:00 am Ella Flich 2 2 1600.00 4 Dec 21, 2020 12:00 pm Dylan Cloze 1 2 1100.00 6. Apply Object Oriented Programming concepts. 7. Save data in a text file. 8. Use the appropriate exception to handle possible errors made by the user. a. Letters b. Zero c. No data d. Others 9. When the EXIT selected. It will close or exit the system and displays “Thank you!”
Akash M.
Application Service Scenario Develop a service-based distributed application that is part of an Online-Mobile-Shop system. It records all of the transactions and keeps track of the number of mobiles in the branches' inventory. The system user could sign in as a store employee (cashier), or as a system administrator. The system contains the following components: a web application with SOAP services for selling and retrieval processes and a Restful service for viewing and searching the available mobiles in various branches through a web client and SOAP client at the store employee (cashier). 1. Phase 1 (client-side) [30 marks] At phase 1, develop the client-side interface to ensure that SOAP services are accessed properly via a java application and RESTful service is accessed via a web browser For store employee (cashier) [10 Marks] 1. The employee should be able to issuing receipts either for the customers need to buy mobile or those need to retrieve mobile prize. For system administrators: [20 Marks] 1. After a successful login process, system administrator should be able to view all available mobiles in various branches. 2. System administrator should be able to search for a specific mobile in specific branch. Hint: Provide the necessary attributes and GUI interfaces and use the necessary communicating protocol. 2. Phase 2 (Server-side service) [60 marks] At phase 2, develop web-side services using the JAVA programming languages. For each task required in phase one, you should provide the appropriate service using JAVA and provide the required security for only Restful service to grant access only to authorized users. [15 Marks each] Here are some details regarding the functionality of some services: ● View all available items in all branches: this service should retrieve available mobile in all branches that exist in a file (JSON format) on the server side. Add a transaction: this service should reduce the number of existing items according to the applied transaction; modifying the JSON file accordingly. If the number of items from a specific product reached the lower limit of that product, the product details should be stored in an "urgent_to_order" file (JSON format). Delete a transaction: this service should update the various associated file(s) after applying a retrieval request. Search for items in specific branch: this service should enable the system administrator to search for items in specific branch by any of their attributes Hint: Use the appropriate presentation format to save and read the necessary attributes to and from file. Application Service Scenario Develop a service-based distributed application that is part of an Online-Mobile-Shop system. It records all of the transactions and keeps track of the number of mobiles in the branches' inventory. The system user could sign in as a store employee (cashier), or as a system administrator. The system contains the following components: a web application with SOAP services for selling and retrieval processes and a Restful service for viewing and searching the available mobiles in various branches through a web client and SOAP client at the store employee (cashier). 1. Phase 1(client-side [30 marks] At phase 1, develop the client-side interface to ensure that SOAP services are accessed properly via a java application and RESTful service is accessed via a web browser For store employee (cashier) [10Marks] 1. The employee should be able to issuing receipts either for the customers need to buy mobile or those need to retrieve mobile prize. For system administrators: [20 Marks] 1. After a successful login process,system administrator should be able to view all available mobiles in various branches. 2.System administrator should be able to search for a specific mobile in specific branch Hint: Provide the necessary attributes and GUI interfaces and use the necessary communicating protocol. 2. Phase 2(Server-side service) [60marks] At phase 2, develop web-side services using the JAVA programming languages For each task required in phase one, you should provide the appropriate service using JAVA and provide the required security for only Restful service to grant access only to authorized users.[15 Marks each] Here are some details regarding the functionality of some services: View all available items in all branches: this service should retrieve available mobile in all branches that exist in a file (JSON format) on the server side. Add a transaction this service should reduce the number of existing items according to the applied transaction;modifying the JSON file accordingly.If the number of items from a specific product reached the lower limit of that product, the product details should be Delete a transaction this service should update the various associated files after applying a retrieval request. Search for items in specific branch: this service should enable the system administrator to search for items in specific branch by any of their attributes Hint:Use the appropriate presentation format to save and read the necessary attributes to and from file.
Problem: You have to develop a system for a Grocery Store let us call it Grocery Store Management System. Your system should be able to store data related to the grocery items. The details of the items must be maintained to develop a repository. The system should be able to generate bills for the customers and update the repository whenever there is a sale transaction. Furthermore, the system should be able to prompt if a certain item runs out so that the manager may decide for timely reinforcements. You are required to do the following: 1) Start by reading the data (i.e grocery items) from a file which would contain the details as shown below. Set a limit to the number of items to be stored in the store (say 50). Every item may or may not have a fixed number of quantity available (say 50 boxes/bottles/packs). Once you upload the data, you can now work on the successive parts respectively. (10 Marks) (CLO2) (CLO4) The information related to the item(s) is as follows: - Product ID - Product Name - Weight - Mfg date - Exp date - Price (per pack/per bottle) - Quantity 2) Now that you have the data available with you, you must do the following: (20 Marks) (CLO3) (CLO4) - Insert new item - Delete an item - Update quantity (increase or decrease) - Update Mfg/Exp dates - Update price - Search the price of an item - Search the remaining quantity of an item Remember these functionalities will be used time and again so you need to use appropriate programming practices. Furthermore, system should prompt the user once an item runs out of quantity. 3) Now that the system is ready for the sale transactions. The system should be able to display bills for the purchased quantities inculcating tax amount and discounts (if any). The same receipt should be output to a file so that the customer may get a print-out. (10 Marks) (CLO4) Bonus Tasks: a. System should prompt the user once an item is expired. For that you may need the current date. b. If an item is nearing the end i.e a certain amount (say 10 tablets) is left, user may be reminded about getting the supplies for that item.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD