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

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...
JAVA Exercise BasketBall Bar Chart Write a program that allows you to create a bar chart...
JAVA Exercise BasketBall Bar Chart Write a program that allows you to create a bar chart for the active members of a basketball team during a game. (Recall: there are only 5 active players on the court per team in a standard basketball game.) Your program should do the following tasks: • Prompt the user to store the first name of the five players • Prompt the user to enter the points scored by each player a. Use a while...
I want to write this program in java. Write a simple airline ticket reservation program in...
I want to write this program in java. Write a simple airline ticket reservation program in java.The program should display a menu with the following options: reserve a ticket, cancel a reservation, check whether a ticket is reserved for a particular person, and display the passengers. The information is maintained on an alphabetized linked list of names. In a simpler version of the program, assume that tickets are reserved for only one flight. In a fuller version, place no limit...
Write a program for Bob’s Bus Company that allows a user check on ticket prices following...
Write a program for Bob’s Bus Company that allows a user check on ticket prices following the guidelines below: Zones Crossed --------------------------- Passengers 0 1 2 3 ---------------------------------------- 1 7.50 10.00 12.00 12.75 2 14.00 18.50 22.00 23.00 3 20.00 21.00 32.00 33.00 4 25.00 27.50 36.00 37.00 The user enters ticket data (number of passengers and number of zones crossed) continuously until a sentinel value, -1 for passengers, is entered. When -1 is entered for number of passengers, there...
Create a Python program that: Allows the user to enter a phrase or sentence. The program...
Create a Python program that: Allows the user to enter a phrase or sentence. The program should then take the phrase or sentence entered Separate out the individual words entered Each individual word should then be added to a list After all of the words have been place in a list Sort the contents of the list Display the contents of the sorted list with each individual word displayed on a separate line Display a message to the user indicating...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT