mplement M.A.S.H. Game Database (main.c) Use an array of DataNode pointers to store the game data, with an ENUM for the indexes as follows: database[HOME_LIST] ---->>>>> DataNode* listHead for list of homes database[FEMALE_SPOUSE_LIST] ---->>>>> DataNode* listHead for list of female spouses database[MALE_SPOUSE_LIST] ---->>>>> DataNode* listHead for list of male spouses database[OCCUPATION_LIST] ---->>>>> DataNode* listHead for list of occupations database[TRANSPORTATION_LIST] ---->>>>> DataNode* listHead for list of transportion - - methods database[HOMETOWN_LIST] ---->>>>> DataNode* listHead for list of hometowns The data values should be specified in an char array of strings by using an initializer list. This array will be passed to the BuildDataList function as a parameter which will in turn construct the list, allocating memory as required, and return a pointer to the listHead. This pointer should be stored at the cooresponding index in the database. NOTE: Each list should contain a minimum of 5 options.
Implement M.A.S.H. Game
Use an array of DataNode pointers to store the game data, with an ENUM for the indexes as follows:
- database[HOME_LIST] ---->>>>> DataNode* listHead for list of homes
- database[FEMALE_SPOUSE_LIST] ---->>>>> DataNode* listHead for list of female spouses
- database[MALE_SPOUSE_LIST] ---->>>>> DataNode* listHead for list of male spouses
- database[OCCUPATION_LIST] ---->>>>> DataNode* listHead for list of occupations
- database[TRANSPORTATION_LIST] ---->>>>> DataNode* listHead for list of transportion - - methods
- database[HOMETOWN_LIST] ---->>>>> DataNode* listHead for list of hometowns
The data values should be specified in an char array of strings by using an initializer list. This array will be passed to the BuildDataList function as a parameter which will in turn construct the list, allocating memory as required, and return a pointer to the listHead. This pointer should be stored at the cooresponding index in the database.
NOTE: Each list should contain a minimum of 5 options.
4. Display M.A.S.H. Game Database (main.c)
Display the contents of the M.A.S.H. Game Database by calling the PrintDataList function on each list in the database array.
--------------------- Future Possibilities Database ------------------------ Home List: mansion, apartment, shack, house Female Spouse List: Robin, Lily, Nora, Patrice, Zoey, Quinn Male Spouse List: Ted, Marshall, Barney, Ranjit, Carl, Linus Occupation List: teacher, architect, lawyer, newscaster, undercover agent Transportation List: walk, ride the train, ride a bus, fly an airplane, carpool Hometown List: Cleveland, Queens, The Bronx, Brooklyn, Manhattan, Staten Island ----------------------------------------------------------------------------
Trending now
This is a popular solution!
Step by step
Solved in 2 steps