#-*- encoding:utf-8 -*-
class
Box:
count
=
0
def
__init__(
self
,length,width,height):
self
.length
=
length
self
.width
=
width
self
.height
=
height
Box.count
=
Box.count
+
1
def
output(
self
):
self
.__v
=
self
.length
*
self
.width
*
self
.height
print
"length:"
+
str
(
self
.length)
print
"width:"
+
str
(
self
.width)
print
"height:"
+
str
(
self
.height)
print
"V:"
+
str
(
self
.__v)
print
"run times:"
+
str
(Box.count)
b1
=
Box(
1
,
2
,
3
)
b1.output()
b2
=
Box(
2
,
3
,
4
)
b2.output()
b3
=
Box(
3
,
4
,
5
)
b3.output()
b4
=
Box(
4
,
5
,
6
)
b4.output()
b5
=
Box(
6
,
7
,
8
)
b5.output()