-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPayment.java
80 lines (66 loc) · 1.93 KB
/
Payment.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import java.io.*;
import java.util.*;
//Payment.java
//Payment class to store payment information
public class Payment implements Serializable {
//Instance Variables
private TypeCard cardType;
private BrandCard cardBrand;
private String cardNumber;
private Date expDate;
private String nameOnCard;
//end Instance Variables
//begin Class Methods
//Null Constructor
public Payment() {
this.cardType = null;
this.cardBrand = null;
this.cardNumber = null;
this.expDate = null;
this.nameOnCard = null;
}//end Null Constructor
//Constructor
public Payment( //begin constructor parameters
TypeCard iCardType,
BrandCard iCardBrand,
String iCardNumber,
Date iEXPDate,
String iNameOnCard) { //end constructor parameters
this.cardType = iCardType;
this.cardBrand = iCardBrand;
this.cardNumber = iCardNumber;
this.expDate = iEXPDate;
this.nameOnCard = iNameOnCard;
}//end Constructor
public void setCardType(TypeCard newCardType) {
this.cardType = newCardType;
}//end setCardType
public TypeCard getCardType() {
return this.cardType;
}//end getCardType
public void setCardBrand(BrandCard newCardBrand) {
this.cardBrand = newCardBrand;
}//end setCardBrand
public BrandCard getCardBrand() {
return this.cardBrand;
}//end getCardBrand
public void setCardNumber(String newCardNumber) {
this.cardNumber = newCardNumber;
}//end setCardNumber
public String getCardNumber() {
return this.cardNumber;
}//end getCardNumber
public void setEXPDate(Date newEXPDate) {
this.expDate = newEXPDate;
}//end setEXPDate
public Date getEXPDate() {
return this.expDate;
}//end getEXPDate
public void setNameOnCard(String newNameOnCard) {
this.nameOnCard = newNameOnCard;
}//end setNameOnCard
public String getNameOnCard() {
return this.nameOnCard;
}//end getNameOnCard
//end class methods
} //end Payment