-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
80 lines (49 loc) · 1.94 KB
/
main.py
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 module
from module_membership import Membership
print("TEST CASE 1")
print("----------------")
user_membership = Membership(username='Shandy')
user_membership.show_benefit()
print()
print("TEST CASE 2")
print("----------------")
user_membership.show_requirements()
print()
print("TEST CASE 3")
print("----------------")
expense_income = [9,12]
user_membership.predict_membership(monthly_expense=expense_income[0], monthly_income=expense_income[1])
print()
user_membership.user_data
print()
user_membership.show_membership(username='Shandy')
print("TEST CASE 4")
print("----------------")
list_harga_barang = [150_000, 200_000, 400_000]
user_membership.calculate_price(membership=user_membership.show_membership(username='Shandy'),
list_harga_barang=list_harga_barang)
print()
print("TEST CASE 5")
print("----------------")
list_harga_barang = [150_000, 200_000, 400_000]
user_membership.calculate_price(membership=user_membership.show_membership(username='Ana'),
list_harga_barang=list_harga_barang)
print("----------------")
print()
list_harga_barang = [150_000, 200_000, '400_000']
user_membership.calculate_price(membership=user_membership.show_membership(username='Ana'),
list_harga_barang=list_harga_barang)
print("----------------")
print()
list_harga_barang = [150_000, 200_000, 400_000]
user_membership.calculate_price(membership=user_membership.show_membership(username='Elsa'),
list_harga_barang=list_harga_barang)
print()
print("TEST CASE 6")
print("----------------")
user_bambang = Membership(username='Bambang')
user_bambang.predict_membership(monthly_expense=3, monthly_income=4)
print()
list_harga_barang = [300_000, 150_000, 1_250_000, 15_000]
user_bambang.calculate_price(membership=user_bambang.show_membership(username='Bambang'),
list_harga_barang=list_harga_barang)