Very confused

My c++ professor assigned this homework and everything i do is not working i am very lost, I have been working on it for the past few days and have gotten nowwhere can someone please help. I went to my professor put his explenations leave me even more confused.

Here is the homework assignment:
Write a program that lets a maker of chips and salsa keep track of sales for five different types
of salsa: mild ($2), medium ($2), sweet ($3), hot ($4), and zesty ($5). The program should use 2
parallel 5-element arrays: an array of strings that holds the five salsa names and an array of
integers that holds the number of jars sold during the past month for each salsa type. The salsa
names should be stored using the initialization list at the time the array is created. The program
should prompt the user to enter the number of jars sold for each type. Once this sales data has
been entered, the program should produce a report that displays sales for each salsa type, total
sales, and the names of the highest selling and lowest selling products.
Break up your program into modules (functions) and pass and return data to and from your
functions.
Input validation: Do not accept negative values for number of jars sold.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  #include <iostream>
#include <cstdlib>

using namespace std;

int displayMenu (string [], int [], int );

void SalsaType (string [], int, int &);
void NumJars (string [], int);
void SalsaPrice (double [], char [], int);




int totalSale (const int [], int);
int uchoice (const int [], int);
int getMin (const int [], int);
int getMax ( const int [], int);
void displaySalsaTypeSoldMontlhy(string  [], string  [], double  [], int);

void displayTotalSalsaSold( string  [], double [], int);
const int SIZE = 5;
int main()
{
    const int SIZE = 5;

    string types [SIZE] = {"mild", "medium", "sweet", "hot", "zesty"} ;
    string Jars [SIZE];
    double Price [SIZE] = {2, 2, 3, 4, 4};
    int uChoice;
}

int displayMenu (string types[], int Prices[], int Jars[],  int arrSize)
{
    int uChoice;
    cout << "Welcome" << endl;
    cout << "Please choose from the following salsa offerings: " << endl;
    for (int i=0; i<arrSize; i++)
    {
        cout << i+1 << types[i] << "  " << Prices[i]  << endl;
    }

    for (int i=0; i<arrSize; i++)
    {
        cout << "how many jars of : " << types[i] << endl;
        cin >> Jars[i];
    }


    cin >> uChoice;
    return uChoice;
}

void displaySalsaTypeSoldMontlhy(string types [], string Jars [], double Price [], int arrSize)

{

   for (int i=0; i<arrSize; i++)
   {
       cout << types[i] << " "
            << Jars[i] << " "
            << Price[i] << endl;
   }
}

void displayTotalSalsaSold( string Jars [], double Price [], int arrSize);
{

    for (int=0; i<arrSize; i++)
    {
    totalSale = (Jars [i] * Price [i]);
}

}
int getMin (const int arr[], int size)
{
    int min = arr[0];
    for (int i=0; i<size; i++)
    {
        if (arr[i] < min)
            min= arr[i];
    }
    return min;
}
int getMax (const int arr[], int size)
{
    int max = arr[0];
    for (int i=0; i<size; i++)
    {
        if (arr[i] > max)
            max = arr[i];
    }
    return max;
}
The first step would be this:

1
2
3
4
5
6
7
8
9
int main()
{
    const int SIZE = 5;

    string types [SIZE] = {"mild", "medium", "sweet", "hot", "zesty"} ;
    string int Jars [SIZE] = { 0 }; // Note: int (intitialized with 0) -> it's probably the number of jars
    double Price [SIZE] = {2, 2, 3, 4, 4};
    int uChoice = displayMenu (types, Price, Jars,  SIZE);
}


Note that the type of Jars if always int and never string. So look over your code and change that everywhere.
Price is always double. Change that too.

Further: The prototype (e.g. line 6) must always match the signature of the implementation (line 33). So change every signature that doesn't match.
At the end of line 66 there is a misplaced ; remove that.
On line 71: totalSale needs a type (before loop) and cout after.
thank you really appreciate it
Topic archived. No new replies allowed.