![]() |
Модераторы: LSD, AntonSaburov |
![]() ![]() ![]() |
|
unkis |
|
|||
Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 802 Регистрация: 8.9.2004 Репутация: нет Всего: 1 |
Народ привет,
А вы как думаете, сколько кофе автоматов в следующей задачки? Model a system that allows programmers to gat coffee and of course pay for it. Programmers will do the following to get coffee: • First gather information regarding which types of coffee are available (espresso, latte macchiato or cappuccino) and pick their personal favorite. This will take 0.5 seconds. • Second pay the coffee they want at the cash register using cash or credit. This will take 0.25 second for credit and 0.5 seconds for cash payments. • Third find a coffee machine and pick the type of coffee they paid for The system allows: • 10 programmers to pick their favorite type of coffee at the same time • 5 programmers to pay their coffee at the same time • 2 programmers to get their paid coffee from the machine at the same time A programmer will do the following to get coffee from a coffee machine: • find a cup (0.25 seconds) • put it under the outlet (0.25 seconds) • pick the type of coffee the programmer paid (0.25 seconds) • wait till the machine is finished filling the cup (This will take 0.25 second for espresso, 0.5 seconds for latte macchiato and 0.75 seconds for cappuccino.) • when the machine is done the programmer will take her cup and leave (0.25 seconds) Measure the following things using 100 programmers: • how much coffee is sold (total and per payment type) • how much coffee is dispensed by each coffee machine (total and per type of coffee) • how much time does the average programmer spend getting her coffee • how long did it take the fastest and the slowest programmer to get her coffee Challenge it with 200, 500 and 1000 programmers. -------------------- www.unkis.com |
|||
|
||||
a0730 |
|
|||
Новичок Профиль Группа: Участник Сообщений: 0 Регистрация: 1.6.2008 Репутация: нет Всего: нет |
Количество автоматов любое.
Начните с десяти. Десять автоматов - это 10 мин в очереди для самой тормознутой программистки. Этот ответ добавлен с нового Винграда - http://vingrad.com |
|||
|
||||
Mirkes |
|
|||
![]() Опытный ![]() ![]() Профиль Группа: Участник Сообщений: 586 Регистрация: 18.8.2011 Где: Красноярск Репутация: 7 Всего: 17 |
Я не совсем понял условие: две программистки могут забрать свой кофе одновременно из одной машины? Или в целом по системе? Если в целом по системе, то всего две машины. Если из каждой, то все гораздо интереснее.
Мы можем играть числом машин от 1 до числа программисток и более. Кроме того не указано, как часто программистки хотят кофе и хотят ли они его одновременно, по очереди или в случайный момент времени. Так что задача настолько плохо поставлена, что ответ можно выбирать произвольно. Этот ответ добавлен с нового Винграда - http://vingrad.com |
|||
|
||||
![]() ![]() ![]() |
Правила форума "Java" | |
|
Если Вам помогли, и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, LSD, AntonSaburov, powerOn, tux, javastic. |
1 Пользователей читают эту тему (1 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | Java: Общие вопросы | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |