Explain order processing program to keep track

Assignment Help Basic Computer Science
Reference no: EM13760373

Program Specifications

You're asked to implement an Order Processing program to keep track of orders for customers and process them if needed. The program will read a text file containing customer orders in arbitrary order and then process them Class Design

Re-use Item->InventoryItem->Product->eProduct and DairyProduct class hierarchy from lab 3
Address: (street number, street name, zipcode, state): provide constructors/destructor/member functions as required in previous labs
Order: this is a template class representing an Order of <something>. That <something> can be an eProduct object, a DairyProduct object, an OnlineProduct object, or a pointer to an Item object. All constructors/destructor/member functions must be defined outside of class declaration

Data: OrderId (string), OrderDate (long): number of seconds after 1/1/1970, item (<something>)

Constructors
default: initialize string to "", long to 0

non-default constructor: take a string, a long, and <something>

Destructor: output order information

Functions: GetOrderId/SetOrderId/GetItem/SetItem/GetOrderDate/SetOrderDate and other functions if needed

Operator overloading: overload == operator so that it returns true if 2 orders are the same. Two orders are the same if they have the same

OrderId and the same <something>

OrderProcessingSystem

Data: store name (string), store ID (string), pointer to Address, a map of customer orders (key: customer ID(string), value: a deque containing Order<Item *> objects)

Constructors

default constructor: initialize strings to "", pointers to NULL

non-default constructor: take 2 string parameters for store name and store ID, an integer for street number, a string for street name, an integer for zipcode, and a string for state. It will dynamically allocate an Address object as well as initialize other members as appropriate
Destructor: de-allocate Address pointer and the Item * in each Order in each deque container in the map. You will need to iterate thru the map. Each entry in the map contains customer orders (deque of Order <Item *>) for a particular customer. Then iterate thru each deque container and delete all Item pointers in each deque.

Overload assignment operator operator= (you may ignore the map)

Member functions:
Init: read a text file to load customer orders
Menu: display a menu (invoked by start function below)
MENU
Show All Orders
Find Order by Customer ID
Process Order
Quit
Please enter an option (4 to quit): 1

Start: use a do while loop to display a menu and invoke ShowAllOrders, FindOrder, ProcessOrder per user option
ShowAllOrders: display all orders by customer ID
FindOrders: input a customer ID and display all orders by that customer
ProcessOrder: input a customer ID and an order ID then process (remove it from the deque) the order for that customer

Reference no: EM13760373

Questions Cloud

How might you add new people to your network : What are some of the resources and support you might have available to you to help you create a plan to get experience?
Astronomy : Imply about the radius of the supermassive black hole in the center of the Milky Way
C# in a windows forms application : C# in a Windows Forms Application. Design a program that asks the user to enter the amount that he or she has budgeted for a month. Use labels to list expediencies and text boxes to hold the expense (such as housing, entertainment, fuel, power, mi..
Necessary journal entries for evergreen : Evergreen Company sells lawn and garden products to wholesalers. The company's fiscal year-end is December 31. During 2011, the following transactions related to receivables occurred:
Explain order processing program to keep track : You're asked to implement an Order Processing program to keep track of orders for customers and process them if needed. The program will read a text file containing customer orders in arbitrary order and then process them Class Design
Analyze behavior and reactions of the consumer : The goal is to analyze behavior and reactions of the consumer, not the ads. You will select two print ads or commercials for the interview.
Persuasive argument to help them see more possibilities : Your uncle is working in a company managing their investment center. You approach him with the sales of a large piece of equipment that can help the company save money in the end. Your uncle explains to you that they can't purchase the equipment b..
Application at work transmits data records : Contrast synchronous and asynchronous connection. Is it more efficient to use synchronous connection or an asynchronous connection? What speed transmission line is necessary to support either type of connection? Show all your work.
Heat exchanger : Combination of pump size, motor speed, and impeller diameter from the pump characteristics would be the best for this application.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Compare swing java gui components to awt components

Compare Swing Java GUI components to AWT components. Explain at least one way the components are similar and at least one way they are different. Provide examples to support your rationale.

  Network connectivity and protocols

Network Connectivity and Protocols-

  Program should display a menu

The program should display a menu allowing the user to enter pointer values by selecting option 1, then perform shallow or deep copy by selecting options 2 or 3. After whcich, your program needs to display the new results after the copy is performed.

  Which structure best for the storyboard created

Case 2-3 Michael wants to create a Website based on his famous cooking show. He would like to provide instructions on how to create some of his favorite dishes. He would like his recipes to be displayed in very simple, step by step pages. Which st..

  The fourth floor is currently occupied by another tenant

Imagine that you have been hired as a contractor by a local business that has recently purchased new office space for its growing business. Design a network for the local business based on the following information: The business has approximately fif..

  Discuss the different html/css versions and browser versions

HTML versus XHTML - Discuss the different HTML/CSS Versions and Browser Versions

  Write program that reads in two floating-point numbers

Write a program that reads in two floating-point numbers and tests whether they are the same up to two decimal places. Here are two sample runs. Enter two floating-point numbers

  Web design is the planning and production of web sites

Web design is the planning and production of web sites, including, but not limited to, technical development, information structure, visual design, and content design.

  Internal e-mail getting hacked from the outside

Great Widgets is having a problem with the e-mail server it uses for internal e-mail getting hacked from the outside. One of its network folks has suggested an intranet, but the CEO, T. J. Alexander, is not up to speed about how an intranet wor..

  Explain how crc works at the data link layer

What are two reasons errors may occur at the data link layer?

  What are the two different types of sensitivity ranges

What are the two different types of sensitivity ranges? Describe each type briefly and give a real world example for each type.

  Jim grey introduced the acid principle

In 1981, Jim Grey introduced the ACID principle, which states that database management systems must ensure atomicity, consistency, isolation, and durability (particularly as it relates to transaction processing). This principle has guided the design ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd