Hello;
I am having trouble Implementing this functions:
1. Cafeteria::pickTray()in cafeteria.cpp
2. Overloaded output operator of Group in group.cpp
3. Student::genPrice() in student.cpp.
for an assignment. My headers and .cpp snippets are
group.h
#ifndef A4TEMPLATE_GROUP_H
#define A4TEMPLATE_GROUP_H
#include <string>
#include <queue>
#include "student.h"
#include <iostream>
#endif
//------------------
Cafeteria.cpp
//--
void Cafeteria::pickTray()
{
Group redg("red"), greeng("green"), blueg("blue");
/*
for each student in the queue
1 pick a tray
1.1 randomly select a stack (as #1 tray)
1.2 pop #1 stack and push #2 stack until find the desired color
1.3 if no tray is found, pop #2 stack and push #1 stack and continue to find the tray of desired color
1.4: if no tray is found, pick the top one of #1 stack.
2. identify the color of the picked tray
3. push the student into the queue/stack of the corresponding group
*/
}
//---
Student.cpp
//---
void Student::genPrice()
{