Статус:
Offline
Реєстрація: 20.03.2010
Повідом.: 144
Реєстрація: 20.03.2010
Повідом.: 144
- 🟠 20:37 Загроза ударних БпЛА Загроза БпЛА типу «Шахед»#м_Харків_та_Харківська_територіальна_громада
- #1
Кто знает как решить задачку. Без кода просто пояснить решение.
On the one bank of the river is a family - father, mother, son and daughter. The family wants to get to the other bank of the river. They found a fisherman with a boat who agreed to borrow a boat to them. Family should get to another bank of the river and return the boat back to a fisherman. Boat can accommodate one adult person or two children.
Solve this task using php5, utilize OOP, each object should be a class instance. Program should read a configuration from an ini file. It should be possible to change number of adults and/or children to any other number. Program should write a log file with results of its work where anyone could check how people cross the river and how many iterations passed.
On the one bank of the river is a family - father, mother, son and daughter. The family wants to get to the other bank of the river. They found a fisherman with a boat who agreed to borrow a boat to them. Family should get to another bank of the river and return the boat back to a fisherman. Boat can accommodate one adult person or two children.
Solve this task using php5, utilize OOP, each object should be a class instance. Program should read a configuration from an ini file. It should be possible to change number of adults and/or children to any other number. Program should write a log file with results of its work where anyone could check how people cross the river and how many iterations passed.