package com.zipcoder.payment; public class PayPal implements Payment { private long id; private String payerName; private String email; public PayPal(){}; public PayPal(long id, String payerName, String email){ this.id = id; this.payerName = payerName; this.email = email; } public Long getId() { return this.id; } public void setId(long id) { this.id = id; } public String getPayerName() { return this.payerName; } public void setPayerName(String payerName) { this.payerName = payerName; } public String getEmail() { return this.email; } public void setEmail(String email) { this.email = email; } public String getShortDescription() { return "PayPal" + " " + getPayerName() + " " + getEmail(); } public int compareTo(Payment o) { int n = this.getShortDescription().compareTo(o.getShortDescription()); return n; } }