hai everybody. :love:
i hope u all fine :thumbup1:
now im doing my mini project about cinema reservation.
Which suitable code or function or formula that can make my booking section will give update.
After user make a booking. The total seat that left will reduce.
hope some1 can give thier idea. tq :)
Wanna Make Update booking for Cinema Reservation
Started by noteeth, Nov 19 2009 02:58 PM
13 replies to this topic
#1
Posted 19 November 2009 - 02:58 PM
|
|
|
#2
Posted 19 November 2009 - 04:06 PM
What do you have planned so far?
#3
Posted 20 November 2009 - 03:49 AM
Same speach.
#4
Posted 21 November 2009 - 05:35 PM
i already done the interface...
i just wondering how to make the system update after people had book that seat?
after that if someone wanna book that seat he cannot proceed to the seat.
sory for late reply.
i just wondering how to make the system update after people had book that seat?
after that if someone wanna book that seat he cannot proceed to the seat.
sory for late reply.
#5
Posted 21 November 2009 - 09:03 PM
It depends on how you're storing the information. Without knowing what you've designed so far (not just the interface), it's hard to help.
#6
Posted 22 November 2009 - 12:45 AM
this is code 4 my program.
at [Seat] is my update seat left.
number at "Seat Left" just a number.
//Header
#include <iostream.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <windows.h>
//------------------------------------>function proto
//------------------------------>page1
void show();
void news();
//------------------------------>page2
void today();
void tomorrow();
////---------------------------->page3:Part for today()
void trans();
void syurga();
////---------------------------->page4:Part for today()
void m2012();
void cuci();
//------------------------------>trans & syurga
void hallt1();
void hallt2();
void hallt3();
void halls1();
void halls2();
void halls3();
//------------------------------>2012 & Cuci
void hallm1();
void hallm2();
void hallm3();
void hallc1();
void hallc2();
void hallc3();
//void seats();
//
void updateform();
//Global
char dateStr [9], timeStr [9];
char name[40];
int ic;
char seat[3];
//--------------------------------------------------------------->Page1
void main()
{
{system("color 5e");printf("An enemy appears");}
system("cls");
int select;
//Welcome note
cout<<" \t\tWelcome To CCINEMA";
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),
_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
//Info
cout<<"Welcome to CCINEMA Booking Center. Here we provide a booking";
cout<<endl;
cout<<"system for our beloved costumer or to new costumer that first";
cout<<endl;
cout<<"time that wanna watching movie at our cinema. This service still";
cout<<endl;
cout<<"in development. If you facing a problem, we hope you can tell to";
cout<<endl;
cout<<"our workers. They will help you and take note the problem for";
cout<<endl;
cout<<"upgrading our service to yours.";
cout<<endl;
cout<<endl;
//Menu
cout<<"Booking [1]";
cout<<endl;
cout<<"Coming Soon [2]";
cout<<endl;
cout<<endl;
cout<<"Please select: ";
cin>>select;
if(select == 1)
{
show();
}
else if (select == 2)
{
news();
}
else
{
main();
}
} //End of main.
//--------------------------------------------------------------->Page2
//---------------------------------------------------------->Book
void show()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
//Show
cout<<"Show: ";
cout<<endl;
cout<<"\tToday[1]\tTommorow[2]";
cout<<endl;
cout<<endl;
cout<<"";
cout<<"Please select: ";
cin>>select;
if(select == 0)
{
main();
}
else if(select == 1)
{
today();
}
else if(select == 2)
{
tomorrow();
}
else
{
show();
}
} //End of book.
//---------------------------------------------------------->News
void news()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Please select: ";
cin>>select;
if(select == 0)
{
main();
}
else
{
news();
}
} //End of news.
//--------------------------------------------------------------->Today
void today()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Today";
cout<<endl;
cout<<"-----";
cout<<endl;
cout<<"Title \t\t\t Length Time";
cout<<endl;
cout<<endl;
cout<<" Transformer [1]\t 2h30m 1200 1600 2100";
cout<<endl;
cout<<"\t\t\t\tHall 1 Hall 2 Hall 3";
cout<<endl;
cout<<"\t\t\t\t[Seat] [Seat] [Seat]";
cout<<endl;
cout<<endl;
cout<<" Syurge Cinta [2]\t 1h15m 1130 1400 2200";
cout<<endl;
cout<<"\t\t\t\tHall 3 Hall 2 Hall 1";
cout<<endl;
cout<<"\t\t\t\t[Seat] [Seat] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
show();
}
else if (select == 1)
{
trans();
}
else if(select == 2)
{
syurga();
}
else
{
today();
}
} //End of today.
//--------------------------------------------------------------->Tomorrow
void tomorrow()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Tomorrow";
cout<<endl;
cout<<"--------";
cout<<endl;
cout<<"Title\t\t Length Time";
cout<<endl;
cout<<endl;
cout<<" 2012 [1]\t 2h30m 1200 1600 2100";
cout<<endl;
cout<<"\t\t\t\tHall 1 Hall 2 Hall 3";
cout<<endl;
cout<<"\t\t\t\t[Seat] [Seat] [Seat]";
cout<<endl;
cout<<endl;
cout<<" Cuci [2]\t 1h15m 1130 1400 2200";
cout<<endl;
cout<<"\t\t\t\tHall 3 Hall 2 Hall 1";
cout<<endl;
cout<<"\t\t\t\t[Seat] [Seat] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
show();
}
else if (select == 1)
{
m2012();
}
else if(select == 2)
{
cuci();
}
else
{
tomorrow();
}
} //End of tomorrow.
//----------------------------------------------------------------------->Today
//--------------------------------------------------------------->Trans
void trans()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Transformer:";
cout<<endl;
cout<<"\t\tHall 1 [1] [Seat]";
cout<<endl;
cout<<"\t\tHall 2 [2] [Seat]";
cout<<endl;
cout<<"\t\tHall 3 [3] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
today();
}
else if (select == 1)
{
hallt1();
}
else if(select == 2)
{
hallt2();
}
else if(select == 3)
{
hallt3();
}
else
{
trans();
}
} //End of trans.
//--------------------------------------------------------------->Syurga
void syurga()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Syurga Cinta:";
cout<<endl;
cout<<"\t\tHall 1 [1] [Seat]";
cout<<endl;
cout<<"\t\tHall 2 [2] [Seat]";
cout<<endl;
cout<<"\t\tHall 3 [3] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
today();
}
else if (select == 1)
{
halls1();
}
else if(select == 2)
{
halls2();
}
else if(select == 3)
{
halls3();
}
else
{
syurga();
}
} //End of syurga.
//----------------------------------------------------------------------->Tomorrow
//--------------------------------------------------------------->2012
void m2012()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"2012 :";
cout<<endl;
cout<<"\t\tHall 1 [1] [Seat]";
cout<<endl;
cout<<"\t\tHall 2 [2] [Seat]";
cout<<endl;
cout<<"\t\tHall 3 [3] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
tomorrow();
}
else if (select == 1)
{
hallm1();
}
else if(select == 2)
{
hallm2();
}
else if(select == 3)
{
hallm3();
}
else
{
m2012();
}
} //End of trans.
//--------------------------------------------------------------->Cuci
void cuci()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Cuci :";
cout<<endl;
cout<<"\t\tHall 1 [1] [Seat]";
cout<<endl;
cout<<"\t\tHall 2 [2] [Seat]";
cout<<endl;
cout<<"\t\tHall 3 [3] [Seat]";
cout<<endl;
cout<<endl;
cout<<"Please select:";
cin>>select;
if(select == 0)
{
tomorrow();
}
else if (select == 1)
{
hallc1();
}
else if(select == 2)
{
hallc2();
}
else if(select == 3)
{
hallc3();
}
else
{
syurga();
}
} //End of syurga.
//--------------------------------------------------------------->Trans
//-------------------------------------------------------->hallt1
void hallt1()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Transformer 1200 Hall 1 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 20";
cout<<endl;
cout<<"Go to another hall: Hall 2[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: trans();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallt2();
break;
case 3: hallt3();
break;
default:hallt1();
break;
}
}
//-------------------------------------------------------->hallt2
void hallt2()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Transformer 1600 Hall 2 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: trans();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallt1();
break;
case 3: hallt3();
break;
default:hallt2();
break;
}
}
//-------------------------------------------------------->hallt3
void hallt3()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Transformer 2100 Hall 3 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 37";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 2[3]";
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: trans();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallt1();
break;
case 3: hallt2();
break;
default:hallt3();
break;
}
}
//--------------------------------------------------------------->Syurga
//-------------------------------------------------------->halls1
void halls1()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Syurga Cinta 1200 Hall 1 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 2[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: syurga();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
updateform();
}
break;
case 2: halls2();
break;
case 3: halls3();
break;
default:halls1();
break;
}
}
//-------------------------------------------------------->halls2
void halls2()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Syurga Cinta 1300 Hall 2 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: syurga();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: halls1();
break;
case 3: halls3();
break;
default:halls2();
break;
}
}
//-------------------------------------------------------->halls3
void halls3()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Syurga Cinta 2100 Hall 3 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 12";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 2[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: syurga();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: halls1();
break;
case 3: halls2();
break;
default:halls3();
break;
}
}
//-------------------------------------------------------------------------->Tmrrw
//-------------------------------------------------------->hallm1
void hallm1()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"2012 1200 Hall 1 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 20";
cout<<endl;
cout<<"Go to another hall: Hall 2[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: m2012();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallm2();
break;
case 3: hallm3();
break;
default:hallm1();
break;
}
}
//-------------------------------------------------------->hallm2
void hallm2()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"2012 1600 Hall 2 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: m2012();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallm1();
break;
case 3: hallm3();
break;
default:hallm2();
break;
}
}
//-------------------------------------------------------->hallt3
void hallm3()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"2012 2100 Hall 3 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 37";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 2[3]";
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: m2012();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallm1();
break;
case 3: hallm2();
break;
default:hallm3();
break;
}
}
//--------------------------------------------------------------->Cuci
//-------------------------------------------------------->hallc1
void hallc1()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Cuci 1200 Hall 1 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 2[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: cuci();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
updateform();
}
break;
case 2: hallc2();
break;
case 3: hallc3();
break;
default:hallc1();
break;
}
}
//-------------------------------------------------------->hallc2
void hallc2()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Cuci 1300 Hall 2 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: None";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 3[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: cuci();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallc1();
break;
case 3: hallc3();
break;
default:hallc2();
break;
}
}
//-------------------------------------------------------->hallc3
void hallc3()
{
Sleep(1000);
system("cls");
int select;
cout<<"\t\t\t\t\tBack[0]";
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
cout<<"Cuci 2100 Hall 3 Total Seat: 50";
cout<<endl;
cout<<endl;
cout<<" Screen";
cout<<endl;
cout<<" -------------";
cout<<endl;
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<endl;
cout<<"Seat Left: 12";
cout<<endl;
cout<<"Go to another hall: Hall 1[2] and Hall 2[3]";
cout<<endl;
cout<<endl;
cout<<"Booking[1] \t Buy";
cout<<endl;
cout<<endl;
cout<<endl;
cout<<"*This application service only provide Booking for this time.";
cout<<endl;
cout<<"Please select:";
cin>>select;
cout<<endl;
switch (select)
{
case 0: cuci();
break;
case 1:
printf("Please Full Fill The Requirement We Need. TQ.\n");
printf("Name :");
gets(name);
printf("IC.Num.:");
scanf("%d", &ic);
printf("\n\nPlease Use Space To Differentite Seat, If Booking More Than One Sheet.\n");
printf("No Seat:");
scanf("%s", &seat);
printf("\nSubmit[4]\n\n");
cin>>select;
if(select == 4)
{
updateform();
}
else
{
cout<<"Please Full Fill The Form Before Submit. TQ";
}
break;
case 2: hallc1();
break;
case 3: hallc2();
break;
default:hallc3();
break;
}
}
/*void seats()
{
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 1A | 1B | | 1C | 1D | 1E | 1F | 1G | 1H | | 1I | 1J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 2A | 2B | | 2C | 2D | 2E | 2F | 2G | 2H | | 2I | 2J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 3A | 3B | | 3C | 3D | 3E | 3F | 3G | 3H | | 3I | 3J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 4A | 4B | | 4C | 4D | 4E | 4F | 4G | 4H | | 4I | 4J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
cout<<endl;
cout<<"| 5A | 5B | | 5C | 5D | 5E | 5F | 5G | 5H | | 5I | 5J |";
cout<<endl;
cout<<"----------- ------------------------------- -----------";
}*/
void updateform()
{
Sleep(2500);
system("cls");
int select;
cout<<endl;
cout<<endl;
cout<<endl;
//Date & Time
cout<<endl;
_strdate( dateStr),_strtime( timeStr );
cout<<"Date: "<<dateStr<<"\t\t\t Time: "<<timeStr;
cout<<endl;
cout<<endl;
printf("Name: ");
puts(name);
printf("\nIC.Num: %d", ic);
printf("\nNo Seat: %s", seat);
cout<<endl;
cout<<endl;
cout<<"Hope You Can Take Your Ticket At Main Counter Before Ticket";
cout<<endl;
cout<<"That You Booking Is Automatically Cancel By System.";
cout<<endl;
cout<<"Ticket Will Automatically Cancel Within 1hour Before Movies Start. TQ.";
cout<<endl;
cout<<"Return To Main Menu[5]";
cin>>select;
if(select == 5)
{
Sleep(1000);
main();
}
else
{
updateform();
}
}
at [Seat] is my update seat left.
number at "Seat Left" just a number.
#7
Posted 22 November 2009 - 06:17 AM
I've got a couple of concerns with this.
1) You're including string.h, but using char arrays.
2) You don't appear to have any data structures to represent your entire system. I would expect something like an array of seats, where each seat has a hall, seat, paid for, and occupant. You may want some other data as well.
3) It appears that everything's being handled with global variables. This whole thing looks like a good candidate for a class.
1) You're including string.h, but using char arrays.
2) You don't appear to have any data structures to represent your entire system. I would expect something like an array of seats, where each seat has a hall, seat, paid for, and occupant. You may want some other data as well.
3) It appears that everything's being handled with global variables. This whole thing looks like a good candidate for a class.
#8
Posted 22 November 2009 - 06:17 AM
I've got a couple of concerns with this.
1) You're including string.h, but using char arrays.
2) You don't appear to have any data structures to represent your entire system. I would expect something like an array of seats, where each seat has a hall, seat, paid for, and occupant. You may want some other data as well.
3) It appears that everything's being handled with global variables. This whole thing looks like a good candidate for a class.
1) You're including string.h, but using char arrays.
2) You don't appear to have any data structures to represent your entire system. I would expect something like an array of seats, where each seat has a hall, seat, paid for, and occupant. You may want some other data as well.
3) It appears that everything's being handled with global variables. This whole thing looks like a good candidate for a class.
#9
Posted 22 November 2009 - 07:32 AM
@WingedPanther: Well, string.h is the c library for char array manipulation, you're thinking <string>. :)
@noteeth: I agree with a lot of what WingedPanther said, but also you need to learn to not repeat yourself when you program! You could have very easily written all of that code that displays the layout of the theatre in one function and reused it each time you wanted to.
Another concern is you never return anything from any of your functions. Seriously, EVERY function you have is void! You should be returning values to the caller when necessary. It looks to me like you're not sure how to take advantage of what the language offers. Your program code is currently 1700 lines long, and you can very easily shorten it to less than 500 if you use C++'s strengths.
I'd suggest using a cinema class, as WP suggested. You'll need to mostly rewrite this, but that's okay, you'll learn a lot more about C++, and that's good. :)
@noteeth: I agree with a lot of what WingedPanther said, but also you need to learn to not repeat yourself when you program! You could have very easily written all of that code that displays the layout of the theatre in one function and reused it each time you wanted to.
Another concern is you never return anything from any of your functions. Seriously, EVERY function you have is void! You should be returning values to the caller when necessary. It looks to me like you're not sure how to take advantage of what the language offers. Your program code is currently 1700 lines long, and you can very easily shorten it to less than 500 if you use C++'s strengths.
I'd suggest using a cinema class, as WP suggested. You'll need to mostly rewrite this, but that's okay, you'll learn a lot more about C++, and that's good. :)
Wow I changed my sig!
#10
Posted 22 November 2009 - 07:32 AM
tq. i will make some adjust on it :)
#11
Posted 22 November 2009 - 07:34 AM
cinema class? how it look like? can u xplain it more :)
#12
Posted 22 November 2009 - 07:39 AM


Sign In
Create Account


Back to top









