-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClass.py
More file actions
44 lines (26 loc) · 724 Bytes
/
Copy pathClass.py
File metadata and controls
44 lines (26 loc) · 724 Bytes
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
f = open("record.txt")
# this is person class
class Person:
def __init__(self, name,company):
self.name = name
self.company = company
# this is company class
class Company:
def __init__(self,name,product):
self.name = name
self.product = product
self.storage = {
self.product:0.0,
product.material:1.0
}
self.account = 0.0
def produce():pass
def deal(other,product,num):pass
# this is product class
class Product:
def __init__(self,name,material,price):
self.name = name
self.material = material
self.cost = 1.1
self.price = price #price of one product
class Government (Company):pass