Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

DRAW A CLASS DIAGRAM, IN THE CLASS DIAGRAM SHOW THE FOLLOWINGS ELEMENTS Draw a class diagram for Assignment-2. In your class diagram, you need to

DRAW A CLASS DIAGRAM, IN THE CLASS DIAGRAM SHOW THE FOLLOWINGS ELEMENTS

Draw a class diagram for Assignment-2. In your class diagram, you need to show the followings elements: 1. Classes 2. Attributes for each class 3. Interface 4. Important functions (dont need to show getter, setter, and constructors for your classes) 5. Relationship among classes (is-a, composite, ...) You can also add additional components if you think those would be helpful.

In a retail store they are building an order processing system. Each order must have transaction id (long), a transaction date time (Calendar). There are two types of other in store order and online order. Each store order also keeps register id, which register was used to process the transaction store location The online order has a different set of data requirement. It needs Shipping address Billing address Credit card info o Number o Expire month o Expire year Each order has one or more order line. Order line contains the following info. Item Description Quantity Unit price To support the receipt generator an order must implements the following interface. public interface ReceiptGenerator { public double receiptTotalAmount(); public String recieptDetails(); } receiptTotalAmount: should calculate to total amount for the order. recieptDetails: should produce a string from of the entire order details o all order line for that order o store information if it is a store purchase o shipping address if it is an online purchase Your OrderProcessing application class should create one in store order and one online order. Each order should have at least five order line. Then is should make use of the ReceiptGenerator interface to print the receiptTotalAmount and recieptDetails.

2 HINT: You may use the address class create is Assignment-1 Guidelines All class should allow initialization of objects via constructor parameter. All member fields should have the necessary accessor and mutator (i.e. getters and setters).

Please see this picture for reference:

--------------------image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions