2. 2
Book My Show
Batch Code: B140109
Sem Code: T1E1D
Start Date: 21st
Feb 2013
End Date: 16th
April 2014
Name of the Coordinator: Vinod Chauhan
Name of the Creator: Mujeeb Rehman,
Khushal Singh and
Akash Singha
Date of Submission: Friday, 18th
April 2014
3. 3
Certificate
This is certifying that thesis work on, “Book My Show”
is a bonfire work has been successfully carried out
and submitted in the fulfillment of the requirement for
the Semester – C Elective-1 (T1E1D) of GNIIT
(Software Engineering) from NIIT. It is certified that
all correction /suggestion indicated for the internal
assessment have been incorporated in the thesis.
The thesis has been approved as it satisfied the
academic requirement in respect of minor work
prescribed for the software engineering (GNIIT). This
thesis is done under the guidance of “Vinod
Chauhan” (Faculty for Semester C, Elective-1 of
GNIIT) by “Mujeeb Rehman, Khushal Singh and
Akash Singha” of Semester “C - T1E1D” GNIIT
(Software Engineering).
Mr. Mukesh Bansal Mr. Kuldeep Singh Ms. Ritika Maheshwari
(Director) (Head of Center) (GL Tech.)
4. 4
Acknowledgement
We are very thankful to everyone who supported us
for this project and gives their guidance to complete
our thesis work effectively and moreover on time.
We are equally grateful to our faculty Mr Vinod
Chauhan, who gave us moral support and guided us
in different matters and solutions regarding the topic.
We feel immensely proud in extending our heartiest
thanks to Mr Mukesh Bansal, Director of NIIT
(Jodhpur), Ms Ritika Maheshwari (GL Tech.), for
providing us a platform to improve in various fields.
They went out of their way and provide us with
openhearted help and counsel. They have been a
source of inspiration for us and their experience and
knowledge have helped us in learning and giving this
project the shape it has assumed.
Mujeeb Rehman
Khushal Singh &
Akash Singha
5. 5
System Requirements
•CPU
•Monitor
•Keyboard
•Mouse
•2GB RAM (Minimum)
•100 GB HDD (Minimum)
Hardware Requirement
•Net Beans IDE 7.4 or higher
•Java Development Kit (JDK) 7.0 or higher
•Java ME SDK 3.4 or higher.
•Java ME SDK 3.4 Plugins
Software Requirement
•Microsoft Windows 7/8
Operating System
6. 6
Contents
1. Declaring Objects 7
2. Splash Screen 9
3. Home Screen 10
4. Ticket Type Screen 12
5. Movie List Screen 13
6. Movie List Action Screen 14
7. Date, Time and Venue Screen 17
8. Ticket Screen 19
9. Customer Contact Detail Screen 21
10.Review Details Screen 21
11.Payment Option Screen 22
12.Pick Your Card Screen 24
13.State Bank of India Screen 25
14.Confirm Transaction Alert Screen 26
15.Booking Done Screen 27
16.Start App, Pause App, Destroy App Code 28
17.Command Action Method Code 29
18.Bibliography 34
7. 7
Task 1 Declaring Object
package book_my_show;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import org.netbeans.microedition.lcdui.SplashScreen;
public class BookMyShow extends MIDlet implements CommandListener {
private boolean midletPaused = false;
private final int rateP = 100;
private final int rateC = 150;
private final int rateL = 400;
private SplashScreen splashScreen;
private List list1, listHome, listMovies, listBankCards;
private Form formVenuDateTime;
private Form formTicketType;
private Form form2States;
private Form formExpandables3;
private Form formPickSeats;
private Form formReviewDetails;
private Form formCardSelect;
private DateField dateField;
private ChoiceGroup choiceGroup;
private ChoiceGroup choiceGroup2;
private ChoiceGroup chTheater;
private ChoiceGroup chTicketType;
private TextField textField;
private TextField textField1;
9. 9
Task 2 Splash Screen
public void startMIDlet() {
public SplashScreen getSplashScreen() {
if (splashScreen == null)
splashScreen = new SplashScreen(getDisplay());
splashScreen.setTitle("Book My Show");
splashScreen.setCommandListener(this);
splashScreen.setFullScreenMode(true);
splashScreen.setImage(getImage1());
splashScreen.setText("Loading...");
} return splashScreen; }
switchDisplayable(null, getSplashScreen());
} public void switchDisplayable(Alert alert,
Displayable nextDisplayable) {
Display display = getDisplay();
if (alert == null) {
display.setCurrent(nextDisplayable);
} else { display.setCurrent(alert,
nextDisplayable); } }
public Image getImage1() {
if (image1 == null) {
try {
image1 =
Image.createImage("/book_my_show/Splash
Screen.png");
} catch (java.io.IOException e) { }
}return image1; }
10. 10
Task 3 Home Screen
Screenpublic List getListHome() {
if (listHome == null) {
listHome = new List("What You Want To Do ?", Choice.IMPLICIT);
listHome.append("Tickets", null);
listHome.append("Near Me", null);
listHome.append("Search By City", null);
listHome.addCommand(getExitCommand());
listHome.setCommandListener(this);
listHome.setSelectedFlags(new
boolean[]{false, false, false});
}
return listHome;
}
public void listHomeAction() {
String __selectedString =
getListHome().getString(getListHome().getSelec
tedIndex());
if (__selectedString != null) {
if (__selectedString.equals("Tickets")) {
switchDisplayable(null, getList1());
} else if (__selectedString.equals("Near Me")) {
switchDisplayable(getAlert(), getListHome());
} else if (__selectedString.equals("Search By
City")) {
switchDisplayable(getAlert1(), getListHome());
11. 11
} } }
public Alert getAlert() {
if (alert == null) {
alert = new Alert("GPS", "This Feature Require GPS !", null, AlertType.ERROR);
alert.setTimeout(Alert.FOREVER);
} return alert}
public Alert getAlert1() {
if (alert1 == null) {
alert1 = new Alert("GPRS", "Internet Connection Error !", null, AlertType.ERROR);
alert1.setTimeout(Alert.FOREVER);
} return alert1;}
12. 12
Task 4 Ticket Type Screen
public List getList1() {
if (list1 == null) {
list1 = new List("Ticket Type", Choice.IMPLICIT);
list1.append("Movies", null);
list1.append("Events", null);
list1.addCommand(getBackCommand());
list1.setCommandListener(this);
list1.setSelectedFlags(new boolean[]{false, false});
} return list1;
}
public Alert getAlert2() {
if (alert2 == null) {
alert2 = new Alert("Information", "No events In
Your City", null, AlertType.INFO);
alert2.setTimeout(Alert.FOREVER);
}
return alert2;
}
13. 13
Task 5 Movie List Screen
public void list1Action() {
String __selectedString = getList1().getString(getList1().getSelectedIndex());
if (__selectedString != null) {
if (__selectedString.equals("Movies")) {
switchDisplayable(null, getListMovies());
} else if (__selectedString.equals("Events")) {
switchDisplayable(getAlert2(), getList1());
public List getListMovies() {
if (listMovies == null) {
listMovies = new List("Movies Currently In
Your City", Choice.IMPLICIT);
listMovies.append("2 States", null);
listMovies.append("Mai Tera Hero", null);
listMovies.append("The Expandables 3", null);
listMovies.append("Youngistaan", null);
listMovies.append("Captain America", null);
listMovies.setTicker(getTicker1());
listMovies.addCommand(getBackCommand());
listMovies.addCommand(getOkCommand());
listMovies.setCommandListener(this);
listMovies.setSelectedFlags(new boolean[]{false, false, false, false, false});
} return listMovies; }
public Ticker getTicker1() {
if (ticker1 == null) {
ticker1 = new Ticker("CLICK THE MOVIE NAME FOR ITS DETAILS"); } return ticker1; }
14. 14
Task 6 Movie List Action Screen
public void listMoviesAction() {
String __selectedString = getListMovies().getString(getListMovies().getSelectedIndex());
if (__selectedString != null) {
if (__selectedString.equals("2 States")) {
switchDisplayable(null, getForm2States());
} else if (__selectedString.equals("Mai Tera Hero")) {
switchDisplayable(null, getFormMaiTeraHero());
} else if (__selectedString.equals("The Expandables 3")) {
switchDisplayable(null, getFormExpandables3());
} else if (__selectedString.equals("Youngistaan")) {
switchDisplayable(null, getFormYoungistaan());
} else if (__selectedString.equals("Captain America")) {
switchDisplayable(null, getFormCaptainAmerica());
} } }
public Form getForm2States() {
if (form2States == null) {
15. 15
form2States = new Form("Movie Details of 2 States", new Item[]{getImageItem(), getStringItem4(),
getStringItem5(), getStringItem6(), getStringItem7(), getStringItem8()});
form2States.addCommand(getBackCommand2());
form2States.setCommandListener(this);
} return form2States; }
public ImageItem getImageItem() {
if (imageItem == null) {
imageItem = new ImageItem("2 States", getImage2(), ImageItem.LAYOUT_DEFAULT, "<Missing
Image>");
imageItem.setPreferredSize(-1, -1);
}return imageItem; }
public StringItem getStringItem4() {
if (stringItem4 == null) {
stringItem4 = new StringItem("Starring:", "Arjun Kapoor, Alia Bhatt, Ronit Roy, Amrita Singh,
Revathy.");
} return stringItem4; }
public StringItem getStringItem5() {
if (stringItem5 == null) {
stringItem5 = new StringItem("Music By:", "Shankar-Ehsaan-Loy");
} return stringItem5; }
public StringItem getStringItem6() {
if (stringItem6 == null) {
stringItem6 = new StringItem("Writen By:", "Chetan bhagat");
} return stringItem6;}
public StringItem getStringItem7() {
if (stringItem7 == null) {
stringItem7 = new StringItem("Directer By:", "Abhishek Varman");
} return stringItem7;}
public StringItem getStringItem8() {
16. 16
if (stringItem8 == null) { stringItem8 = new StringItem("Produced By:", "Sajid Nadiadwala and
Karan Johar"); } return stringItem8; }
public Image getImage2() {
if (image2 == null) {
try { image2 = Image.createImage("/book_my_show/2states.png");
} catch (java.io.IOException e) { }
} return image2;}
17. 17
Task 7 Date, Time & Venue Screen
public Form getFormVenuDateTime() {
if (formVenuDateTime == null) {
formVenuDateTime = new Form("Date |
Time | Venu", new Item[]{getDateField(),
getChTheater()});
formVenuDateTime.setTicker(getTicker());
formVenuDateTime.addCommand(getBackComman
d());
formVenuDateTime.addCommand(getOkCommand
3());
formVenuDateTime.setCommandListener(this);
formVenuDateTime.append("Movie Name: " +
listMovies.getString(listMovies.getSelectedIndex()));
} return formVenuDateTime; }
public Ticker getTicker() {
if (ticker == null) {
ticker = new Ticker("New Releses >> Youngistaan |
2 States | Expandables 3 | Tera Hero Idhar Hai");
} return ticker; }
public DateField getDateField() {
if (dateField == null) {
dateField = new DateField("Enter Date:",
DateField.DATE);
dateField.setDate(new
java.util.Date(System.currentTimeMillis()));
} return dateField; }
public ChoiceGroup getChTheater() {
if (chTheater == null) {
chTheater = new ChoiceGroup("Select Theater:", Choice.POPUP);
23. 23
Task 11 Payment Option Screen
public Form getFormCardSelect() {
if (formCardSelect == null) {
formCardSelect = new Form("Pay Via Bank Cards", new Item[]{getChoiceGroup()});
formCardSelect.addCommand(getBackCommand6());
formCardSelect.addCommand(getOkCommand7());
formCardSelect.setCommandListener(this);
}
return formCardSelect;
}
public ChoiceGroup getChoiceGroup() {
if (choiceGroup == null) {
choiceGroup = new ChoiceGroup("Select Your
Payement Option", Choice.EXCLUSIVE);
choiceGroup.append("Debit / Credit Card",
null);
choiceGroup.append("Net Banking", null);
choiceGroup.append("Mobile", null);
choiceGroup.setSelectedFlags(new
boolean[]{false, false, false});
}
return choiceGroup;
}
24. 24
Task 12 Pick Your Card Screen
public List getListBankCards() {
if (listBankCards == null) {
listBankCards = new List("Pick Your Card", Choice.IMPLICIT);
listBankCards.append("SBI", null);
listBankCards.append("ICICI", null);
listBankCards.append("HDFC", null);
listBankCards.append("AXIS", null);
listBankCards.addCommand(getBackCommand7());
listBankCards.setCommandListener(this);
listBankCards.setSelectedFlags(new boolean[]{false,
false, false, false});
}
return listBankCards;
}
public void listBankCardsAction() {
String __selectedString =
getListBankCards().getString(getListBankCards().getSelect
edIndex());
if (__selectedString != null) {
if (__selectedString.equals("SBI")) {
switchDisplayable(null, getFormSBICardDetails());
} else if (__selectedString.equals("ICICI")) {
} else if (__selectedString.equals("HDFC")) {
} else if (__selectedString.equals("AXIS")) {
} } }
25. 25
Task 13 State Bank of India Bank Screen
public Form getFormSBICardDetails() {
if (formSBICardDetails == null) {
formSBICardDetails = new Form("State Bank of India", new Item[]{getImageItem2(), getTextField(),
getStringItem()});
formSBICardDetails.addCommand(getBackCommand8());
formSBICardDetails.addCommand(getOkCommand8());
formSBICardDetails.setCommandListener(this);
} return formSBICardDetails; }
public TextField getTextField() {
if (textField == null) {
textField = new TextField("Enter Your DEBIT / CREDIT Card
Number", null, 16, TextField.ANY | TextField.PASSWORD);
} return textField; }
public StringItem getStringItem() {
if (stringItem == null) {
stringItem = new StringItem("SBI Terms & Conditions*",
"Additionally a processing fee will be charged on the
credit or debit transactions amount at the rate of 2%
subject to a minimum on the given amount will be
applied.");
} return stringItem; }
public Image getImage4() {
if (image4 == null) {
try { image4 = Image.createImage("/book_my_show/Sbi.PNG");
} catch (java.io.IOException e) {
} } return image4; }
26. 26
Task 14 Confirm Transaction Alert
Screen
public Alert getAlert3() {
if (alert3 == null) {
alert3 = new Alert("Confirmation", "Are you sure u
want to proceed with transaction ?", null,
AlertType.CONFIRMATION);
alert3.addCommand(getBackCommand9());
alert3.addCommand(getOkCommand10());
alert3.setCommandListener(this);
alert3.setIndicator(getIndicator());
alert3.setTimeout(Alert.FOREVER);
} return alert3; }
27. 27
Task 15 Booking Done Screen
public Form getFormCongratz() {
if (formCongratz == null) {
formCongratz = new Form("Booking Done", new Item[]{getImageItem3()});
formCongratz.addCommand(getExitCommand2());
formCongratz.setCommandListener(this);
} return formCongratz; }
public Image getImage5() {
if (image5 == null) {
try {
image5 = Image.createImage("/book_my_show/congratulations.png");
} catch (java.io.IOException e) { }
} return image5; }
28. 28
Task 16 Start App, Pause App, Destroy App Code
public Display getDisplay() {
return Display.getDisplay(this);
}
public void exitMIDlet() {
switchDisplayable(null, null);
destroyApp(true);
notifyDestroyed();
}
public void startApp() {
if (midletPaused) {
resumeMIDlet();
} else {
initialize();
startMIDlet();
}
midletPaused = false;
}
public void pauseApp() {
midletPaused = true;
}
public void destroyApp(boolean unconditional) {
}
}
29. 29
Task 17 Command Action Method Code
public void commandAction(Command command, Displayable displayable) {
public Command getExitCommand() {
if (exitCommand == null) {
exitCommand = new Command("EXIT", Command.EXIT, 0);
}
return exitCommand;
}
public Command getScreenCommand() {
if (screenCommand == null) {
screenCommand = new Command("BookScreen", Command.SCREEN, 0);
}
return screenCommand;
}}
public Command getOkCommand() {
if (okCommand == null) {
okCommand = new Command("SELECT", Command.OK, 0);
}
return okCommand;
}
}}}
public Command getBackCommand() {
if (backCommand == null) {
backCommand = new Command("BACK", Command.BACK, 0);
}
return backCommand; }
30. 30
public Command getOkCommand2() {
if (okCommand2 == null) {
okCommand2 = new Command("PICK SEATS", Command.OK, 0);
}
return okCommand2;
}
if (displayable == alert3) {
if (command == backCommand9) {
switchDisplayable(null, getFormSBICardDetails());
} else if (command == okCommand10) {
switchDisplayable(null, getFormCongratz());
}
} else if (displayable == form2States) {
if (command == backCommand2) {
switchDisplayable(null, getListMovies());
}
} else if (displayable == formCaptainAmerica) {
if (command == backCommand12) {
switchDisplayable(null, getListMovies());
}
} else if (displayable == formCardSelect) {
if (command == backCommand6) {
switchDisplayable(null, getFormReviewDetails());
} else if (command == okCommand7) {
switchDisplayable(null, getListBankCards());
}
} else if (displayable == formCongratz) {
31. 31
if (command == exitCommand2) {
exitMIDlet();
}
} else if (displayable == formExpandables3) {
if (command == backCommand) {
switchDisplayable(null, getListMovies());
}
} else if (displayable == formMaiTeraHero) {
if (command == backCommand10) {
switchDisplayable(null, getListMovies());
}
} else if (displayable == formPickSeats) {
if (command == backCommand3) {
switchDisplayable(null, getFormTicketType());
} else if (command == okCommand4) {
switchDisplayable(null, getFormProvideUrDetails());
}
} else if (displayable == formProvideUrDetails) {
if (command == backCommand4) {
switchDisplayable(null, getFormPickSeats());
} else if (command == okCommand5) {
switchDisplayable(null, getFormReviewDetails());
}
} else if (displayable == formReviewDetails) {
if (command == backCommand5) {
switchDisplayable(null, getFormProvideUrDetails());
} else if (command == okCommand6) {
32. 32
switchDisplayable(null, getFormCardSelect());
}
} else if (displayable == formSBICardDetails) {
if (command == backCommand8) {
switchDisplayable(null, getListBankCards());
} else if (command == okCommand8) {
switchDisplayable(null, getAlert3());
}
} else if (displayable == formTicketType) {
if (command == backCommand) {
switchDisplayable(null, getFormVenuDateTime());
} else if (command == okCommand2) {
switchDisplayable(null, getFormPickSeats());
}
} else if (displayable == formVenuDateTime) {
if (command == backCommand) {
switchDisplayable(null, getListMovies());
} else if (command == okCommand3) {
switchDisplayable(null, getFormTicketType());
}
} else if (displayable == formYoungistaan) {
if (command == backCommand11) {
switchDisplayable(null, getListMovies());
}
} else if (displayable == list1) {
if (command == List.SELECT_COMMAND) {
list1Action();
33. 33
} else if (command == backCommand) {
switchDisplayable(null, getListHome());
}
} else if (displayable == listBankCards) {
if (command == List.SELECT_COMMAND) {
listBankCardsAction();
} else if (command == backCommand7) {
switchDisplayable(null, getFormCardSelect());
}
} else if (displayable == listHome) {
if (command == List.SELECT_COMMAND) {
listHomeAction();
} else if (command == exitCommand) {
exitMIDlet();
}
} else if (displayable == listMovies) {
if (command == List.SELECT_COMMAND) {
listMoviesAction();
} else if (command == backCommand) {
switchDisplayable(null, getList1());
} else if (command == okCommand) {
switchDisplayable(null, getFormVenuDateTime()); }
} else if (displayable == splashScreen) {
if (command == SplashScreen.DISMISS_COMMAND) {
switchDisplayable(null, getListHome());
} } }