I need to create an application that utilizes your Order class to implement a simple Order tracking system. To do this your system must be able to deal with a number of orders. Your application should have the following capabilities:
1. Create a new order
2. Update an existing order. (Hint: find the order using the tracking number)
3. List all orders.
Your application should be able to deal gracefully with users entering incorrect values when they create an Order, and with users attempting to incorrectly update an order (eg – attempting to ship an unpaid order, or attempting to cancel a shipped order).
As an extension, implement the following capabilities:
1. List all orders for a particular customer
2. Save/load orders from file


How would you approach this question??

I would create a class Order
with the following methods:
new_order
update_order
show_orders

Looks like you need the following information:
customer name
shipping address
unique tracking number
item
number of items
cost per item
method of payment

Need to calculate:
total cost of all items
shipping cost
total to be paid

Has it been paid?
Has it been shipped?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.