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.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 Implement 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.


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 ----------------------------------------------------------------------------

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Potential Method of Analysis
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning