Uses Catalogue -products] + addProducts() + deleteProducts() + modify Products() + loadProducts() + getProduct() +displayProduct() -orderld -orderDate -Items] Order +saveOrder() +printOrder() +createOrder() has id - name -category -price + constructors... + getters... + setters.... Products Item - productid -weight
Uses Catalogue -products] + addProducts() + deleteProducts() + modify Products() + loadProducts() + getProduct() +displayProduct() -orderld -orderDate -Items] Order +saveOrder() +printOrder() +createOrder() has id - name -category -price + constructors... + getters... + setters.... Products Item - productid -weight
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-Oriented
![Uses
Catalogue
- products[]
+ addProducts()
+ deleteProducts()
+ modify Products()
+ load Products()
+ getProduct()
+displayProduct()
Order
orderld
- orderDate
- Items[]
+saveOrder()
+printOrder()
+createOrder()
has
- id
- name
- category
- price
+ constructors...
+ getters...
+ setters...
Products
Item
- productid
-weight
Figure 1.0: Sample classes (This is just an example. You may use different design in your
implementation)
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.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa1babbee-ce29-4977-814e-f4001afb45bc%2F7110fa63-f73a-4a62-b884-95e474aa5d04%2F9ayzzwp_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Uses
Catalogue
- products[]
+ addProducts()
+ deleteProducts()
+ modify Products()
+ load Products()
+ getProduct()
+displayProduct()
Order
orderld
- orderDate
- Items[]
+saveOrder()
+printOrder()
+createOrder()
has
- id
- name
- category
- price
+ constructors...
+ getters...
+ setters...
Products
Item
- productid
-weight
Figure 1.0: Sample classes (This is just an example. You may use different design in your
implementation)
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.
![Project Overview
The Delicious Chocolate (DC) outlet is located in Penang. The company has various types of
handmade chocolate and each product item are classified with the product id, name,
type/category (e.g. dark chocolate, white chocolate and etc), and the price per 100 grams. The
product id could be defined using 2 letters (category code) and 3 digits combination (001). For
example, the first product id for the white chocolate should define as 'WC001'.
The manager wants you to develop a simple catalogue system to help them sell and maintain
their products effectively. Basically, the menu should have four options namely New Order,
View Order Maintenance and Exit. The Order option will allow the user to enter the order
details such as order id, order date, item no and the weight of the chocolate.
Enter Order ID: S10001
Enter Order Date: 12/11/2022
Enter Product Code: WC001
[White Chocolate Selected]
Enter weight (gram): 500
[RM 25]
Next Item [Y/N]:
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 user may click on the menu option 2 to view back
the previous order details by entering the Order ID.
Date: 12/11/2022
Order ID: S10001
Item No#
WC001
DC001
TOTAL
Name
White Chocolate
Dark Bitter Cho
Weight
500
300
Per 100g Price ($)
5.00
7.00
25.00
21.00
46.00
In the maintenance option, the products can be added, deleted and modified and store in the
catalogue object. All the chocolate details should be saved and persisted into a text file (e.g.
product.txt).
In this assignment, you are required to use a few classes (refer to figure 1.0) and perform basic
association among the classes. In the order transaction, the Order class should refer to the
Catalogue class in order to check the product details such as price and product description.
Provide appropriate attributes and methods for all these classes to perform all the operations
correctly. You are allowed to add in additional classes, operations and attributes in your
implementation.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fa1babbee-ce29-4977-814e-f4001afb45bc%2F7110fa63-f73a-4a62-b884-95e474aa5d04%2F0mes506_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Project Overview
The Delicious Chocolate (DC) outlet is located in Penang. The company has various types of
handmade chocolate and each product item are classified with the product id, name,
type/category (e.g. dark chocolate, white chocolate and etc), and the price per 100 grams. The
product id could be defined using 2 letters (category code) and 3 digits combination (001). For
example, the first product id for the white chocolate should define as 'WC001'.
The manager wants you to develop a simple catalogue system to help them sell and maintain
their products effectively. Basically, the menu should have four options namely New Order,
View Order Maintenance and Exit. The Order option will allow the user to enter the order
details such as order id, order date, item no and the weight of the chocolate.
Enter Order ID: S10001
Enter Order Date: 12/11/2022
Enter Product Code: WC001
[White Chocolate Selected]
Enter weight (gram): 500
[RM 25]
Next Item [Y/N]:
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 user may click on the menu option 2 to view back
the previous order details by entering the Order ID.
Date: 12/11/2022
Order ID: S10001
Item No#
WC001
DC001
TOTAL
Name
White Chocolate
Dark Bitter Cho
Weight
500
300
Per 100g Price ($)
5.00
7.00
25.00
21.00
46.00
In the maintenance option, the products can be added, deleted and modified and store in the
catalogue object. All the chocolate details should be saved and persisted into a text file (e.g.
product.txt).
In this assignment, you are required to use a few classes (refer to figure 1.0) and perform basic
association among the classes. In the order transaction, the Order class should refer to the
Catalogue class in order to check the product details such as price and product description.
Provide appropriate attributes and methods for all these classes to perform all the operations
correctly. You are allowed to add in additional classes, operations and attributes in your
implementation.
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 5 steps with 1 images

Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
i can't find the main method in this code , can you look at it please.
Solution
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