Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions _02_05b/Ticket.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}