| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- public class PayPal implements Payment {
- long id;
- String payerName;
- String email;
-
- public PayPal(long l, String tia_mowry, String s){
- this.id = l;
- this.payerName = tia_mowry;
- this.email = s;
- }
-
- public PayPal(long id, String payerName, String number, String email){}
-
-
-
- public void setId(long id) {
- this.id = id;
- }
-
- public long getId() {
- return id;
- }
-
-
- public void setPayerName(String payerName){
- this.payerName = payerName;
-
- }
-
- public String getPayerName() {
- return this.payerName;
-
- }
-
- public void setEmail(String email) {
- this.email = email;
- }
-
- public String getEmail(){
-
- return this.email;
- }
-
- public String getShortDescription() {
- return "PayPal " + getPayerName() + " " + getEmail();
- }
-
-
- public int compareTo(Payment o) {
- PayPal payPal = new PayPal(4L, "Tia Mowry", "tia@mowry.com");
- if ( this.getShortDescription().compareTo(o.getShortDescription()) == 0 )
- {return 0;}
- else if ( this.getShortDescription().compareTo(o.getShortDescription()) < 0 ){
- return 1;}
- else return -1;
- }
-
-
- }
|