Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ZOO.CPP This is the driver. This file should have a main function and several other functions to organize or help the main function as described

image text in transcribed

ZOO.CPP This is the driver. This file should have a main function and several other functions to organize or help the main function as described below main This function should create a creature linked list, based on the LinkedList template class you create. Then it should display a menu of four options until the user chooses option 4, which is to end the program. Look at sample output to see the flow of the program If user chooses option 1, then a sub-menu should be shown to ask user if they want to enter creatures manually or from file. If manually, then the enterMagicalCreature function should be called, sending the address of the creatureList to this function. If from a file, then the enterMagicalCreatureFromFile function should be called sending the address of the creature list to this function If user chooses option 2, then the deleteCreature function should be called, sending the address of the creature list to this function If user choses option 3, then the printCreatures function should be called, sending the address of the creature list to this function. If user chooses option 4, then the program should ask the user if they want to save their creature list to a file. If user chooses yes, then call the saveCreaturesToFile function, sending the creature list to this function. Print "GOODBYE!" before the program end:s o o o o . enterMagicalCreature this function should ask the user for the creature's name, description, if it is dangerous, and the cost per month to care fo rhte creature. Then it should create a new creature object with this data. Then, it should append the creature object to the linked creature list. Then it should print a confirmation that the creature (print creature's name) has been added to the zoo. The function should then ask the user if they want to add more creatures. If they answer yes, then repeat this process. Otherwise, the function should end and it doesn't return any data enterMagicalCreatureFromFile this function should ask the user for the name of the file they want to read from. Then, if the file is able to be opened (print a message if can't be opened) then read the creature data from the file (one at a time) with a loop and after reading in one creature, create a new creature object with this data, then append the creature to the creature linked list. After reading all the creatures from the file & adding them to the linked list, print how many creatures FROM THE FILE were added to the zoo. This may or may not be the current number of creatures in the linked list! This function does not return any data deleteCreature -this function should first print a numbered list of the names of all the creatures in the linked list. Then ask the user which crea confirmation should be printed out that the creature was removed. This function does not return anything . number they want to delete. Then the creature should be removed from the linked list. A . printCreatures this function should either print "THERE ARE NO CREATURES AT YOUR ZOO!" if there are no creatures in the linked list. If there are creatures in the linked list then it should print each creature's detail in the list. This function does not return anything

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Application Development And Design

Authors: Michael V. Mannino

1st Edition

0072463678, 978-0072463675

More Books

Students also viewed these Databases questions

Question

Describe the three fundamental modes of heat transfer.

Answered: 1 week ago

Question

i need 6 7 7

Answered: 1 week ago

Question

Presentation Aids Practicing Your Speech?

Answered: 1 week ago