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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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