-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5.py
More file actions
24 lines (23 loc) · 1.01 KB
/
5.py
File metadata and controls
24 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Так как у меня нет задач, решенных с помощью классов,
//ниже представлены названия классов, методов и объектов,
//какими бы они могли быть, если бы я решала задачи с использованием ООП.
1. class TrafficLight, class Road
def set_color(), def get_color(), def get_distance()
trLightStart = TrafficLight()
// задача 14
2. class Motorcycle
def get_distance()
Moto_one = Motorcycle()
// задача 2
3. сlass Field, сlass Game, сlass Position
def get_position()
a_field = Field([2,2, 3,4]), a_game = Game(a_field)
// задача 3
4. class TextEditor
def add_symbol(), def delete_symbol(), def undo_operation(), def redo_operation()
stirng = TextEditor(), string.add_symbol('1')
// задача 20
5. сlass Tree), сlass Branch
def add_branch(), def delete_btanch()
finfshTree = Tree() finfshTree.add_branch()
// задача 23