Source Code
Source Code
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
/* Define --------------------------------------------------------------------
*/
#define MAX_ROW 2
#define MAX_COLUMN 15
#define MAX_ENTERPRISE 30
/* Enum ----------------------------------------------------------------------
*/
typedef enum Status
{
Empty,
Registered
} Status;
/* ---------------------------------------------------------------------------
*/
/* Begin: Student Answer
*/
/* ---------------------------------------------------------------------------
*/
// Requirement 11: Handle the "Show" command and call the appropriate function
void handleShowCommand(int map[MAX_ROW][MAX_COLUMN], Enterprise
enterpriseArray[MAX_ENTERPRISE], char *command)
{
// TODO: Implement this function
}
/* ---------------------------------------------------------------------------
*/
/* End: Student Answer
*/
/* ---------------------------------------------------------------------------
*/
/* ---------------------------------------------------------------------------
*/
/* Example Test Cases for Main
*/
/* ---------------------------------------------------------------------------
*/
// Initializes booth map and enterprise array to default values and then
// runs a series of test cases to verify enterprise registration, booth
// assignments, alterations, and knapsack optimization functionality.
int main()
{
// Initialize the map and enterprise array
int map[MAX_ROW][MAX_COLUMN];
Enterprise enterpriseArray[MAX_ENTERPRISE];
initMap(map);
initEnterpriseArray(enterpriseArray);
int booth;
char abbrev[10];
int totalEmpty = 0;
printf("\nRegistered Booths:\n");
showIndexOfStatus(enterpriseArray, Registered);
return 0;
}