Module com.prog3.ipt
Class SingleTicketConcreteFactory
java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocumentFactory
com.prog3.ipt.Model.TravelDocumentClasses.SingleTicketConcreteFactory
SingleTicketConcreteFactory is a concrete class that extends TravelDocumentFactory abstract class, made to implement Factory Method design pattern
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SingleTicketConcreteFactory
public SingleTicketConcreteFactory()
-
-
Method Details
-
createTravelDocument
public TravelDocument createTravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Returns a SingleTicket object according to the passing parameters- Specified by:
createTravelDocumentin classTravelDocumentFactory- Parameters:
price- The price of the travel documentissueDate- The issue date of the travel documentexpirationDate- The date of expire of the travel documenttransactionID- The unique identifier of the transaction which contains travel documents bought by the citizenlineID- The unique identifier of the line if the travel document is a single ticketrideID- The unique identifier of the ride if the travel document is a single ticketstampDate- The stamp date of the travel document, in particular a single ticketstartDate- The validity start date of the travel document if it is a membership- Returns:
- A reference to a SingleTicket object
-