Created buildup for the project

This commit is contained in:
Cezary Adamczak 2021-10-06 11:28:37 +02:00
parent 77be627248
commit ed20a714a5
8 changed files with 32 additions and 1 deletions

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)