Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Your neighbor is an agent for a group of magicians. People call her to book magicians for holidays. She would like to use her

C++

Your neighbor is an agent for a group of magicians. People call her to book magicians for holidays. She would like to use her new computer to keep track of the jobs she schedules for the magicians she manages, so she hires you to write the program.

Input

1. The list of magician names is in text file such as "MagicianNames.txt". The names should be listed one per line, and have a maximum of 20 characters. Read the names from the files and create an unsorted linked list from them. You determine how many names to start with (you will provide a method for adding new names later).

2. The list of holidays is in text file such as "Holidays.dat". Again, the names are in listed one per line and have a maximum of 20 characters. Read the holidays from the files and create an unsorted linked list from them. You determine how many names to start with (you will provide a method for adding new names later).

3. The current schedule (retained data from the previous executions of the program) is in file such as "Bookings.dat". You determine the format of this file as part of your assignment. Read the bookings from the files and create an unsorted linked list from them. You will start with no bookings (first time) and add new bookings to the file and the linked list.

4. The user (your neighbor the agent) inputs commands from the keyboard, in response from program prompts, as described under Command Processing below.

Output

1. Prompts, menus, and responses to user commands are to be written to the screen, as described in the Processing instructions below.

2. A summary of each command's transaction must be written to a text file such as "Magic.trn". You determine the format of the information in this file; it should be labeled and formatted clearly.

3. File "Bookings must be rewritten to contain the updated magician schedule information as you book events.

Command Processing (using the lists)

The program must process the commands described below. You may determine the details of the user interface; it must be relatively "friendly" and usable.

BOOKINGS

Prompt the user for the name of the customer who wants to schedule a magician and for the name of the holiday to be scheduled. Check to see if there is a magician free for this holiday. You should sequence through the magicians in the order in which you read them in. If a magician is available, book the magician (add to bookings list and file); then print out the name of the magician, the holiday, and the name of the customer. If a magician is not available, print out a message indicating that the customer and holiday have been put on a waiting list.

CANCEL

Prompt the user for the customer name and holiday. Delete the booking of a magician for the listed holiday. Update the booking of the magician who was going to perform for the occasion. NOTE: I recommend rebuilding the bookings file whenever you cancel a booking. Open the file for output and rebuild it from the bookings linked list.

SIGNUP (new magician)

Prompt the user for the name of the new magician who is signing up with the agent. Append to the file containing the names and add to the Magician linked list.

STATUS

Prompt the user for the name of either a magician or holiday. Print out the appropriate schedule, appropriately formatted and labeled.

REPLACE

Prompt for enough information to find the booking in question and replace the current Magician with the next available Magician from the list. NOTE: I recommend rebuilding the bookings file whenever you replace a magician. Open the file for output and rebuild it from the bookings linked list.

QUIT

Save the updated data to the files, and then terminate the program.

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

Step: 3

blur-text-image

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

Pro SQL Server Administration

Authors: Peter Carter

1st Edition

1484207106, 9781484207109

More Books

Students also viewed these Databases questions

Question

What are the opportunities of Intertraffic Transport Corporation?

Answered: 1 week ago

Question

Explain the chemical properties of acids with examples.

Answered: 1 week ago

Question

Write the properties of Group theory.

Answered: 1 week ago

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago