Slashdot Mirror


Memorable Programming Assignments?

Albert Schueller asks: "This fall I'll teach introductory programming for the third time. The class is generally populated by students from a wide range of backgrounds and interests-liberal arts and science types. While we use C++, the language isn't really the issue. Rather, the goal is to introduce basic programming ideas like loops, logic, modular programming etc. What are some of your favorite programming assignments that would be appropriate for students at this level?"

1 of 127 comments (clear)

  1. immediate, fun feedback by CaptainAbstraction · · Score: 2, Informative

    The wrong thing to do is to assign something where the result of their work is a bunch of printed text.

    Something along the lines of RoboCode would be ideal:

    http://www-106.ibm.com/developerworks/java/libra ry / -robocode/

    But since you're doing this in C++, you'll have to roll your own.

    Basically, whatever it is that they're doing, make it something that can take input from some external source, and have its output be read by something that can transform the output into something fun. This means a *lot* of work for the teaching staff, since they'll be writing lots of libraries and/or server/client code.

    For example:

    output for their code are integers ranging from 0 to 2^16. These integers are fed into a digital to analog converter and the students get hear the result. Student will go from producing a single tone (they'll have to create a sine wave, or even a triangle wave is fine) to chords and melodies in no time! lots of good programming and SIMPLE programming meat to chew on.

    students could write a black jack player. the input will be integers representing the value of their card, and they'll output if they want to hit or stay. then the staff (you) could write a nice gui and driver around the thing and the students can play black jack (or any other card game...) against a program that they wrote. you could also make the programs play against each other.

    etc., etc.

    Best,
    andrew