Vous êtes sur la page 1sur 32

MANIVANAN SEHGAR 1132702497

MULTIMEDIA UNIVERSITY


PSP 0015
PROBLEM SOLVING IN PROGRAMMING AND SYSTEM DESIGN
Online Movie Tickets
Booking System






Name: MANIVANAN A/L SEHGAR (1132702497) PT31
Lecturer: MADAM FAUZIAH BINTI KAMARULZAMAN

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Introduction

First of all, we would like to thank Madam.Fauziah, our PSP0015
lecturer for helping us on doing this project Online Tickets Booking
System which being used to know you for booking tickets. The user
for this program can be done by anyone. There will be four questions
that can be answer by this program. Those questions are the main
questions of booking tickets,booking details,edit booking and delete
booking. Firstly, you will be asked to input your choice, customer
choice,customer name ,customer ic number ,customer handphone
number, customer able to choice movies that have be shown in
cinemas so that customer can book their tickets. Then, the customer
will be able to view back their given details.Then,customer able to
edit their online booked tickets and customer able to cancel the online
book.Lastly, I want to thank Madam.Fauziah again for giving us the
opportunity to develop this program. We hope in the next semester,
we can develop a better program than this.

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Problem Analysis Chart

Given data Required Results
Users option
1. Booking Tickets
2. Booking Ticket Details
3. Edit Booking Details
4. Delete Booking Tickets

Booking Tickets
Required informations from the customer
Users option 1
1. Customer name
2. Customer Ic number
3. Customer handphone number
4. Customer movies choice (day of
watching movie,number of
adults and children)
Users option 2
1.Customer name
2.Displayed details that is given by
customer in option 1
Users option 3
1.Customer name
2.Renter new customer Ic number
3. Renter new customer
handphone number
4. Renter new customer movies
choice (day of watching
movie,number of adults and
children)
Users option 4
1.Customer name
2.Information will be delete
Program executed

1. Choice of the user
2. Customer Information
3. Displayed details that is given by
customer
4. Edit customer details
5. Delete details
Processing Required Solution Alternatives
1. Display all the information given by
customer
1.Place all the program in one function as
user friendly system



MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY

Online Movie
Ticketing
System
Option 4
Delete
Booking
Tickets

Option 3
Edit
Booking
Tickets

Option 2
Booking Tickets
Details

Option 1
Booking
Tickets
Interectivity chart

Movie Control










MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
IPO Chart
Input Processing Module Reference Output
1.Users
option(1,2,3,4)

1. Enter option(1)
2. Check valid of option(1)
3. Decide system to go(1)
4. Print input and output (1)
5. Print input and output (2)
6. Enter option(2)
7. Check valid of option(2)
8. Decide system to go(2)
9. Print input and output (3)
10. Check if want
continue(1)
11. Check valid of choice(1)
12. Print input and output
(4)
13. Check if want
continue(2)
14. Check valid of choice(2)
15. Print input and output
(5)
16.Program Executed
17.End



Control
Control
Control
program_info
onlineticketingbooking_system
onlineticketingbooking
_system
onlineticketingbooking
_system
onlineticketingbooking
_system





Control




1. Choice of
the user
2. Customers
Information
3. Display
customer
information

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Data Dictionary
Item Variable
Name
Data type Module Scope
Menu option option Numeric control Local
Customer Name custnam
e
Character onlineticke
tingbookin
g_system
Local
IC Number ic Numeric onlineticke
tingbookin
g_system
Local
CustomerPhone
Number
phone Numeric onlineticke
tingbookin
g_system
Local
Customer
MovieChoice
movieCh
oice
Numeric onlineticke
tingbookin
g_system
Local
What customer
want watch
movie
day Character onlineticke
tingbookin
g_system
Local
How many
adult customer
want watch
movie
adultNo Numeric onlineticke
tingbookin
g_system
Local
How many child
customer want
watch movie
child Character onlineticke
tingbookin
g_system
Local


MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Pseudocode/Algorithm
Pseudocode
START
DECLARE : choice1, choiec2, choice3, choise4, ,custName, ic,
phone,movieChoice,day,adultNo,child
PROGRAM Movie Ticket Booking System
DISPLAY Now Showing Movies
DISPLAY Main Menu
READ Booking Ticket
SELECT case of Booking Ticket
Case A : GET custName,ic,phone,movieChoice,day,adultNo,child
Read custName
Read ic
Read phone
Read movieChoice
Case 1: Movie A
Case 2: Movie B
Case 3: Movie C
Promt user to select movie : Case 1/2/3
Read day
Read adultNo
Read child
Case B : Read Booked Ticket Details
SELECT case of Read Booked Ticket Details
Get custname
Display ic
Display phone
Display movieChoice
Display day
Display adult
Display child
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Case C : Read Edit Booked Tickets
Get custname
Display current detail from case 1
Read New Ic
Read New Handphone
Prompt user to select type of movie : Case 1/2
Read day
Read adultno
Read child
Case D : Read Delete Booked Tickets
SELECT case of Delete Booked Tickets
Get custname
if(remove(custName.c_str()) != 0)
Error deleting the file.
else
File has been deleted.
while(cont=='y' || cont=='Y');
Case E : Exit System
DISPLAY Are you sure you want to exit ?
Until again == Y or again == y

END PROGRAM

End Case
Stop







MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY

























MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY







