Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING ARRAY IN C++ PROGRAMMING BUT DONT USE STRUCTURE FOR THIS PROGRAM ONLY ARRAY Functional Requirements: A looping, menu-driven program that allows my friend, the

USING ARRAY IN C++ PROGRAMMING BUT DONT USE STRUCTURE FOR THIS PROGRAM ONLY ARRAY

Functional Requirements: A looping, menu-driven program that allows my friend, the restaurant designer, to store information about his jobs including customer name, restaurant name, contract value, and how much has been paid-to-date on the contract. Offer the designer the following menu that loops until they choose option 5.

1. Input a customer's information

2. Edit a customer's information

3. Search for contracts by value

4. Display all contract information

5. Exit -------------------------------------

Customer information Name (string - up to 15 characters, may not be blank)

Restaurant (string - up to 15 characters, may not be blank)

Contract Value (float >=0)

Paid-To_Date on Contract: (float >=0) ----------------------------------------

In main() create 4 parallel arrays that will hold the data for my friend. (You may NOT utilize structures for this assignment - we are working on parallel arrays here.) string customer [10] string restaurant [10] float contract[10] float paidToDate[10]

Create a looping menu (see pseudocode in this lesson) which accomplishes the following:

Menu Option 1: Pass the 4 arrays to a function that inputs and validates and stores customer data for ONE CUSTOMER. Make sure that you are counting the number of customers as you go so that you don't allow more then 10 customers to be input.

Menu Option 2: Pass the 4 arrays to a function that prompts the user for which customer to edit and then prompts the user for what field to edit. Accept and validate the edit. Store the data into the arrays.

Option 3. Pass the 4 arrays to a function that prompts the user for a contract amount and then displays all the contracts that are >= that amount.

Option 4. Pass the 4 array to a function that displays all the information AND the total of all the contracts (which your program will calculate).

Option 5. Exist the program.

Make sure to design modular code. If you have code that is repeated then call one function to handle it. No global variables - but you may use global constants.

Use cin.ignore() before your getlines. If this is too confusing, then you can just take a 3-pt deduction and only use cin. ----------------------------------------

Option 4 Sample Output To earn full credit on your output, you will need to use the iomanip library to create columns of data with proper headers, dollar amounts that have proper decimal places and the $.

Make your output look professional. ****************************************************************************************************************************************************** Restaurant Client Information ****************************************************************************************************************************************************** Name Restaurant Contract Value Paid-to-Date John Jones Local $ 25,600.00 $ 10,000.00 Kevin McQueen Green Leaf $ 6,250.45 $ 3,500.00 Total of All Contracts: $31,850.45 ----------------------------------------

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago