Ben Bederson


CMSC 131: Object-Oriented Programming I - Spring 2004
Code Snippets



This is a first programming course for Computer Science majors with a focus on object-oriented programming.  The course focuses on development of skills such as program design and testing as well as the implementation of programs using a graphical IDE. All programming is in Java.

This is a hard course, but it is fun.  There will be nearly weekly programming assignments.  Half of them will be done alone, and half will be done in pairs.  Each aims to give experience with a basic element of programming such as loops, arrays, or inheritance.  The assignments also try to show how programming can be useful and fun, and how even relatively simple constructs can accomplish real tasks.  Assignments range from picture manipulation, to calculators to games (including asteroids and tetris). Welcome!

Required Texts:

  • Head First Java by Bert Bates and Kathy Sierra, O'Reilly, ISBN 0596004656
  • Java Precisely by Peter Sestoft, MIT Press, ISBN 0-262-69276-7

Recommended Text:

  • Java Software Solutions: Foundations of Program Design, 3rd Edition by Lewis & Loftus, Addison Wesley, ISBN 0-321-19719-4

Class Wiki - collaborative website


  • Introduction to programming and logistical issues (1.5 weeks)
  • Basic programming concepts; the operating system; tools for programming; input and output (1 week)
  • Classes: Concepts I (1 weeks)
  • Variables and expressions (1 week)
  • Classes: Concepts II, Event-driven programming (1.5 weeks)
  • Conditional statements, Boolean expressions and loops (2 weeks)
  • Debugging and testing, Java libraries (1 week)
  • Classes: Design (1.5 weeks)
  • Classes: Advanced concepts (1.5 weeks)
  • 1D and 2D Arrays (2 weeks)
  • Strings (1 week)


There will be assignments due nearly every week, and they will roughly alternate between "pair" assignments which you will do in collaboration with another student in the class and individual assignments which you must do by yourself.  We will assign the pairs. There will also be two midterms and a final exam and occasional quizzes.


All assignments can be done on the machines of your choice. You are welcome to do the work on a home computer if you have one.  You will also get a special WAM account for this class, and can use any WAM machine on campus for your Java work.  There should not be any machine-specific dependencies in your code. But, if we are not able to run your program because there is a difference between your and our computer environments, you must work with us to get your program to work in our environment.


All assignments are due at 6pm on the Tuesday of the week they are due. They are to be submitted electronically according to instructions given with the assignments. Late assignments will be strictly penalized. Exceptional circumstances will be considered only if discussed with the instructor before the assignment is due. All late assignments will have points deducted as follows:

-20%    Submitted before 11am on Wednesday.
-100%  After 11am on Wednesday

Your final grade will be computed using the following contributions:

20%  Pair Homeworks
20%  Individual Homeworks
5%  Quizzes
15%  Midterm #1
15%  Midterm #2
25%  Final Exam

Academic Honesty

All individual assignments/exams must be done on your own. If you are found to have cheated by showing your solution to other students, allowing others to obtain access to your work, looking at or copying others work, etc. your case will be sent to the university’s Office of Judicial Programs. You are allowed to use the web for reference, but you must not copy code from any website or any other source.  The code you submit must be your own. Furthermore, any significant assistance you get from anywhere (person, book, website, etc.) must be explicitly described in your submission.

For pair assignments, the restrictions are the same as for private assignment except, of course, that the two people working together may share their work with each other.