#include <iostream>
#include <fstream>
#include <cstring>
#include <cstdlib>
using namespace std;
class superclass
{
public:
void homepage();
};
class ticket:public superclass
{
public:
string custName;
string ic;
string phone;
string address;
string movieChoice;
string day;
string adultNo;
string child;
bool check_alpha(string d);
bool check_digit(string a);
void add();
void edit();
void Delete();
void exit();
void view();
void movielist();
};
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
void superclass::homepage()
{
cout<<endl;
cout<<endl;
cout<<endl;
cout<<" ********MY CINEMA********"
; cout<<endl;
cout<< "\nProgrammed by ";
cout<<endl;
cout<<"MANIVANAN SEHGAR" <<" 1132702497 "; system("pause");
}
int main()
{
ticket e;
string custName;
char mainpage1;
bool done=false;
do { system("cls");
cout<<" ---------------------------------------\n";
cout<<" M.S. CINEMA \n";
cout<<" ---------------------------------------\n";
cout<<endl;
cout<<" NOW SHOWING \n";
cout<<" _____________\n";
cout << endl;
cout <<" Lucy (18) Ninja Turtles (U) The Expandables 3 (18)\n";
cout << endl;
cout << endl;
cout<<" -----------------------------------------\n" <<" | 1.BOOKING TICKET |\n" <<" | 2.BOOKING DETAILS
|\n" <<" | 3.EDIT BOOKING |\n" <<" | 4.DELETE BOOKING |\n" <<" | 5.EXIT |\n" <<" | 6.SUMMARY
|\n" <<" -----------------------------------------\n" <<" Please key in your choice:";
cin>>mainpage1;
switch (mainpage1)
{
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
case '1' : e.add();
break;
case '2': e.view();
break;
case '4': e.Delete();
break;
case '5': e.exit();
done = true;
break;
case '3': e.edit();
break;
case'6': e.homepage();
default: cout<<"Please key in between the between the options given.";
}
}
while(!done);
return 0;
}
void ticket::add()
{
system("cls");
cout<<"Please Fill In Your Information\n";
do
{
cout<<"Name:";
cin.ignore(); getline(cin,custName);
}
while(check_digit(custName));
do
{
cout<<"\nIC no:"; cin>>ic;
}
while(check_alpha(ic));
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
do
{
cout<<"\nH/P Number:";
cin>>phone;
}
while(check_alpha(phone));
cout<<endl;
movielist();
cout<<endl;
do
{
cout<<"Please key in the choice of movie that you would like to watch(1/2/3):";
cin>>movieChoice;
}
while(check_alpha(movieChoice));
do
{
cout<<"\nDay:"; cin.ignore(); getline(cin,day);
}
while(check_digit(day));
cout<<endl;
cout<<"Please key in number of viewers\n";
do
{
cout<<"\nAdult:";
cin>>adultNo;
}
while(check_alpha(adultNo));
cout<<endl;
do
{
cout<<"\nChild:";
cin>>child;
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY

}
while(check_alpha(child));
ofstream customer(custName.c_str(),ios::out);
customer<<ic<<"\n"<<phone<<"\n"<<movieChoice<<"\n"<<day<<"\n"<<adultNo<<"\n"<<child<<"\n";
}
void ticket::view()
{
system("cls");
cout<<"To view your personal data,please kindly key in your name:";
cin.ignore(); getline(cin,custName); ifstream customer(custName.c_str());
customer>>ic>>phone>>day>>adultNo>>child; customer.ignore(); customer>>movieChoice;
cout<<endl;
cout<<"Name : " <<custName<<endl; cout<<"IC : " <<ic<<endl; cout<<"H/P number: "
<<phone<<endl; cout<<"Day : " <<adultNo<<endl; cout<<"Adult : " <<day<<endl; cout<<"Child : "
<<child<<endl; cout<<"Selection : " <<movieChoice<<endl; cout<<endl;
switch (movieChoice[0])
{
case '1': cout<<" Movie : Lucy (18) \n" <<" Genre : Action\n" <<" Time : 12.00pm \n" <<" Hall : 2 \n";
cout<<endl;
system("pause"); break;
case '2': cout<<" Movie :Ninja Turtles (U) \n" <<" Genre :Action/Comedy\n" <<" Time :4.00pm \n" <<"
Hall :1 \n"; system("pause"); break;
case '3': cout<<" Movie :The Expandables 3 (18) \n" <<" Genre :Action\n" <<" Time :9.00pm \n" <<"
Hall \n"; system("pause"); break;
default: system("pause"); break; }
}
void ticket::movielist()
{
cout<<" 1) Movie :Lucy (18) \n" <<" Genre :Action\n" <<" Time :12.00pm \n" <<" Hall :2 \n\n"
<<" 2) Movie :Ninja Turtles (U) \n" <<" Genre :Action/Comedy\n" <<" Time :4.00pm \n" <<" Hall :1
\n\n"
<<" 3) Movie :The Expandables 3 (18) \n" <<" Genre :Action\n" <<" Time :9.00pm \n" <<" Hall \n";
}
void ticket::exit()
{
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout<<"Thank You for visiting My Cinema"<<endl; cout<<"Have a great a day"<<endl;
system ("Pause"); }
void ticket::Delete()
{
system("cls");
char cont;
do
{
cout<<"Enter your name: ";
cin.sync(); getline(cin,custName);
if(remove(custName.c_str()) != 0) cout<<"Error deleting the file. There is no such file:
%s.\n"<<custName; else cout<<"File '%s' has been deleted.\n"<<custName;
cout << "\n\n";
cout << "Do you want to delete another file? (y/n): ";
cin >> cont;
}
while(cont=='y' || cont=='Y'); }
bool ticket::check_digit(string b)
{
for( int i=0;i<strlen(b.c_str());i++)
{
if(isdigit(b[i]))
{
cout << ":: Error :: Your input is invalid(contain numeric number).Please re-enter. " << endl;
return true;
}
}
return false;
}
bool ticket::check_alpha(string d)
{
for( int i=0;i<strlen(d.c_str());i++)
{
if(isalpha(d[i]))
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
{
cout << ":: Error :: Your input is invalid(contain alphabet).Please re-enter. " << endl;
return true;
}
}
return false;
}
void ticket::edit()
{
system("cls");
string name;
do
{
cout<<"Please Key in Your Name\n";
cin>>custName;
}
while(check_digit(custName));
if stream customer(custName.c_str());
customer>>ic>>phone>>day>>adultNo>>child; customer.ignore(); customer>>movieChoice;
cout<<"Your Current Detail-"<<endl <<" Name :"<<custName<<endl <<" IC :"<<ic<<endl <<" H/P no
:"<<phone<<endl <<" Day :"<<day<<endl <<" Adult :"<<adultNo<<endl <<" Child :"<<child<<endl;
switch (movieChoice[0])
{
case '1': cout<<" Movie :Lucy (18) \n" <<" Genre :Action\n" <<" Time :12.00pm \n" <<" Hall :2 \n";
break;
case '2': cout<<" Movie :Ninja Turtles (U) \n" <<" Genre :Action/Comedy\n" <<" Time :4.00pm \n" <<"
Hall :1 \n";
break;
case '3': cout<<" Movie :The Expandables 3 (18) \n" <<" Genre :Action\n" <<" Time :9.00pm \n" <<"
Hall \n";
break;
}
do{ cout<<"\nNew IC:"; cin>>ic; }while(check_alpha(ic)); do{ cout<<"\nNew Handphone Number:";
cin>>phone; }while(check_alpha(phone));
cout<<endl;
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
movielist();
do
{
cout<<"Please Key in the Choice of movie that you would like to watch(1/2/3):\n";
cin>>movieChoice;
}
while(check_alpha(movieChoice));
do
{
cout<<"Day:"; cin.ignore(); getline(cin,day);
}
while(check_digit(day));
cout<<"Please key in number of viewers\n";
do
{
cout<<"\nAdult:"; cin>>adultNo;
}
while(check_alpha(adultNo));
do
{
cout<<"\nChild:";
cin>>child;
}
while(check_alpha(child));
ofstream Customer(custName.c_str(),ios::out);
Customer<<ic<<"\n"<<phone<<"\n"<<movieChoice<<"\n"<<day<<"\n"<<adultNo<<"\n"<<child<<"\n";
system("pause");
}





MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
Conclusion

In conclusions, customer can use this program for booking movie
tickets by online which is fast and secure . Besides, more questions
related to online movie ticketing booking can also be added into the
program so that can make the program will be more efficient, and
interesting.The major point is the program must be a friendly user
interface system. I hope customers now dont have problems to
book their tickets to watch movies. Lastly, we hope that we can
make a more better, useful,user-friendly interface and efficient
program in the future.

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
#include <iostream>
#include <stdlib.h>
#include<limits>

using namespace std;

void program_info();
void attendance_system();
void CH_passAbsent(int , int , float );
void percent_attendance (int , int, float );
void CH_notFail (int , int , float );
void CH_ifFail (int , int , float );

int main()
{
int
CH_main,weeks,CH_pass,absent_pass,CH_attend,CH2_attend,CH_required,CH2_required;
float percent,percent_any,percent_fail;
char option,option2, choice1,choice2,choice3,choice4;

cout << "Welcome to the UNVERSITY'S ATTENDANCE SYSTEM!!!!";
cout << "\n1. Proceed to the attendance system" << "\n2. Information of this system" <<
"\n3. Exit the program";
cout << "\n\nPlease state your selection: ";
cin >> option;
while ((option!='1') && (option!='2') && (option!='3'))
{
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout << "Please enter a valid option!!!: ";
cin >> option;
}

if (option=='1')
{
attendance_system();
}
else if (option=='2')
{
program_info();
}
else
{
exit (0);
}



}

void program_info()

