Question

In: Computer Science

Description: The purpose of the program is to create a Java ticket purchasing program that allows...

Description: The purpose of the program is to create a Java ticket purchasing program that allows for users to log in, purchase tickets, keep records of tickets purchased, and keep information about the user.

Program Requirements: The following are the program requirements:

  1. Must be fully functioning including registration, log-in, view events, and purchase tickets
  2. Tickets should be purchased using “points”, no information should be provided via the user for payment method. Default each user to an allotted number of points and have a way to add to the points from the menu.
  3. Must include a user interface for the user to interact with (this can be through command line interface or graphical interface. Either way, it should be clearly and easily navigated.)
  4. The program should be clearly commented and documented
  5. The program should use a client-server configuration. Data for the users should be kept on the server either in files or a mysql database and the client program should request the data from the server.
  6. At least 2 vulnerabilities must be left in the program. The vulnerabilities should be documented in private documentation. All other vulnerabilities should be considered and mitigated.

Deliverables: All program code and documentation including a user guide.

Solutions

Expert Solution

Java ticket purchasing program that allows for users to log in, purchase tickets, keep records of tickets purchased, and keep information about the user

How to implement seat booking process?

Solution :

The Main Classes to be used for the user personas :

  • User
  • Movie
  • Theater
  • Booking
  • Address
  • Facilities

Here we create  movie ticket booking system like Bookmyshow....you just have to change name class movie to get your program.

//CODE

// Java skeleton code to design an online Ticket booking system.
// booking system.
Enums :

   public enum SeatStatus {
   SEAT_BOOKED,
   SEAT_NOT_BOOKED;
}

public enum MovieStatus {
   Movie_Available,
   Movie_NotAvailable;
}

public enum MovieType {
   ENGLISH,
   HINDI;
}

public enum SeatType {
   NORMAL,
   EXECUTIVE,
   PREMIUM,
   VIP;
}

public enum PaymentStatus {
   PAID,
   UNPAID;
}

class User {

   int userId;
   String name;
   Date dateOfBirth;
   String mobNo;
   String emailId;
   String sex;
}

class Movie {

   int movieId;
   int theaterId;
   MovieType movieType;
   MovieStatus movieStatus;
}

class Theater {

   int theaterId;
   String theaterName;
   Adress adress;

   List<Movie> movies;
   float rating;
}

class Booking {
   int bookingId;
   int userId;
   int movieId;
   List<Movie> bookedSeats;
   int amount;
   PaymentStatus status_of_payment;
   Date booked_date;
   Time movie_timing;
}

class Address {

   String city;
   String pinCode;
   String state;
   String streetNo;
   String landmark;
}
/*This is an OOP design question, so full code is not required. The above code has classes and attributes only. In the above code, as you can see enums are self-explanatory.
We have users class in which users details are kept.
Theater class in which name of the theater, it’s address and list of movies currently running are kept.
Booking class lets you book the seat in a particular theater. It keeps a reference in Movie, Payment class.*/

This is your answer just run the code in compiler.


Related Solutions

Create a java program that allows people to buy tickets to a concert. Using java create...
Create a java program that allows people to buy tickets to a concert. Using java create a program that asks for the users name, and if they want an adult or teen ticket. As long as the user wants to purchase a ticket the program with "yes" the program will continue. When the user inputs "no" the program will output the customer name, total amount of tickets, and the total price. The adult ticket is $60 and the child ticket...
JAVA PROGRAM Overview : You will create a card deck program that allows the player to...
JAVA PROGRAM Overview : You will create a card deck program that allows the player to shuffle a deck of cards and play a game that draws and plays cards until all cards in the deck have been used. Instructions: The application must be able to perform the following tasks : 1. At the start of a new game, it shuffles all cards using a deck shuffler 2. The player then draws X number of cards from the deck and...
(JAVA) Create a program that creates a mini database of numbers that allows the user to:...
(JAVA) Create a program that creates a mini database of numbers that allows the user to: reset the database, print the database, add a number to the database, find the sum of the elements in the database, or quit. In main, you will declare an array of 10 integers (this is a requirement). Then you will define the following methods: • printArray (int[ ] arr) – this takes in an array and prints it • initArray (int[ ] arr) –...
Using Repl.it In this assignment you will create a Java program that allows a Bank customer...
Using Repl.it In this assignment you will create a Java program that allows a Bank customer to do the following: 1) Create a bank account by supplying a user id and password .2) Login using their id and password 3) Quit the program. Now if login was successful the user will be able to do the following: 1) Withdraw money. 2) Deposit money. 3) Request balance. 4) Quit the program. If login was not successful (for example the id or...
Java I'm trying to create a program that replicates a theater ticket reservation system. I have...
Java I'm trying to create a program that replicates a theater ticket reservation system. I have a Seat class with members row(integer), seat(character) and ticketType(character). Where a ticket type can be 'A' adult, 'C' child, 'S' senior, or '.' recorded as empty. I have a Node generic class that points to other nodes(members): up, Down. Left, Right. It also has a generic payload. Lastly, I have an Auditorium class which is also generic. its member is a First Node<T>. As...
I. General Description In this assignment, you will create a Java program to read undergraduate and...
I. General Description In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, sort them, and write them to an output file. This assignment is a follow up of assignment 5. Like assignment 5, your program will read from an input file and write to an output file. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. Unlike...
I. General Description In this assignment, you will create a Java program to read undergraduate and...
I. General Description In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, and write them in reverse order to an output file. 1. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. For example, assume your package name is FuAssign5 and your main class name is FuAssignment5, and your executable files are in “C:\Users\2734848\eclipse-workspace\CIS 265 Assignments\bin”. The...
I. General Description In this assignment, you will create a Java program to read undergraduate and...
I. General Description In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, sort them, and write them to an output file. This assignment is a follow up of assignment 5. Like assignment 5, your program will read from an input file and write to an output file. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. Unlike...
I. General Description In this assignment, you will create a Java program to search recursively for...
I. General Description In this assignment, you will create a Java program to search recursively for a file in a directory. • The program must take two command line parameters. First parameter is the folder to search for. The second parameter is the filename to look for, which may only be a partial name. • If incorrect number of parameters are given, your program should print an error message and show the correct format. • Your program must search recursively...
I. General Description In this assignment, you will create a Java program to read undergraduate and...
I. General Description In this assignment, you will create a Java program to read undergraduate and graduate students from an input file, sort them, and write them to an output file. This assignment is a follow up of assignment 5. Like assignment 5, your program will read from an input file and write to an output file. The input file name and the output file name are passed in as the first and second arguments at command line, respectively. Unlike...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT