I need help with that program please

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
96
97
98
99
100
101
102
#include <iostream>
#include <iomanip>
#include <string>

using namespace std;

void Receive(int *Car, int Num);
void Remove();
void Display();
void Current();
void Find();
void Quit();


int main()
{
	int Option;
	int CarNum;
	char CarType;
	int Compact[10];
	int Full[10];
	int SUV[10];

	cout <<"Welcome to the tire shop" << endl;
	cout <<"========================" << endl << endl;
	cout <<"Options" << endl;
	cout <<"-------" << endl;
	cout <<"1) Recieve new customer" << endl;
	cout <<"2) Remove car" << endl;
	cout <<"3) Display all cars" << endl;
	cout <<"4) Show current job" << endl;
	cout <<"5) Find customer" << endl;
	cout <<"6) Quit" << endl << endl;
	cout <<"Enter option number: ";
	cin >> Option;

	switch(Option)
	{
		case 1: cout <<"You chose to Recieve a New Customer" << endl;
			cout <<"Enter car type(C, F, S): ";
			cin >> CarType;
			cout <<"Enter new car ID: ";
			cin >> CarNum;
			if(CarType == 'C')
				Receive(Compact, CarNum);
			else if(CarType == 'F')
				Receive(Full, CarNum);
			else if(CarType == 'S')
				Receive(SUV, CarNum);
				cout << CarType;
			break;
		case 2: cout <<"You chose to Remove a Car" << endl;
			Remove();
			break;
		case 3: cout <<"You chose to Display All Cars" << endl;
			Display();
			break;
		case 4: cout <<"You chose to Show Current Job" << endl;
			Current();
			break;
		case 5: cout <<"You chose to Find a Customer" << endl;
			Find();
			break;
		case 6: cout <<"You chose to Quit" << endl;
			Quit();
			break;
	}
		

	return 0;
}

void Receive(int *Car, int Num)
{
	cout << "Made it to recieve" << endl;
}

void Remove()
{
	
	cout << "Made it to remove" << endl;
}

void Display()
{
	
	cout << "Made it to display" << endl;
}
void Current()
{
	cout << "Made it to current" << endl;
}

void Find()
{
	cout << "Made it to find" << endl;
}

void Quit()
{
	cout << "Made it to quit" << endl;
}

Last edited on
You forgot your question.
it doesn't return anything when I try putting a function
That's the instruction, ARE MY CODES COMPLETE?


A tires shop needs you to create a program to track its current customers who are getting a service done to their car. When a new customer arrives, they are given a unique 5 digit ID to track their car, and their car is placed in line (a queue) in one of the 3 garages. There is a separate queue for each garage: compact cars, full size cars, and SUV’s.
You are to write a menu driven program to help the sales clerk monitor daily activities as customers arrive, check out, and ask questions. Because there are 3 different garages where cars will be worked on, your program has to manage 3 different queues. Use the following menu for your program:
1. Receive new customer
2. Remove car from queue
3. Display all cars in a garage
4. Show the current car being worked on
5. Find customers place in line
6. Quit
Your program should continue to display the menu until option 6 is chosen.
If option 1 is chosen: the program should ask for the type of car (compact, full, suv), and for the 5 digit ID given to the customer, and that ID should be added to the appropriate queue.
If option 2 is chosen: the program should ask for the type of car, and remove the car currently at the front of the queue. If there are no cars in the queue, an appropriate message should be displayed.
If option 3 is chosen: the program should ask for the type of car the user wishes to see, and display the ID of all the cars in the queue (from front to back). If the queue is empty, an appropriate message should be displayed.
If option 4 is chosen: the program should ask the user for the type of car and display the ID of the car currently being worked on (the one in the front of the queue). If the queue is empty, an appropriate message should be displayed.
If option 5 is chosen: the program should ask for the type of car and the 5 digit ID of the car, then find the car in the queue and output the car’s place in line (Linear Search). If the ID is not found in the queue, an appropriate message should be displayed.
If option 6 is chosen: program terminates.


You can implement this program either using an array-based queue or a linked queue. Your class MUST have functions to add an item to the queue, remove an item from the queue, show the next item in the queue, find the position of an item in the queue (linear search), and check if the queue is empty. You can add any other functions you find it necessary.
anyone? please
The instructions mention a class, and I don't see a class anywhere.
Topic archived. No new replies allowed.