Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #include #include using namespace std; struct System { string name; string phone; int room; } ; int roomnum; int Menu (); string bookRoom (int&);

#include #include #include using namespace std; struct System { string name; string phone; int room; } ; int roomnum; int Menu (); string bookRoom (int&); void custRecord (System[]); void roomStatus (System[]); void editRecord (System*); void file (System[]); int main() { int x; char key; System hotel[50]; cout>roomnum; } hotel[roomnum].room=1; cout>hotel[roomnum].name; cout>hotel[roomnum].phone; cout>x; } cout>key; if (key=='y' || key=='Y') file(hotel); else cout>choice; return choice; } string bookRoom (int& roomnum) { string type; cout>roomnum; while (roomnum49) { cout>roomnum; } if (roomnum>=1 && roomnum=15 && roomnum=30 && roomnum=40 && roomnum>j; if (hotel[j].room==1){ cout>choice; cout>hotel[j].name; cout>hotel[j].phone; cout>key; if (key=='y' || key=='Y') editRecord (hotel); } return; } void file (System hotel[]) { ofstream outFile; string filename = "hotel.txt"; outFile.open(filename.c_str()); if (outFile.fail()) { cout

}

please answer completely these 2 parts for the above program? image text in transcribed

O A flow chart describing the flow of your program * A table listing all the functions/variables/files used in your program. An example format of the table shall look like the following (you may combine a few variables together if they serve the same purpose). Variables/Functions/ Files/Structures price[10][2] Return type Data type array of double: 10 rows, 2 cols none none Name info.dat num1, num2, num3 string ofstream int none none none none Arguments Description (if any) Stores the price of 10 items. Column1 stores price before discount, column2 stores price after discount Stores name of student Stores item descriptions none User inputs for three numbers none Stores an array of structures with 10 employee records int a, int b A function that compares two numbers and returns the maximum of the two int price[][], A function to calculate the double tax total price of items after discount and tax employee[10] none array of structure (type Employee) none findmax() int calcPrice() none void

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

How have new banking laws influenced competition?

Answered: 1 week ago

Question

Identify five strategies to prevent workplace bullying.

Answered: 1 week ago