{
cout << "\n\nThis is a system to calculate the attendance for the student(all according to
\thours).";
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout << "Student might required to state their credit hour(CH),";
cout << "percentage of \tattendance needed to pass, the amount of absentees and the
amount of weeks in \tthe semester. ";
cout << "This program can also calculate the amount of CH and absentees \tfor the sem,
calculate the percentage of attendance. ";
cout << "Calculate how many CH you \tmust attend so that you wont fall into the fail zone
and how many CH needed to \tincrease to the required percentage if u fall into the failed
zone.\n\n";
main();
}
void attendance_system()
{
int CH_main,weeks;
float percent;
char option2;


cout << "\n\nThis is the attendance system!!!";
cout << "\n\n--------------------------------------------------";
cout << "\n\nFIRSTLY,";
cout << "\nPlease input your credit hour for the sem: ";
cin >> CH_main;
while (cin.fail() || (CH_main>10) && (CH_main <0))
{
cin.clear();
cin.ignore();
cout << "Please enter a valid CH, must be between 0 to 10: ";
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cin >> CH_main;

}
cout << "Please input the amount of weeks in the sem: ";
cin >> weeks;
while (cin.fail() || (weeks>35) && (weeks <5))
{
cin.clear();
cin.ignore();
cout << "Please enter a valid weeks, must be between 5 to 35: ";
cin >> CH_main;

}

cout << "Please input percentage of attendance needed to pass: ";
cin >> percent;

while (cin.fail()|| (percent>100) && (percent <0))
{
cin.clear();
cin.ignore();
cout << "Please enter a valid percentage, must be between 0 to 100 ";
cin >> percent;
}

cout << "\n\nNEXT,";
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout << "Please input your choice: ";
cout << "\n\n1. Calculate the amount of CH and absentees you can have for the sem " <<
"\n2. Calculate the percentage of attendance";
cout << "\n3. Calculate how many CH you must attend so that you wont fall into the fail
\tzone" << "\n4.how many CH needed to increase to the required percentage if fell into the
\tfail zone";
cout << "\n\nPlease input your choice; ";
cin >> option2;

while ((option2!='1') && (option2!='2') && (option2!='3') && (option2!='4'))
{

cout << "Please enter a valid option!!!: ";
cin >> option2;
}

if (option2=='1')
{
CH_passAbsent(CH_main,weeks,percent);
}
else if (option2=='2')
{
percent_attendance(CH_main,weeks, percent);
}
else if (option2=='3')
{
CH_notFail(CH_main,weeks,percent);
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
}
else
{
CH_ifFail(CH_main,weeks,percent);
}
}

void CH_passAbsent(int CH_main, int weeks, float percent )
{
int CH_pass,absent_pass;
char choice1;


cout << "\n\n--------------------------------------------------";
CH_pass = (percent*CH_main*weeks)/100;
absent_pass =((100-percent)*CH_main*weeks)/100;
cout << "\n\nYou must attend CH of: ";
cout << CH_pass;
cout << "\nYou can absent for hours of: ";
cout << absent_pass;
cout << "\n\nDo u want to continue the program? <Y/N>: ";
cin >> choice1;
cout << endl << endl<< endl;


while ((choice1!='y') && (choice1!='Y') && (choice1!='N') && (choice1!='n'))
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
{
cout << "Please enter a valid option!!!: ";
cin >> choice1;
}


if (choice1=='y' || choice1=='Y')
{
attendance_system();
}
else if (choice1=='N' || choice1 == 'n')
{
cout<<endl<<endl;
cout<<"\t ***** ***** "<<endl;
cout<<"\t *** *** *** *** "<<endl;
cout<<"\t *** **** *** "<<endl;
cout<<"\t *** ** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** "<<endl;
cout<<"\t THANK YOU VERY MUCHH!! "<<endl;
cout<<"\t for using this program "<<endl;
exit (0);

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
}


}

void percent_attendance(int CH_main, int weeks, float percent)

