Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DiscountTicket extends Ticket {
- String buyer;
- public DiscountTicket(String performance, double price, String buyer) {
- super(performance, price / 2); //the price is 50% the original
- this.buyer = buyer;
- }
- public String getBuyer() {
- return buyer;
- }
- public void setBuyer(String buyer) {
- this.buyer = buyer;
- }
- @Override
- public String toString() {
- return "DiscountTicket [buyer=" + buyer + ", performance=" + performance + ", price=" + price + ", people="
- + people + "]";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement