gestion-banco-correa 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
|
|
3
|
+
class Cliente:
|
|
4
|
+
def __init__(self, nombre: str, identificacion: str):
|
|
5
|
+
self.nombre = nombre
|
|
6
|
+
self.identificacion = identificacion
|
|
7
|
+
|
|
8
|
+
def obtener_datos(self) -> str:
|
|
9
|
+
return f"Cliente: {self.nombre}, ID: {self.identificacion}"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Transaccion:
|
|
13
|
+
def __init__(self, tipo: str, monto: float):
|
|
14
|
+
self.tipo = tipo
|
|
15
|
+
self.monto = monto
|
|
16
|
+
self.fecha = datetime.now()
|
|
17
|
+
self.estado = "Exitosa"
|
|
18
|
+
|
|
19
|
+
def obtener_detalles(self) -> str:
|
|
20
|
+
return (f"Tipo: {self.tipo}\n"
|
|
21
|
+
f"Monto: ${self.monto:.2f}\n"
|
|
22
|
+
f"Fecha: {self.fecha.strftime('%Y-%m-%d %H:%M:%S')}\n"
|
|
23
|
+
f"Estado: {self.estado}")
|
|
24
|
+
|
|
25
|
+
def imprimir_comprobante(self):
|
|
26
|
+
print("----- Comprobante de Transacci贸n -----")
|
|
27
|
+
print(self.obtener_detalles())
|
|
28
|
+
print("-------------------------------------\n")
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class CuentaAhorros:
|
|
32
|
+
def __init__(self, numero_cuenta: str, cliente: Cliente):
|
|
33
|
+
self.numero_cuenta = numero_cuenta
|
|
34
|
+
self.cliente = cliente
|
|
35
|
+
self.saldo = 0.0
|
|
36
|
+
self.transacciones = []
|
|
37
|
+
|
|
38
|
+
def depositar(self, monto: float) -> bool:
|
|
39
|
+
if monto <= 0:
|
|
40
|
+
print("Error: El monto a depositar debe ser positivo.")
|
|
41
|
+
return False
|
|
42
|
+
self.saldo += monto
|
|
43
|
+
transaccion = Transaccion("Dep贸sito", monto)
|
|
44
|
+
self.transacciones.append(transaccion)
|
|
45
|
+
transaccion.imprimir_comprobante()
|
|
46
|
+
return True
|
|
47
|
+
|
|
48
|
+
def retirar(self, monto: float) -> bool:
|
|
49
|
+
if monto <= 0:
|
|
50
|
+
print("Error: El monto a retirar debe ser positivo.")
|
|
51
|
+
return False
|
|
52
|
+
if monto > self.saldo:
|
|
53
|
+
print("Error: Saldo insuficiente.")
|
|
54
|
+
return False
|
|
55
|
+
self.saldo -= monto
|
|
56
|
+
transaccion = Transaccion("Retiro", monto)
|
|
57
|
+
self.transacciones.append(transaccion)
|
|
58
|
+
transaccion.imprimir_comprobante()
|
|
59
|
+
return True
|
|
60
|
+
|
|
61
|
+
def obtener_saldo(self):
|
|
62
|
+
return self.saldo
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Cajero:
|
|
66
|
+
def __init__(self, nombre):
|
|
67
|
+
self.nombre = nombre
|
|
68
|
+
|
|
69
|
+
def crear_cuenta(self, cliente, numero):
|
|
70
|
+
cuenta = CuentaAhorros(numero, cliente)
|
|
71
|
+
print("Cuenta creada")
|
|
72
|
+
return cuenta
|
|
73
|
+
|
|
74
|
+
def registrar_deposito(self, cuenta, monto):
|
|
75
|
+
cuenta.depositar(monto)
|
|
76
|
+
|
|
77
|
+
def registrar_retiro(self, cuenta, monto):
|
|
78
|
+
cuenta.retirar(monto)
|
|
79
|
+
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gestion_banco_correa
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Paquete bancario con Programaci贸n Orientada a Objetos
|
|
5
|
+
Author: Jhon Alexander Correa Gallegos
|
|
6
|
+
Author-email: jhon@example.com
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Dynamic: author
|
|
10
|
+
Dynamic: author-email
|
|
11
|
+
Dynamic: description
|
|
12
|
+
Dynamic: description-content-type
|
|
13
|
+
Dynamic: requires-python
|
|
14
|
+
Dynamic: summary
|
|
15
|
+
|
|
16
|
+
# Gesti贸n Banco Correa 馃彟
|
|
17
|
+
|
|
18
|
+
Proyecto desarrollado en Python que simula el funcionamiento b谩sico de un sistema bancario.
|
|
19
|
+
|
|
20
|
+
Permite crear cuentas, realizar dep贸sitos, retiros y mostrar el saldo final, aplicando Programaci贸n Orientada a Objetos (POO).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 馃搶 Funcionalidades
|
|
25
|
+
|
|
26
|
+
- Crear cuenta de ahorros
|
|
27
|
+
- Registrar dep贸sitos
|
|
28
|
+
- Registrar retiros
|
|
29
|
+
- Validar saldo disponible
|
|
30
|
+
- Generar comprobantes de transacci贸n
|
|
31
|
+
- Mostrar saldo final
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 馃洜 Tecnolog铆as utilizadas
|
|
36
|
+
|
|
37
|
+
- Python 3
|
|
38
|
+
- Visual Studio Code
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 鈻讹笍 C贸mo ejecutar el proyecto
|
|
43
|
+
|
|
44
|
+
1. Abrir la carpeta del proyecto en VS Code.
|
|
45
|
+
|
|
46
|
+
2. Abrir la terminal integrada.
|
|
47
|
+
|
|
48
|
+
3. Ejecutar:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
python gestion_banco_correa/gestion_banco_correa.py
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 馃搳 Ejemplo de ejecuci贸n
|
|
55
|
+
|
|
56
|
+
El sistema realiza:
|
|
57
|
+
|
|
58
|
+
- Dep贸sito de 100
|
|
59
|
+
- Retiro de 40
|
|
60
|
+
|
|
61
|
+
Resultado en consola:
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 鉁嶏笍 Autor
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
Jhon Correa
|
|
68
|
+
Estudiante
|
|
69
|
+
```md
|
|
70
|
+
```text
|
|
71
|
+
Comprobante de Transacci贸n
|
|
72
|
+
Tipo: Retiro
|
|
73
|
+
Monto: $40.00
|
|
74
|
+
Fecha: 2026-02-03 18:23:25
|
|
75
|
+
Estado: Exitosa
|
|
76
|
+
|
|
77
|
+
Saldo final: 60.0
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
gestion_banco_correa/__init__.py,sha256=tvQD9KoWxUbYAx8kraX5mUxQArsX6DXrHgeJvQzIXVI,25
|
|
2
|
+
gestion_banco_correa/gestion_banco_correa.py,sha256=RLDgNJNlmBKJFZot99QcKXQ6acjn03gO0WBmfsH9vpU,2446
|
|
3
|
+
gestion_banco_correa-0.1.0.dist-info/METADATA,sha256=pdh3jcRl65kdGqbsIaaTpPY0uhki3EBkoD5cbTD0J1E,1482
|
|
4
|
+
gestion_banco_correa-0.1.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
5
|
+
gestion_banco_correa-0.1.0.dist-info/top_level.txt,sha256=Fwk03lI71_HdfLguzcsW9a8JB4RNCaXaeT3PamUKwRU,21
|
|
6
|
+
gestion_banco_correa-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
gestion_banco_correa
|