Package src.view
Class PaymentView
View for movie goer after selecting the seats for purchase
- Version:
- 1.0
- Author:
- Lee Juin, Yeek Sheng, Jerick
-
Constructor Summary
ConstructorDescriptionPaymentView
(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 TypeMethodDescriptionvoid
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 invalidGets the payment objectvoid
Method that prints boiler plate and displays the choices that the user has to payvoid
Method that prints out details of a successful paymentvoid
printReceipt
(String paymentMethod) Method that prints out receipt containing paymentID, transactionID, paymentMethod, MovieTicketPriceMethods inherited from class MainView
printBoilerPlate, printMenuContent
-
Constructor Details
-
PaymentView
Creates a PaymentView with the cinemaCode, movieSchedule and totalMovieTicketPrice Generates a transactionID based on the cinemaCode- Parameters:
cinemaCode
- string of the cinema chosentotalMovieTicketPrice
- Total movie ticket price for all seats chosen for the moviemovieSchedule
- schedule chosen for the movie type
-
-
Method Details
-
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 -
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 classMainView
-
printPaymentSuccessful
public void printPaymentSuccessful()Method that prints out details of a successful payment -
printReceipt
Method that prints out receipt containing paymentID, transactionID, paymentMethod, MovieTicketPrice- Parameters:
paymentMethod
- String of Card Payment, QR Code or Bank Transaction
-