You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
516 B
23 lines
516 B
3 years ago
|
using System;
|
||
|
|
||
|
static class AssemblyLine
|
||
|
{
|
||
|
public static double ProductionRatePerHour(int speed)
|
||
|
{
|
||
|
double production = speed * 221;
|
||
|
if (speed == 10) {
|
||
|
production *= 0.77;
|
||
|
} else if (speed == 9) {
|
||
|
production *= 0.8;
|
||
|
} else if (speed > 4) {
|
||
|
production *= 0.9;
|
||
|
}
|
||
|
return production;
|
||
|
}
|
||
|
|
||
|
public static int WorkingItemsPerMinute(int speed)
|
||
|
{
|
||
|
return (int)Math.Floor(ProductionRatePerHour(speed) / 60.0);
|
||
|
}
|
||
|
}
|