GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
tutorial
>
CAR
+
Point of view
All features
ANY
All features
class CAR
Summary
top
Direct parents
Insert list:
ANY
Overview
top
Creation features
{
PARKING
}
make
(n:
INTEGER_32
, at:
DATE
)
Features
{
ANY
}
number
:
INTEGER_32
The number of the
CAR
.
arrival_time
:
DATE
Of this
CAR
in the parking.
price
(departure_time:
DATE
, hour_price:
REAL_64
):
REAL_64
Compute the price to pay according to
departure_time
and
hour_price
.
{}
make
(n:
INTEGER_32
, at:
DATE
)
number
:
INTEGER_32
writable attribute
{
ANY
}
top
The number of the
CAR
.
arrival_time
:
DATE
writable attribute
{
ANY
}
top
Of this
CAR
in the parking.
price
(departure_time:
DATE
, hour_price:
REAL_64
):
REAL_64
effective function
{
ANY
}
top
Compute the price to pay according to
departure_time
and
hour_price
.
require
departure_time >=
arrival_time
make
(n:
INTEGER_32
, at:
DATE
)
effective procedure
{}
top
require
n > 0
at /= Void
ensure
number
= n
arrival_time
= at