-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathECommerceApp.java
More file actions
30 lines (25 loc) · 801 Bytes
/
ECommerceApp.java
File metadata and controls
30 lines (25 loc) · 801 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
class PaymentGateway {
public void makePayment(String cardNumber,String expiryDate,String cvv) {
System.out.println("Processing Payment.......");
System.out.println("Credit Card Payment Successful");
System.out.println("Thank You!");
}
public void makePayment(String upiid) {
System.out.println("Processing UPI Payment.......");
System.out.println("UPI Payment Successful");
System.out.println("Thank You!");
}
public void makePayment(double amount) {
System.out.println("Cash on Delivery Payment Successful");
}
}
public class ECommerceApp {
public static void main(String[] args) {
PaymentGateway product= new PaymentGateway();
product.makePayment("Card Number","ExpiryDate","CVV");
upi=product.makePayment("UPIID");
cod=product.makePayment(35000);
}
}
}
}