{
int CH_attend;
float percent_any;
char choice2;

cout << "\n\n--------------------------------------------------";
cout << "\n\nPlease state the current CH that you have attend: ";
cin >> CH_attend;

do
{
cin.clear();
cin.ignore();
cout << "Please enter valid CH, must be least than total CH in the sem: ";
cin >> CH_attend;
}while(cin.fail() && (CH_attend>((percent*CH_main*weeks)/100)));

percent_any = ((CH_attend*100)/( CH_main* weeks));
cout << "Your percentage of attendance is: " << percent_any << "%";
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout << "\n\nDo u want to continue the program? <Y/N>";
cin >> choice2;

while ((choice2!='y') && (choice2!='Y') && (choice2!='N') && (choice2!='n'))
{
cout << "Please enter a valid option!!!: ";
cin >> choice2;
}


if (choice2=='y' || choice2=='Y')
{
attendance_system();
}
else if (choice2=='N' || choice2 == 'n')
{
cout<<endl<<endl;
cout<<"\t ***** ***** "<<endl;
cout<<"\t *** *** *** *** "<<endl;
cout<<"\t *** **** *** "<<endl;
cout<<"\t *** ** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** "<<endl;
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout<<"\t THANK YOU VERY MUCHH!! "<<endl;
cout<<"\t for using this program "<<endl;
exit (0);

}
}

void CH_notFail(int CH_main, int weeks, float percent )
{
int CH2_attend,CH_required;
char choice3;

cout << "\n\n--------------------------------------------------";
cout << "\n\nPlease state your current CH that you have attend: ";
cin >> CH2_attend;

do
{
cin.clear();
cin.ignore();
cout << "Please enter valid CH, must be least than total CH in the sem: ";
cin >> CH2_attend;
}while(cin.fail() && (CH2_attend>((percent*CH_main*weeks)/100)));

CH_required = ((percent/100)*(weeks * CH_main)-(CH2_attend));
cout << "CH required so that you wont fall into the fail zone: " << CH_required << "CH";
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout << "\n\nDo u want to continue the program? <Y/N>";
cin >> choice3;


while ((choice3!='y') && (choice3!='Y') && (choice3!='N') && (choice3!='n'))
{
cout << "Please enter a valid option!!!: ";
cin >> choice3;
}

if (choice3=='y' || choice3=='Y')
{
attendance_system();
}
else if (choice3=='N' || choice3 == 'n')
{
cout<<endl<<endl;
cout<<"\t ***** ***** "<<endl;
cout<<"\t *** *** *** *** "<<endl;
cout<<"\t *** **** *** "<<endl;
cout<<"\t *** ** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** "<<endl;
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout<<"\t THANK YOU VERY MUCHH!! "<<endl;
cout<<"\t for using this program "<<endl;
exit (0);
}
}

void CH_ifFail(int CH_main, int weeks, float percent)
{
int CH2_required;
float percent_fail;
char choice4;

cout << "\n\n--------------------------------------------------";
cout << "\n\nPlease state your current percentage of attendance: ";
cin >> percent_fail;

while (cin.fail() && percent_fail>=percent)
{
cin.clear();
cin.ignore();
cout << "Your current percentage of attendance must be lower that the required
percentage!!!";
cout << "\nYour new percentage is :";
cin >> percent_fail;
}

MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
CH2_required = (((percent*CH_main*weeks)/100)-((percent_fail*CH_main*weeks)/100));
cout << "CH needed to increase to the required percentage if fell into the fail zone: " <<
CH2_required << "CH";

cout << "\n\nDo u want to continue the program? <Y/N>: ";
cin >> choice4;

while ((choice4!='y') && (choice4!='Y') && (choice4!='N') && (choice4!='n'))
{
cout << "Please enter a valid option!!!: ";
cin >> choice4;
}


if (choice4 == 'y' || choice4 == 'Y')
{
attendance_system();
}
else if (choice4 == 'N' || choice4 == 'n')
{
cout<<endl<<endl;
cout<<"\t ***** ***** "<<endl;
cout<<"\t *** *** *** *** "<<endl;
cout<<"\t *** **** *** "<<endl;
cout<<"\t *** ** *** "<<endl;
cout<<"\t *** *** "<<endl;
MANIVANAN SEHGAR 1132702497
MULTIMEDIA UNIVERSITY
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** *** "<<endl;
cout<<"\t *** "<<endl;
cout<<"\t THANK YOU VERY MUCHH!! "<<endl;
cout<<"\t for using this program "<<endl;
exit (0);
}

}

Vous aimerez peut-être aussi