Course Level
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type

In this lab students compute the acceleration of a short track speed skater per lap. This is a lab for early in a semester of CS 1. It requires the use of 1) standard input/output, 2) variables and simple arithmetic expressions, 3) selection statements, and 4) loops.

Learning objectives:
* Compiling, linking, executing a program
* Developing an algorithm
* Testing a program
* Using the C++ syntax and programming constructs of standard I/O, variables and arithmetic expressions, selection statements, and loops


The first document below (Olympics_Lab_0.docx) is the lab assignment itself. I recommend showing the video in class when reviewing the assignment with students:

Students turn in an algorithm and test cases before the code for the lab is due. The algorithm and test cases should be evaluated and returned to students before the code is due so students can use the feedback to correct code and test their code well. Students use their own test cases to test their code.

The second document below (OlympicLabTests_0.docx) contains the test cases used by the instructor to grade the correctness of the code. It uses the names of three, real, short-track speed skaters, two from the US and one from China. One of the skaters is female. This document is essentially the detailed rubric. Since testing code is part of a software developer's job, and writing test cases are part of the assignment, I do not provide this rubric to students prior to turning in the code for the lab.  I do, however, go over testing in detail so they can write their own test cases.

The third document below (OlympicsLab Coversheet_0.docx) is used to provide feedback to students when the lab has been completely graded. I recommend providing this document to students at the same time as the lab assignment itself so students know how the lab points are divided:  10%for the algorithm, 10% for the tests, 4% for the relevance questions, 10% program style/comments, and 66% program correctness. Program correctness includes the test cases in file OlympicsLab Tests_0.docx.


  • Not covering algorithms or testing well before this assignment. Students need practice writing algorithms and tests beforehand.
  • Not having time to evaluate student algorithms and tests and get them back to students before the code is due.


  • Go over the lab assignment in detail with students in class.
  • Student algorithms, tests, and relevance answers should be due before the code and returned graded before the code is due.
  • If there's not enough time to evaluate student algorithms/tests/relevance answers and get them back to students before the code is due, on the day the algorithm/tests/relevance answers are due:
    • Require they are typed so you can initial them
    • Go over a basic algorithm in class by randomly calling on students to provide the next step (they can answer, phone a friend or pass). Have students mark up their own algorithm with a colored pen as the class creates this algorithm. Do the same for the tests/relevance answers.  Let students keep these updated documents to improve the code they are working on. Grade the algorithm/tests/relevance answers at the same time as the code.
  • Allow students to earn back at most 50% of Program Correctness points by correcting their code mistakes. In this way, the trip around the software development cycle is completed.

Prerequisite knowledge: students must have already been exposed to standard I/O, variables, arithmetic statements, selection statements, and loops. 

Engagement Highlights

The lab is interdisciplinary requiring students to learn a little about short track speed skating and Olympic games. It requires students to think about the relevance of the lab by asking them to answer questions: 1) Why do you think anyone would want to analyze the performance of a short track speed skater? 2) What else could we add to our program to make it more useful or user friendly or functional? In discussing these questions, more interdisciplinary topics arise. Coaching, for example. Coaches and skaters could use the data from this program to analyze and strategize. GUIs and real time data collection are also related subjects.

I assigned this lab during the winter semester of the 2018 winter Olympics. I think it would still be relevant even if it were assigned in a semester when the Olympics wasn't happening. Also, it could be altered to compute the acceleration for swimming or track events during a summer Olympics.

Computer Science Details

Computer Science Topic(s)
selection statements
Programming Language
Other Programming Language

Additional Details

Estimated Time to Complete

2-5 days outside of class

Material Format and Licensing Information

Creative Commons License

Author's Institutional Information

Institution Type
Associate's Colleges