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

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 1.11CP
icon
Related questions
Question

Object-Oriented Programming - Java programming.

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.
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.
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
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
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
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Top down approach design
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage