-
Notifications
You must be signed in to change notification settings - Fork 0
/
Screen.py
113 lines (86 loc) · 2.89 KB
/
Screen.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 17 00:11:33 2020
@author: hp
"""
class Screen:
@staticmethod
def promptPin():
print('Please enter your Pin Number: ')
@staticmethod
def displayLogin():
print('Please enter your card.')
@staticmethod
def displayHomeScreen(bank_name):
print('Welcome to ' + bank_name + '!')
@staticmethod
def displayOptions(message):
print(message)
@staticmethod
def displayWithdrawalMessage(amount):
print('Withdrawing ' + amount)
@staticmethod
def displayDepositMessage(amount, account_name):
print('Depositing ' + amount + ' into ' + account_name)
@staticmethod
def displayTransferMessage(amount, account_name1, account_name2):
print("Transferring " + amount + " between " + account_name1 + " and " + account_name2)
@staticmethod
def displayExitMessage():
print("Thank you, Goodbye!")
@staticmethod
def displaySuccessfulValidation():
print('no errors found.')
@staticmethod
def displayIncorrectPin():
print("Incorrect PIN entered.")
@staticmethod
def displaySuccessfulPin():
print("correct pin.")
@staticmethod
def displayAttemptsRemaining(attempts):
print("You have " + attempts + " attempts remaining")
@staticmethod
def displayPromptAccountName():
print("Please enter the name of the account: ")
@staticmethod
def displayBalance(message):
print(message)
@staticmethod
def displayAccountsList(account_list):
print("Your accounts: ", end = '')
message = list("")
for account in account_list:
message.append(account.getAccountName())
message.append(", ")
message[len(message) - 1] = ""
string = "".join(message)
print(string)
@staticmethod
def displayAskWithdrawal():
print("How much would you like to withdrawal?")
@staticmethod
def displayOverWithdrawal():
print("You are exceeding the amount of your bank account, please try again")
@staticmethod
def promptWithdrawQuestion():
print("Which account would you like to withdrawal from?")
@staticmethod
def promptDonorAccount():
print("Which account would you like to send money from?")
@staticmethod
def promptRecipientAccount():
print("Which account would you like to send money to?")
@staticmethod
def selectTransferAmount():
print("How much would you like to transfer?")
@staticmethod
def confirmTransfer():
print("Are you sure you would like to complete this transaction?")
print("1. Yes.")
print("2. No.")
answer = input()
if int(answer) == 1:
return True
else:
return False