This is an archived course. A more recent version may be available at ocw.mit.edu.

Syllabus

Course Meeting Times

Lectures: 3 sessions / week, 1 hour / session

Labs: 2 sessions / week, 3 hours / session

Description

This course is designed for undergraduate and graduate students in science, social science and engineering programs who need to learn fundamental programming skills quickly but not in great depth. The course is ideal for undergraduate research positions or summer jobs requiring C++. It is not a class for experienced programmers in C++. Students with no programming background are welcome.

Topics include control structures, arrays, functions, classes, objects, file handling, and simple algorithms for common tasks. The course will build up to a final project, and there is no final exam.

Schedule

LEC # TOPICS
1 Basics
2 Control structures
3 Functions
4 Arrays
5 Pointers
6 Classes, part 1
7 Classes, part 2
8 Object-oriented programming
9 File handling
10 Comprehensive case study, Standard Template Library (STL)

 

Grading

ACTIVITIES PERCENTAGES
Assignments 65%
Final project 35%

 

Final Projects

The final project should demonstrate the ability to write a quality, full-fledged C++ program from scratch. The project should be something that is doable within a week's work — maybe about 10-15 hours of coding — but which demonstrates an ability to use all the important features of C++, especially classes and functions. It should accomplish some manageably small but useful task. Good examples might include playing tic-tac-toe, allowing two users play some board game against each other, or managing a large set of sports statistics in a set of files (all text-based, of course). But really, it can be anything you like, as long as it meets those specifications and gets approved. You should submit a project proposal by the middle of the third week in IAP so that we can approve it or help you pick a more suitable project. Please speak to us if you need help generating ideas.

A few more suggestions (all of these can be done with text; if you're confused about how, we can help you out):

  • Card games (Blackjack, anything else you can think of)
  • Reversi (also known as Othello)
  • Gomoku (basically a larger version of tic-tac-toe)
  • Connect Four
  • Maxit (very simple — two players just move around a grid from space to space, alternating turns, and each space has a number which gets added to your score; Google it if you're curious)

Resources

Here are a few useful links for learning C++:

C++ Language Tutorial

Introduction to C++

C++ Reference, a good C++ standard library reference