Question: Need help with this code and would like to learn how to add the bonus(under optional options) in as well in C++. Thank you! Can't

Need help with this code and would like to learn how to add the bonus(under optional options) in as well in C++. Thank you!

Can't figure it out!

Need help with this code and would like to learn how to

add the bonus(under optional options) in as well in C++. Thank you!

Can't figure it out! The txt file is set up like this

The txt file is set up like this and can't be formatted different:

Jennifer barbie basketball

Jack iPhone

Joan cookbook skateboard scrabble scarf gloves

Anna skis helmet poles goggles

Becky

Ben backpack binaculars gps

Jim football pads helmet jersey

Autumn racket balls clothes gift-card

Zoe jacket tablet game

Mark guitar strings stand

Jeff apple-watch camera memory-card

Mandatory Instructions Santa Claus allegedly keeps lists of those who are naughty and those who are nice. On the naughty list are the names of those who will get coal in their stockings and therefore no gifts under the Christmas tree. On the nice list are those who will receive gifts. You will only implement the nice list in this assignment. Each object on the nice list contains childs name (string) and a pointer to the first node of that child's list of gifts. Below are definitions for each child node on the nice list and each gift node for the gift list along with a visual representation of the nice list containing one child node, Jennifer, with two gifts on her list, Barbie, and iPad. order as they are inserted into the list. Do not maintain any order for the gifts. child names in alphabetic Jennifer pHead Barbie iPado /I Structure definitions struct Gift string descj Gift* pNext; 1; struct Nice string name: Nice pNext; Gift' pGiftHead; head pointers should be passed by reference so that means both pHead (pointer to the first node of the nice list) and pGiftHead (pointer to first node of the gifts). /I Prototypes void createList (Nice &); void appendsift (Gift' &, 6ift); void insertNice(Nice* &, Nice*); void print6ifts (Nice, string); void printNiceList(Nice) void destroyGiftList (Gift &) void destroyNiceList (Nice* 8) /I Create the nice list /I Append to a gift list // Insert into the nice list in alpha order by name // Display a gift list // Display the nice list // Destroy a list of gifts // Destroy the nice list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!