Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

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.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M91677038
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in C/C++

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As