Mojtabarahimi 0 Newbie Poster

Hi
Acctualy i have a cinema project that i don't know how to start it and write it.
If it is possible, please help me.
I should write a project that show a cinema with 320 sits and some of them is for premiere, Twin, Gold and Economy.
This is more detail that i copy it for you :
------------------------------------------------------------------------------------
You are a programmer working in a software development company servicing mostly SME clients. You just received a new project to write a program that can be used to assign and book seats for a commercial cinema.
The cinema has 16 rows, with 20 seats in each row. The seats at the mid-column (number 5 to 15) of the last 2 rows closest to the doors (row A and B) are Twin seats, which will be sold in pair, side by side (e.g., buy A5 means paying for both A5 and A6). The rest of the seats in the row A and B, and all seats in row C to F are Premiere seats. Row G to L are Gold seats, and row M to Z are Economy seats. The map of the cinema is shown in Figure 1. The prices of the seats are shown in Table 1.

3.
Questions
Write a program that can be used to assign seats for the cinema. The following briefly describes the Seat Assignment function of such program.
Here, * indicates that the seat is available; x indicates that the seat is unavailable (sold out); o indicates that the seat is reserved (without payment).
Your program prompts the operator to enter the following information:
i.
Number of seat required
ii.
Desired seat category (Twin, Premiere, Gold or economy)
Upon entering the information, the program is to list the available seats matched with the requirements. The list contains the available seats located side by side, in the same row and column that will meet the number of seat required. The list is shown with the starting seat number and the number of seat available after the seat. The operator can then choose to update the status of the seat. For example,
Enter number of seat required: 8
Desired seat category: Premiere
Available seats:
C5, 12
D5, 12
E5, 12
F5, 12
Choose seat: C7
Action: x
------------------------------------------------------------------------------------
I try it by my self and wrote some things.
Please check it and help me.
Thank you.

#include <cstdlib>
#include <iostream>

using namespace std;

void shower();
void foroosh();
int cinema[16][20];

int main()
{

 int i,j;

 for (i=0;i<=15;i++) {

     for (j=0;j<=19;j++) {


         cinema[i][j] = 0;

         }


     }

     shower();

}










// --------------------------------------------------------



void shower() {

 int alpha;
alpha=65;



 int a,b;
 cout << "     1  2  3  4  5   6  7  8  9  10  11  12  13  14  15   16  17  18  19  20" << endl;
 for (a=0;a<=15;a++){

     if ((a==4)||(a==10)) {cout << endl;}

     cout << char(alpha) << "    ";

     for (b=0;b<=19;b++) {


        if (cinema[a][b]==0) {

                            if ((b==5)||(b==15)) { cout << "   ";}

                            cout << "." << "  ";

                             }else {
                                   if ((b==5)||(b==15)) { cout << "   ";}
                                   cout << "X" << "  ";
                                   }


         }
     cout << endl;

     alpha++;

     }


    cout << endl << endl;

system("pause");


     foroosh();
     }



 void foroosh() {

  int r,c;
  cout << "Please Enter row number 0-15 : " ;
  cin >> r;
  cout << "Please Enter col number 0-19 : " ;
  cin >>  c;

  cinema[r][c]=1;

  cout << endl << endl << "row :" << r << " col : " << c << " is SOLD." << endl;
      shower();

      }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.