Module com.prog3.ipt
Class MembershipConcreteFactory
java.lang.Object
com.prog3.ipt.Model.TravelDocumentClasses.TravelDocumentFactory
com.prog3.ipt.Model.TravelDocumentClasses.MembershipConcreteFactory
MembershipConcreteFactory is a concrete class that extends TravelDocumentFactory abstract class, made to implement Factory Method design pattern
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MembershipConcreteFactory
public MembershipConcreteFactory()
-
-
Method Details
-
createTravelDocument
public TravelDocument createTravelDocument(double price, LocalDate issueDate, LocalDate expirationDate, String transactionID, String lineID, String rideID, LocalDate stampDate, LocalDate startDate) Returns a Membership object according to the passing parameters- Specified by:
createTravelDocument
in 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:
- TravelDocument
-