Upon the ordering transaction, display the order details in the tabular format and save the order data to a text file for historical purposes. The order ID will be generated automatically using a sequential number and prefixed with the letter 'P'. Save the order date with the current date. You may use the Calendar class in Java to derive the current date. Apply 5% government sales tax to the gross total of the transaction. Order ID: P1000 No 1 2 Pizza Deluxe Cheese-L Aloha Chicken-R Date: 12/11/2022 Quantity 1 Tax (58) TOTAL (RM) Total 60.00 15.00 3.75 78.75 Figure 3: Pizza Order Page The user may select option 2 in the main menu to view back the previous order details by entering the Order ID. In this case, you should design a class called Order to capture all the information stated in Figure 3.0. Users can place a maximum of up to 8 pizzas per order. You may create another class called Order Line to present each ordered pizza details (e.g. Deluxe Cheese-L and quantity 2) in an order. Currently, all the pizza information is saved into a file called pizza.txt. Create a Pizza entity class to capture the pizza details. The Pizza class should have a name and a price for each different size. Certain pizzas might have different prices although with the same size. There are 4 different prices for each pizza separated by a comma in the file. The following record represents P-8.9, R-16.0, L-26.0 and XL-36.0. Blazing Seafood, 8.9,16.0, 26.0,36.0 However, certain pizza does not have the price for the personal pizza and the system will simply place a zero in the record. Hence, users are not allowed to select their personal pizza on the ordering page. While the program is launched, you are required to load and populate all the pizza details from the given pizza.txt file to the object array. For option 3, the user can add new pizza details including the prices for each pizza size and update the pizza.txt file. Validation should be done for each transaction to avoid logical errors (e.g. prevent negative value for the chocolate weight). Application of advanced OOP concepts such as Inheritance, composition & aggregation will gain higher marks in the overall assessment.
Upon the ordering transaction, display the order details in the tabular format and save the order data to a text file for historical purposes. The order ID will be generated automatically using a sequential number and prefixed with the letter 'P'. Save the order date with the current date. You may use the Calendar class in Java to derive the current date. Apply 5% government sales tax to the gross total of the transaction. Order ID: P1000 No 1 2 Pizza Deluxe Cheese-L Aloha Chicken-R Date: 12/11/2022 Quantity 1 Tax (58) TOTAL (RM) Total 60.00 15.00 3.75 78.75 Figure 3: Pizza Order Page The user may select option 2 in the main menu to view back the previous order details by entering the Order ID. In this case, you should design a class called Order to capture all the information stated in Figure 3.0. Users can place a maximum of up to 8 pizzas per order. You may create another class called Order Line to present each ordered pizza details (e.g. Deluxe Cheese-L and quantity 2) in an order. Currently, all the pizza information is saved into a file called pizza.txt. Create a Pizza entity class to capture the pizza details. The Pizza class should have a name and a price for each different size. Certain pizzas might have different prices although with the same size. There are 4 different prices for each pizza separated by a comma in the file. The following record represents P-8.9, R-16.0, L-26.0 and XL-36.0. Blazing Seafood, 8.9,16.0, 26.0,36.0 However, certain pizza does not have the price for the personal pizza and the system will simply place a zero in the record. Hence, users are not allowed to select their personal pizza on the ordering page. While the program is launched, you are required to load and populate all the pizza details from the given pizza.txt file to the object array. For option 3, the user can add new pizza details including the prices for each pizza size and update the pizza.txt file. Validation should be done for each transaction to avoid logical errors (e.g. prevent negative value for the chocolate weight). Application of advanced OOP concepts such as Inheritance, composition & aggregation will gain higher marks in the overall assessment.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
object-oreinted
need the full code together with the comments.
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 6 steps with 2 images
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
i could not run the
Solution
by Bartleby Expert
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
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education