From f54e58c29959f16611ec776a5e2eb2c75487d773 Mon Sep 17 00:00:00 2001 From: LizOrtizRodGL Date: Tue, 21 May 2024 08:42:37 -0400 Subject: [PATCH] Update Ticket.java --- _02_05b/Ticket.java | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/_02_05b/Ticket.java b/_02_05b/Ticket.java index 339f8a0..45498d7 100644 --- a/_02_05b/Ticket.java +++ b/_02_05b/Ticket.java @@ -12,8 +12,33 @@ public Ticket() { // Add three public methods to set the value of each field, called // setDestination, setPrice and setIsReturn. + public void setDestination(String destination){ + this.destination = destination; + } + + public void setPrice(double price){ + this.price = price; + } + + public void setIsReturn(boolean isReturn){ + this.isReturn = isReturn; + } + + // Add three public methods to get the value of each field, called // getDestination, getPrice and getIsReturn. + public String getDestination{ + return destination; + } + + public double getPrice{ + return price; + } + + public booloean getIsReturn{ + return isReturn; + } + }