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

  Individual traffic light has at least three states (g.y,r)

Consider a traffic light system at a four-way crossroads (two roads intersecting at right angles) with a countdown timer, a crosswalk button, and a speaker that announces it's ok or not ok to walk

  Write a python programs to solve the following

Write a Python programs to solve the following 1. An electronics company sells circuit boards that cost $21.99. Assume tax is 9%. Print the total price of 3 circuit boards.

  Is imageholder and picturebox are similar controls

ImageHolder and PictureBox are similar controls. Do you agree? Why or why not?

  These processes compete to use the computers

a modern personal computer or workstation executes many simultaneous processes. these processes compete to use the

  Explain the difference between form and report

Explain the difference between form and report

  What is networking appliance thought as one collision domain

This networking appliance can be thought of as one collision domain. What is it

  Select a current trend in area of telecommunications

Research and select a current trend in the area of telecommunications. Find the topic and send to instructor for approval. Then, prepare a 10-15 page paper in Microsoft Word.

  Steps for company browse the site using this url

The static IP address of the server is 192.168.45.200. What steps do you take so that each computer in  company can browse site by using this URL?

  Compute expected payback percentage of machine

Compute the expected "payback" percentage of the machine. In other words, for each coin played, what is the expected coin return?

  A static data member annual interest rate

A static data member annualInterestRate that stores the annual interest rate for each of the savers.

  Discuss roles in a pci dss security assessment

The primary roles involved in a Payment Card Industry Data Security Standard (PCI DSS) security assessment are merchant, merchant's security personnel, merchant's networking personnel, service providers (if any), payment brand (such as Visa and Maste..

  A distributed relational database with tables

A distributed relational database with tables

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