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

  Finding vertices of polygon stored in array-clockwise order

Assume that n ≥ 3 and the n vertices of P are stored in an array in clockwise order around P. Describe how to determine efficiently whether exactly one of the points q and r falls within P. Analyze the time for your algorithm.

  Write a java program that creates an array of integers

It should also keep track of a value that appears most often, display what that value was, and how often that value appeared in the array. You may simplify by filling myArray with values such that only one value appears most often.

  What is the proportion of white cars driving past my house

What is the proportion of white cars driving past my house?

  How these models would facilitate a company in the country

Review the IT diffusion models, select two models, then compare and contrast how these models would facilitate a company in the country and business sector of your choice. Be sure to state your business sector. Then, explain how the IT diffusion m..

  Write a program to simulate rolling a six-sided fair die

Write a program to simulate rolling a six-sided "fair" die with one dot on one side, two dots on another side, three dots on another side, and so on. Allow the user to enter the number of rolls.

  Determine each root with a maximum absolute error

Determine each root with a maximum absolute error max and print the intermediate results. (b) Use Matlab's zero function to solve the equations from (a) with a high precision. Compare the results.

  Program consists of a 200-instruction

A given program consists of a 200-instruction loop that is executed 50 times. If it takes 20,000 cycles to execute the program on a given system, what are that system's cycle per instruction

  Determine difference between repeated set of measurements

By this time you are prepared, I trust, to determine that there would be some difference between, two averages. What must we do in such a case?

  The hyperlink from the homepage to the other pages

The hyperlink from the homepage to the other pages should be contained in an unordered list.

  How many pages are needed to store the entire job

How many pages are needed to store the entire job?

  How many megabytes of data storage space are needed

The telephone exchange can store 3 minute audio messages of the same quality as that of the telephone channels. how many megabytes of data storage space are needed to store each of these messages?

  Social networking website to get information about applicant

Some companies are beginning to use social networking websites like Facebook and MySpace, to get information about job applicants.

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