Read the guideline before starting.
You are a visitor of aqua-park. There are several slides with different limitations of height, weight and age. Let's create a system that determines whether a visitor can use the slide depending on the own parameters.
To implement it, create the following classes:
Its __init__
method takes 2 values and stores them:
min_amount
- min integer accessible value of the visitor's parametermax_amount
- max integer accessible value of the visitor's parameter
Create __get__()
, __set__()
and __set_name__()
methods.
Its __init__
method takes name
, age
, weight
, and height
.
Its __init__
method takes age
, weight
, and height
.
4. ChildrenSlideLimitationValidator
and AdultSlideLimitationValidator
classes, it's a limitation validators for slides
Aqua-park has two types of slides: for adult and for children.
ChildrenSlideLimitationValidator
class and set values:
age
in range of4
and14
height
in range of80
and120
weight
in range of20
and50
AdultSlideLimitationValidator
class and set values:
age
in range of14
and60
height
in range of120
and220
weight
in range of50
and120
Its __init__
method takes 2 arguments:
name
- string value, slide's namelimitation_class
- type ofSlideLimitationValidator
class which sets restrictions on the use of the slide
Create can_access
method that takes instance of Visitor
class and returns if the visitor can use the slide.