Package src.view

Class PaymentView

Object
MainView
PaymentView

public class PaymentView extends MainView
View for movie goer after selecting the seats for purchase
Version:
1.0
Author:
Lee Juin, Yeek Sheng, Jerick
  • Constructor Summary

    Constructors
    Constructor
    Description
    PaymentView(String cinemaCode, double totalMovieTicketPrice, MovieSchedule movieSchedule)
    Creates a PaymentView with the cinemaCode, movieSchedule and totalMovieTicketPrice Generates a transactionID based on the cinemaCode
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Method that takes in the choice of the payment method, and requires user to key in relevant payment details User will be prompted to re-enter information if int or String keyed in is invalid
    Gets the payment object
    void
    Method that prints boiler plate and displays the choices that the user has to pay
    void
    Method that prints out details of a successful payment
    void
    printReceipt(String paymentMethod)
    Method that prints out receipt containing paymentID, transactionID, paymentMethod, MovieTicketPrice

    Methods inherited from class MainView

    printBoilerPlate, printMenuContent

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PaymentView

      public PaymentView(String cinemaCode, double totalMovieTicketPrice, MovieSchedule movieSchedule)
      Creates a PaymentView with the cinemaCode, movieSchedule and totalMovieTicketPrice Generates a transactionID based on the cinemaCode
      Parameters:
      cinemaCode - string of the cinema chosen
      totalMovieTicketPrice - Total movie ticket price for all seats chosen for the movie
      movieSchedule - schedule chosen for the movie type
  • Method Details

    • getPayment

      public Payment getPayment()
      Gets the payment object
      Returns:
      Payment object
    • printMenu

      public void printMenu()
      Method that prints boiler plate and displays the choices that the user has to pay
      Specified by:
      printMenu in class MainView
    • appContent

      public void appContent()
      Method that takes in the choice of the payment method, and requires user to key in relevant payment details User will be prompted to re-enter information if int or String keyed in is invalid
      Specified by:
      appContent in class MainView
    • printPaymentSuccessful

      public void printPaymentSuccessful()
      Method that prints out details of a successful payment
    • printReceipt

      public void printReceipt(String paymentMethod)
      Method that prints out receipt containing paymentID, transactionID, paymentMethod, MovieTicketPrice
      Parameters:
      paymentMethod - String of Card Payment, QR Code or Bank Transaction