-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrder.java
More file actions
43 lines (34 loc) · 936 Bytes
/
Order.java
File metadata and controls
43 lines (34 loc) · 936 Bytes
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
package oop;
public class Order {
private User user;
private Products products;
private CreditCard creditCard;
//CONSTRUCTOR FOR ORDER CLASS
public Order(User user, Products products, CreditCard creditCard){
this.user=user;
this.products=products;
this.creditCard=creditCard;
}
//GETTER AND SETTER METHODS OF ORDER CLASS
public void setUser(User user) {
this.user = user;
}
public void setCreditCard(CreditCard creditCard) {
this.creditCard = creditCard;
}
public void setProducts(Products products) {
this.products = products;
}
public User getUser() {
return this.user;
}
public Products getProducts() {
return this.products;
}
public CreditCard getCreditCard() {
return this.creditCard;
}
public void processOfOrder(){
user.orderProduct(products,creditCard);
}
}