Sequential Legged Race Assignment
Jump to navigation
Jump to search
Contents
Group Warmup
Code To Implement
SequentialLeggedRace
class: | SequentialLeggedRace.java | |
methods: | takeSteps | |
package: | leggedrace.studio | |
source folder: | student/src/main/java |
method: public void takeSteps(Participant[] participants, int stepCount)
(sequential implementation only)
In this implementation, try to solve the problem sequentially. Your method should go through the array of participants and make each one takeStep until you do this for every stepIndex up until the stepCount for every participant.
Hint: Basically, you will need two for loops. One that iterates up until the stepCount and another which goes through the array of participants.
Testing Your Solution
Visualization
class: | LeggedRaceViz.java | VIZ |
package: | leggedrace.viz | |
source folder: | student/src//java |
Click on the buttons on the right to visualize your solutions when you have implemented them. Here are examples of what the correct visualization should look like for each method.
Correctness
class: | _SequentialLeggedRaceTestSuite.java | |
package: | leggedrace.group | |
source folder: | testing/src/test/java |