APO-1 merge to master #1

Merged
s452664 merged 3 commits from APO-1 into master 2021-10-13 00:08:02 +02:00
8 changed files with 32 additions and 1 deletions
Showing only changes of commit ed20a714a5 - Show all commits

10
main.py
View File

@ -1 +1,9 @@
print("It's alive!") from src.cards.cards import cards
from src.tools.tools import *
from src.modules.Card import Card
card = cards[int(input("Chose a card from 1 to " + str(len(cards)) + ": ")) - 1]
PrintCardInfo(Card(card["number"], card["name"], card["surname"], card["type"]))

View File

@ -0,0 +1,5 @@
cards = [
{"number": "1111222233334444", "name": "John", "surname": "Doe", "type": "Credit", "pin": "1234", "clientID": "1234abcd"},
{"number": "2222333344445555", "name": "Jane", "surname": "Doe", "type": "Prepaid", "pin": "2345", "clientID": "2345bcde"},
{"number": "3333444455556666", "name": "Eric", "surname": "Gudmundson", "type": "ATM", "pin": "3456", "clientID": "3456cdef"},
]

Binary file not shown.

6
src/cards/cards.py Normal file
View File

@ -0,0 +1,6 @@
cards = [
{"number": "1111222233334444", "name": "John", "surname": "Doe", "type": "Credit"},
{"number": "2222333344445555", "name": "Jane", "surname": "Doe", "type": "Prepaid"},
{"number": "3333444455556666", "name": "Eric", "surname": "Gudmundson", "type": "ATM"},
{"number": "444666", "name": "Adam", "surname": "Somm", "type": "University ID"},
]

7
src/modules/Card.py Normal file
View File

@ -0,0 +1,7 @@
class Card:
def __init__(self, ownerName, ownerSurname, number, type):
self.ownerName = ownerName
self.ownerSurname = ownerSurname
self.number = number
self.type = type

Binary file not shown.

Binary file not shown.

5
src/tools/tools.py Normal file
View File

@ -0,0 +1,5 @@
def PrintCardInfo(card):
print("Owner's Name: " + card.ownerName)
print("Owner's Surname: " + card.ownerSurname)
print("Card's Number: " + card.number)
print("Card's Type: " + card.type)