saving copy-pasta code from course

This commit is contained in:
2022-01-19 15:18:44 -06:00
parent a0d6e153d1
commit ab35b8760f
5 changed files with 20 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
from .animal import Animal
+14
View File
@@ -0,0 +1,14 @@
class Animal():
# Class initializer. It has 5 custom parameters, with the
# special `self` parameter that every method on a class
# needs as the first parameter.
def __init__(self, id, name, breed, status, location_id, customer_id):
self.id = id
self.name = name
self.breed = breed
self.status = status
self.location_id = location_id
self.customer_id = customer_id
new_animal = Animal(1, "Snickers", "Dog", "Recreation", 1, 4)
View File
View File
+5
View File
@@ -0,0 +1,5 @@
class Location():
def __init__(self, id, address):
self.id = id
self.address = address