CMSC 131: Object-Oriented Programming I - Summer 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 weekly programming assignments.  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 games. Welcome!

Required Texts:

  • Java Software Solutions: Foundations of Program Design, 3rd Edition by Lewis & Loftus, Addison Wesley, ISBN 0-321-19719-4
  • Head First Java by Bert Bates and Kathy Sierra, O'Reilly, ISBN 0596004656

Recommended Text:

  • Java Precisely by Peter Sestoft, MIT Press, ISBN 0-262-69276-7


  • Introduction to programming, computer systems, conditional statements, basic input output, Eclipse
  • Introduction to iteration statements, objects, expressions, design
  • Definition of methods, passing by value, class definitions, memory diagrams
  • Instance variables, state, public/private, interface, more design
  • For loops, one-dimensional arrays, Model-View-Controller, Event-driven programming
  • Debugging, testing, Java libraries, overloading
  • Nested for loops, two-dimensional arrays, searching, sorting
  • Introduction to inheritance, super, abstract classes, polymorphism
  • Composition vs. inheritance
  • GUI design


There will be assignments almost every week, and they will roughly alternate between "closed" assignments which you must complete by yourself and "open" assignments where you are not required to work on the assignment by yourself.  More details about the open policy will be provided in class.  There will also be two midterms, 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 WAM machines on campus for your Java work.  There should not be any machine-specific dependencies in your code. However, 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 3pm on the day 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%  One-day late
No assignments will be accepted after the one-day late period.

Your final grade will be computed using the following contributions:

20%  Individual Homeworks
20%  Open 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.