Sequential Legged Race Assignment

From CSE231 Wiki
Jump to navigation Jump to search

Group Warmup

Code To Implement

SequentialLeggedRace

class: SequentialLeggedRace.java Java.png
methods: takeSteps
package: leggedrace.studio
source folder: student/src/main/java

method: public void takeSteps(Participant[] participants, int stepCount) Sequential.svg (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.

SequentialLeggedRace

Correctness

class: _SequentialLeggedRaceTestSuite.java Junit.png
package: leggedrace.group
source folder: testing/src/test/java