Create a simple food delivery service software system

Assignment Help C/C++ Programming
Reference no: EM13983279

Create a simple food delivery service software system that manages customer call-in the orders for combo meals via a first/in-first/out method. Your program will allow a food delivery service employee (or user) to enter the key information about a customer's order to generate an order ticket.

The program will include several attributes related to a given order. The system will be managed using a single queue in memory (this can be a global variable). The program must use the "queue" API in the C++ standard template library (STL) and not the "dequeue" API. All of the attributes associated with each order will be stored as a single object within a single queue data structure. The program must implement at least one class that will hold the following variables:

-orderNumber - A string variable to hold an automatically generated order number in the form LLLLNNNN, where L is a character from A to Z, and N is a number from 0 to 9. For example: EHLA2567. The orderNumber is an identifier that is unique for each order and repeats are not allowed.

-comboDescription - A string variable that provides a brief description or name describing the order. Spaces must be allowed.

-firstName - A string variable to hold the first name of the customer who placed the order.

-lastName - A string variable to hold the customer's last name.

-address - A string variable to hold the delivery address (street number and street address) of the order.

-zipCode - An integer variable that holds a 5-digit zip code. The program must re-prompt the user to re-enter the zip code if it is not a 5- digit number.

-milesFromRestaurant - An integer variable that holds the number of miles from the restaurant to the delivery address. The program must not accept orders with a delivery address greater than 15 miles from the restaurant. Return to the main menu without accepting the order in this case.

-orderCost - A double variable that holds the cost of the order. Provide the appropriate accessor methods to set and get the data for each of these class variables. For example setComboDescription(string comboDescription) and getcomboDescription(). In addition, the main program must provide the following functionality:

1. When the program is first started, it must read a data file called orders.dat. The program should not prompt the user for the name of the data file. If the file exists, the program will load the data for each order into the queue data structure. If the file does not exist, the program will start with an empty queue.

2. The program must provide a simple text-based user interface that manages the all of the orders within the queue. This can be similar to the menu found in the Book Inventory example. Each order must be placed in this queue as an object that holds all of the information associated with it. The user interface will allow the user to perform the following operations:

(a) Display Order - displays all of the orders that are in the queue. This feature will display all of the fields associated with the each order in the queue. In addition it must also print the total number of orders in queue along with the total cost for all orders in the queue.

(b) Enter Order - allows the user to enter all of the fields associated with a given order, except for the orderNumber, which will be automatically generated by the program as previously mentioned. After the data fields are entered, the program will place the order object into the queue data structure.

3 (c) Delete Order - allows the user to delete an order from the queue using the orderNumber as the key. The program will display a message if the order is not found in the queue.

(d) Search for Order - allows the user to find an order. The program will prompt the user to enter the orderNumber and will display all of the fields associated with that order if it is found, otherwise the program will display a message if there is not a matching orderNumber in the queue.

(e) Edit Order - allows the user to edit all of the fields for a given order that is in the queue (except for the orderNumber). The program must use the orderNumber as the key to find the specific order to edit. For simplicity, the program may re-prompt the user to reenter all of the fields associated with the given order; but it again must reuse the orderNumber value. Display a message if the order is not found in the queue.

(f) Move Order to Front - sometimes a customer may call back and complain. In option allows the user to move a given order to the front of the queue. Prompt the user to the orderNumber as the key to find the specific order. If the order is found, the program will move it to the front of the queue. If the order is not found display a message.

(g) Exit system - before the program exits, it must save all of the orders in the queue to the data file. I recommend using a standard text file with one field per line. At this point, if the file does not exist, the program will create it.

Reference no: EM13983279

Questions Cloud

Generally accepted accounting principles : Is any option that Mary is considering acceptable under generally accepted accounting principles? Why or why not? Do any of the options considered by Mary constitute financial statements fraud?
Transactions on the accounts and financial statements : Illustrate the effects of each of the preceding transactions on the accounts and financial statements of (1) Snipes Company and (2) Beejoy Company. Identify each transaction by date.
Calculate the acceleration : Can cars stop on a dime? Calculate the acceleration of a 1400-kg car if it can stop from 35 km/h on a dime (diameter = 1.7 cm) How many g's is this? What is the force felt by the 68-kg occupant of the car?
Aging-of-receivables method : Assuming the aging-of-receivables method is used, the net realizable value of accounts receivable on the 12/31/X3 balance sheet would be:
Create a simple food delivery service software system : Create a simple food delivery service software system that manages customer call-in the orders for combo meals via a first/in-first/out method.
Discussing the post-traumatic stress disorder : Write a 200-word paragraph discussing the following disorder: Post-traumatic stress disorder
Compensation in lieu of time taken off : Employees who do not take vacation will receive compensation in lieu of time taken off. Sick time does not vest and, if the employee does not use their sick time, it is forfeited back to the company.
Discuss research about intervention strategies for disorder : Select a stress disorder, anxiety disorder, conduct disorder, or ADHD from the Film List.Review and differentiate the characteristics of the selected disorder and discuss the research about intervention strategies for the disorder by completing the..
Calculate the current flowing in the u-shaped conductor : Calculate the current flowing in the U-shaped conductor. Calculate the external force needed to keep the rod's velocity constant at that instant.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Clears the screen

Assignment: Write a script that meets the following requirements:•Clears the screen•Creates the menu displayed below with any additional formatting you may desire•Prompts the user to choose a menu option•Assigns the value chosen by the user to the va..

  Create a program that asks the user to enter in two numbers

Create a program that asks the user to enter in two numbers. Pass the two numbers as arguments to a function. If the sum of the numbers is greater than 10, the function returns true. Otherwise the function returns false

  Implement the trapezoidal rule for integrating a function

Implement the Trapezoidal Rule for integrating a function. Use the following function: double trap(double (*pf)(double x), double a, double b, int n) Here, pf points to the function f that is to be integrated.

  Compare and contrast the while loop and the for loop

Compare and contrast the WHILE loop and the FOR loop. Your discussion should identify the similarities, differences, advantages, and disadvantages of each structure.

  Show that regularity is preserved under the shift operation

Show that the regularity is preserved under the shift operation - I have the answer already but i do not understand

  Irrespective of the old ui

Generate a Drag and Drop UI, where the enduser can change UI elements by dragging and dropping then later when the same user again comes and access the UI then what the changes he made on UI earlier should be presented there irrespective of the ol..

  Create a text adventure game that uses pointers

Create a text adventure game that uses pointers. You have a rich, eccentric Uncle Billy who is soon to be deceased.

  Prepare a program for a bank that allows the user

Prepare a program for a bank that allows the user to enter an amount of money in cents. Show the number of whole dollars the bank will give the customer in exchange.

  Program to check the account status

Place the account record into an appropriate structure, and store the accounts in an array of structures.

  Write a program which has a base process which communicates

write a program which has a base process which communicates with child processes acting as bombers that it

  Determining the integer reference parameters

Write a function named time() that has an integer parameter named seconds and three integer reference parameters named hours, mins, and secs. The function is to convert the passed number of seconds into an equivalent number of hours, minutes, and ..

  The insertion point located at the end of the numbered list

With the insertion point located at the end of the numbered list, insert a Basic Chevron Process SmartArt-under Process, in the fifth row, the second layout. In the first shape, type View. In the second shape type Interact and in the third shape type..

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