Question: write me a C# code Consider the following UML diagram: Sales is a class that contains knowledge of purchase orders that a business has received.

write me a C# code Consider the following UML diagram:
Sales is a class that contains knowledge of purchase orders that a business has received. There
are two types of purchase orders: single transaction orders and batch orders, which the class
Sales records separately in two dedicated lists. Batch orders are instances of class Batch and
can be added to its corresponding list, _batch_orders, using method AddBatch. Single trans-
action orders, on the other hand, are instances of class Transaction and can be added to its
corresponding list, _single_orders, using method AddTransaction. All orders can be printed
to the console via method PrintOrders.
Class Batch defines three member variables:
_number, a string that identifies this order,
_name, a string that captures the purpose of this order, and
_ items, a list of single orders attached to the bulk order.
In addition, class Batch defines the methods
Add to add a single order,
Print to print this order, and
Total to return the total sum of this order.
Finally, class Batch defines two read-only getters to obtain the Number and Name of the order.
Class Transaction is similar. Its member variables are:
_number, a string that identifies this order,
_name, a string that describes the product in this order, and
_amount, a decimal value to store the total of the single transaction.
Class Transaction defines a Print and a Total method, which print the order and return the
amount of this order, respectively. The read-only getters return the Number and Name of a
single transaction order.
write me a C# code Consider the following UML

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!