This is the archived website of SI 413 from the Fall 2012 semester. Feel free to browse around; you may also find more recent offerings at my teaching page.
The first part of your project will start with a working implementation of the "99 bottles of beer" program in your language. You will then need to modify this program according to the specifications below. Which modifications you need to make depend on your programming language, and are listed on the page for that language. So you probably won't need to make every modification listed below.
A link to the 99 bottles of beer program that I think is "best" for your programming language is also available on each language's web page. Here are the links to those pages, for your convenience:
Brainfuck, Piet, Smalltalk, Objective C, Erlang, go, Prolog, Haskell, emacs Lisp, Clojure, bash, Ruby, BASIC
Phase 1 counts as 20% of your total project grade. The goal is to "get your feet wet" with the basics of the language and the development environment (compiler, interpreter, IDE, whatever). With this goal in mind, I recommend taking the time to make sure you actually understand what you're doing. You might be able to get away with just some minor edits to the existing code, producing a working program without still having any comprehension of it. This will not prepare you well for Phase 2, which will be more difficult, and more independent.
To encourage you to take this advice seriously, coding style will count for 50% of your grade for this part of the project, and the actual correctness for the other 50%. This means that you need to do things like:
Remember, which of these you need to do is specified on that language's page. They are referred to there by their letters here.
1 bottle of beer on the wall, 1 bottle of beer. Take one down, pass it around, 2 bottles of beer on the wall. 2 bottles of beer on the wall, 2 bottles of beer. Take one down, pass it around, 3 bottles of beer on the wall. ... 99 bottles of beer on the wall, 99 bottles of beer. Take one down, pass it around, 100 bottles of beer on the wall.
1 line of text on the screen, 1 line of text. Print it out, stand up and shout, 2 lines of text on the screen. 2 lines of text on the screen, 2 lines of text. Print it out, stand up and shout, 3 lines of text on the screen. ... 99 lines of text on the screen, 99 lines of text. Print it out, stand up and should, 100 lines of text on the screen.Actually, you can change the lyrics to whatever you like, as long as it follows this general pattern (should be counting up something in the lyrics from 1 to 100). Nothing you'd be embarrassed to sing though...
()
- an empty pair of parentheses,
2 will print as (2)
, 24 as (2*2*2*3)
, etc.
out.txt
" in the current directory and output
both to the screen and to that file. The lyrics in the file should be slightly
different, like "lines of text in the file" or whatever you like (within reason).