Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Your program will keep track of the rooms available for rent (these vary, since sometimes a room is closed for redecoration) and the reservations

Python

image text in transcribed

image text in transcribed

image text in transcribed

Your program will keep track of the rooms available for rent (these vary, since sometimes a room is closed for redecoration) and the reservations that guests have made for these rooms. When the full Anteater BrandBr system is completed, it might have a graphical user interface, but for now your program will be a batch program; this means that you will supply one input file that contains all the commands and one output file that will contain all your output Include these two lines in your code: infile open('BBcommands.txt', 'r outfileopenC'BBresults.txt, w) The automated checking depends on your using precisely those file names. You could easily convert this program to an interactive one with a fancy user interface, where the program presents the user with a menu of commands, accepts the user's selection, prompts the user for whatever additional information the command requires, and then displays the results of that command. We made this assignment a batch program for three reasons: First, it's extra work for you to write the menu-printing and input-prompting commands, some of which you have already done in other assignments. It's easier simply to assume that the data appears in the correct format in the input files. Second, it gives you more practice reading data from external text files. Third, testing your program will be much easier when you can create files of test data rather than typing in each test interactively every time The input for this program comes from a single text file named BBcommands.txt , which consists of an unlimited number of input command lines. We will describe the various commands below; for each stage, you will implement (or modify) a few more commands. Stage 1: For this stage, your program will keep track of the rooms that are available. This stage implements four commands, as described below. On each command line, the first three non-whitespace characters are the command; command letters may be upper or lower case

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

More Books

Students also viewed these Databases questions

Question

How does the feeling of power influence savings?

Answered: 1 week ago

Question

1. Describe the factors that lead to productive conflict

Answered: 1 week ago