subject

M. A.S. H. is a text-based game that will predict your future! M. A.S. H. is an abbreviation for the potential future places of residence: Mansion, Apartment, Shack, House. :)This activity provides experience adding items to, selecting items from, and iterating over LinkedLists. It also provides experience with Dynamic Memory allocation, pointers, arrays and structs.1. Carefully study the DataNode header file (DataNode. h)The DataNode struct as well as function declarations for the related functions described below have been provided in DataNode. h. Please do not modify the provided DataNode. h file. Details regarding each function as well as expected return values are included in the comments associated with each function declaration in DataNode. h. The following is a summary of this content:Data memberschar * dataValueint dataSizestruct DataNode* nextNodePtrRelated functionsDataNode* CreateDataNode(const char data[])int InsertDataNodeAfter(DataNode* nodeInList, DataNode* newNode)int SetNextDataNode(DataNode* nodeInList, DataNode* newNode)DataNode* GetNextDataNode(DataNode* nodeInList)void PrintDataNode(DataNode* thisNode)void DestroyDataNode(DataNode* thisNode)DataNode* BuildDataList(char * data[])int GetDataListSize(DataNode* listHead)void PrintDataList(DataNode *listHead)DataNode* GetRandomDataNode(DataNode *listHead)void DestroyDataList(DataNode* listHead)2. Implement each of the related functions listed above (DataNode. c) Test each function as it is written by developing testcases in mytests. c. Be sure to run the tests through valgrind to catch any memory related errors that might not be immediately visible during normal safepath testing. valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./mytestsNOTE: If your testing does note seem to produce random results when calling GetRandomDataNode, this is likely because rand() has a default seed value of 1. To change the seed value to the current time you will need to include and then make the following call to srand() in main() before your first call to rand(). It is important that you only call srand() once and only in main().srand(time(0));3. 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 homesdatabase[FEMALE_SPOUSE_LIST] >>>>> DataNode* listHead for list of female spousesdatabase[MALE_SPOUSE_LIST] >>>>> DataNode* listHead for list of male spousesdatabase[OCCUPATION_LIST] >>>>> DataNode* listHead for list of occupationsdatabase[TRANSPORTATION_ LIST] >>>>> DataNode* listHead for list of transportion - - methodsdatabase[HOMETOWN_LIST] >>>>> DataNode* listHead for list of hometownsThe 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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
(, urgent need): how do i change my username
Answers: 1
You know the right answer?
M. A.S. H. is a text-based game that will predict your future! M. A.S. H. is an abbreviation for the...
Questions
question
Mathematics, 29.01.2020 20:00
question
English, 29.01.2020 20:00