Create a program that keeps track of the sales of bbq sauces

Assignment Help Computer Engineering
Reference no: EM132218876

Programming Assignment 1

This assignment will require the use of three arrays, which will be used in parallel. Create a program that keeps track of the sales of BBQ sauces for a company. The company makes several different types of sauces, Original, Sticky Sweet, Spicy, Sweet Heat, Hickory Bourbon and Smokey Mesquite.

One array will contain the names of the different BBQ sauces. This array will be initialized from a text file with the 6 different names. A second array will be used for the price of each bottle of BBQ sauce; this will also be initialized from a file. The two files can be different files.

The third array will be used to store the amount sold of each type of sauce. The program will then prompt the user for how many of each sauce has been sold. Once all the data is entered a report is created that displays each of the sauce types with the total amount sold and the total sales for each of the sauces. This output should be in a table format.

The program will also calculate the overall total of sales for all of the sauces. It will then determine which sauce was the highest selling and the lowest selling product.

Validations:

1. The files can be opened

2. No negative values for the amount of sales for each sauce. This should be a loop asking for the input again.

Requirements:

1. When prompting for the amount sold of a sauce, the name of the sauce must be used in the prompt.

2. Table output should have evenly spaced columns.

3. Where there is currency being displayed, it must be formatted with 2 decimal places and a $.

4. Method to display the table of output.

5. Method to calculate the total of overall sales, returns the amount.

6. Method to get the inputs from the user for the amount sold of each sauce.

7. Method to determine which is the highest and lowest product sold.

Programming Assignment 2

This assignment will require you to write a program that will keep track of a test score for each (4) student. This program will make use of two arrays. The two arrays are:

Array of strings with the students names

Array of doubles with the students test score

Note that the student name at index 0 of the first array will have the test score at index 0 of the second array.

Both arrays must be dynamically allocated using a pointer. The size of the arrays are based on the user's input, so the program must ask for how many students. The program must obtain the name of the student and that student's test score from the user. Once all the data is entered, the data will be sorted by scores in ascending order. Both arrays must be sorted so that the student still has the same test score.

So, both are sorted at the same time. The program will also display the sorted array along with the test score average. All methods/functions will use pointers as parameters and use only pointer notation and pointer arithmetic, not array notation.

Required Method/Functions:

void GetGrades(double* scores, string* students, int size);

void DisplayGrades(double* scores, string* students, int size, double avg);

void Sort(double* scores, string* students, int size);

double Average(double* scores, int size);

Validation requirements:

1. Do not accept a negative number of students to be entered (used for the size of the arrays).

2. Do not accept a negative test score.

a. If invalid prompt the user for a new test score until they enter a valid test score; use a loop.

Output should appear as:

Student Score

Richard 67.40

Mark 67.83

Jane 72.65

Sandy 95.32

Class average is: 75.80

Programming Assignment 3

This assignment will require you to write a program that will create an array of 10 string objects. The array will be initialized with the strings which contain the person's name and phone number in one string. The following is an example of test data:

"Renee Javens, 678-1223",

"Joe Looney, 586-0097",

"Geri Palmer, 223-8787",

"Lynn Presnell, 887-1212",

"Bill Wolfe, 223-8878",

"Sam Wiggins, 486-0998",

"Bob Kain, 586-8712",

"Tim Haynes, 586-7676",

"John Johnson, 223-9037",

"Jean James, 678-4939",

"Ron Palmer, 486-2783"

The program will prompt the user for the name or part of a name to search for. For example, the user may type in "Joe", and the program should then display "Joe Looney, 586-0097."

If the user enters "Pal" then the program should have two outputs from the above list. The program should make use of the string object methods to find the matches. The array should be created in main and use a method to search the array to find the name(s) in the array. If a match is not found then it should display a message indicating there is no match. The method must be passed the array of data.

Reference no: EM132218876

Questions Cloud

What are your firms economic profits : Based on your findings, how many additional workers do you think will file unemployment claims in your state - Will this affect how much flour you order
Reflection on the software-defined wireless network : Read the following two research papers, please give your critical reflection on the topic of the software-defined wireless network.
Review problem of petra corporation : Petra Corporation paid $500,000 for 80% of the outstanding voting common stock of Sizable Corporation on January 2, 2014 when the book value of Sizable's net.
Report on Impact of Investors : ACCT6120 Corporate Governance Assignment - Report on Impact of Investors, Analysts and Shareholders, University of Sydney, Australia
Create a program that keeps track of the sales of bbq sauces : Create a program that keeps track of the sales of BBQ sauces for a company. The company makes several different types of sauces, Original, Sticky Sweet.
What is a cost variance versus a efficiency variance : Answer these following question and answer one paragraph for each question in one word file and make sure no plagiarism. What is a cost variance versus.
How you explored the command on your linux system : BN206: A valid screenshot with appropriate figure number and caption showing how you explored the command on your Linux system.
How the new benefits will impact their net pay : Your organization, located in Manitoba, will be enhancing the group benefits plan offered to employees in two months by adding accidental death.
Record the purchase of the trucks : On 1 January 2017, Nicolaidis Ltd purchased two identical new machines at a total cost of $700000 plus GST. It was estimated that the machines would have.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Show that the half-wave rectifier is a nonlinear system

Show that if y(t) = [C + x(t)]cos(?ct) is the input to the demodulator in Fig. 12-15. then the output would be v(t) = C + x(t).

  Develop a small console program driven by a text menu

Write a BASH & PERL script to help users calculate compressed file size. Develop a small console program driven by a text menu.

  Find the total cost of the first hundred units

A company's marginal cost function is MC(x)(given below), where x is the number of units. Find the total cost of the first hundred units (x = 0to x = 100).(Round your answer to the nearest cent.) MC(x) = 4e-0.02x

  Discuss changes in alternating-current voltage

Solve the given problems. Refer to Appendix B for units of measurement and their symbols.

  Write a prolog program that solves the 8 queens problem

Write a PROLOG program that solves the 8 queen's problem (location of 8 queens on a chess board so that no queens have each other in check.)

  Develop a location decomposition diagram for the system

Develop a location decomposition diagram for the system. Develop a location connectivity diagram for the system. Why was the particular configuration selected?

  What kind of wsus infrastructure should you implement

You have been tasked to set up a WSUS infrastructure. What kind of WSUS infrastructure should you implement and why?

  Define a way to insert a row

How do I insert a row in multiple tables on different sheets in the similar workbook? I have 12 sheets, one for every month, and the sheets are exactly the same. Is there a way to insert a row and value on one sheet and have this apply to all sheet..

  Develop an online document library

Develop an online document library - create an application with the following architecture - Dockerfile exposes different ports for different APIs

  Find a lower interest rate

how much does it lower your payment if you shop around and find a lower interest rate? How much could you lower the payment by having a bigger down payment? What happens if you extend the term of the loan.

  Produce the context diagram for system

Produce the context diagram for system.

  Should the getter and setter methods for the properties be

Design and draw a class hierarchy for the above objects, based on the given properties. In your class hierarchy place variable names next to each class.

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