CPSC 124 Introduction to Programming Spring 2005

CPSC 124 Course Information

Programming is the art and science of explaining to a computer how to carry out a task. The art is in constructing something that not only works, but is also beautiful - efficient, elegant, and organized. The science comes from developing (and making use of) theory and principles to help programmers create larger, more complex programs.

Programming is at the heart of computer science, but it is not all of computer science. It requires creativity, logical thinking, and problem-solving skills. It can be frustrating when you are trying to track down why your program isn't quite working right, but it is even more rewarding when you finish and can point to your creation.

This course is an introduction to the theory and practice of computer programming, emphasizing techniques of program development in the object-oriented paradigm. The course is taught using Java, a relatively new language which has grown in popularity due its Web-friendly characteristics. Standard topics such as control structures, subroutines, objects, and arrays are covered. Attention will also be given to "how to think like a programmer" - that is, the fundamental logical thinking and problem-solving skills which are independent of the particular language being used.

Instructor

Stina Bridgeman
bridgeman@hws.edu
Lansing 312, x3614

Office Hours

M 3-4pm, T 1-2pm, W 3-4:30pm, F 9:30-10:30am
or by appointment (schedule)

CS Tutor Hours

M-F 3:30-5pm, M-R 7-10:30pm, Sun 3-6pm, Lansing 310

Class Hours and Meeting Place

Lecture MWF 11:15am-12:10pm, Lansing 300

Lab R 8:45am-10:10am, Gulick 208

Course Web Page

http://math.hws.edu/~bridgeman/courses/124/s05/

You are expected to regularly consult the course web page for announcements, assignments, and most handouts.

Text

Introduction to Programming Using Java, an online text written by Professor Eck. Printed copies will be handed out early in the semester (this is what the $25 course fee covers), but you are encouraged to continue to refer to the online version (where you can interact with the applets and search the text).

Additional material will be handed out or posted on the course webpage.

Prerequisites

No prerequisite, though CPSC 120 or equivalent experience is recommended. Some familiarity with computers is useful.

Rationale

Computer science revolves around programs - creating programs, analyzing programs, making programs more efficient and easier to understand, making it easier to create and maintain programs, considering what programs can and cannot do...the list goes on. As a consequence, one of the first courses in computer science is typically a programming course. Such a course has two goals: the most obvious, perhaps, is to teach the rules and grammar of a particular programming language so that programs can be constructed. Somewhat less obvious is teaching how to think like a programmer - how to take an idea of what you want to do, and turn it into a series of steps the computer can follow. This requires logical thinking and problem solving. These skills are more fundamental to programming than the particular language involved, and are useful even for those who have no intention of becoming programmers or computer scientists.

Like a single semester of a foreign language course, this course will not teach you everything you need to know to be a good programmer and and it won't even teach you everything there is to know about Java. You will, however, learn enough to be able to create interesting and useful programs, and you will have a solid basis for continuing your study. (Shameless plug for CPSC 225 here.)

Course Content Overview

The course material can be divided into four sections: the basics of the Java language and Java programs, object-oriented programming with Java, applets and graphical user interfaces, and basic data structures. The objectives listed below paint - in broad strokes - what the successful student should be able to do at the end of each section.

Programming Basics: The first part of the course will deal with many of the basic building blocks of programming. The Java language will be introduced, along with programming concepts such as types, variables, assignment statements, expressions, conditionals, loops, subroutines, functions, parameters, return values, and I/O (input/output).

Objectives:

  • understand the basic procedural programming paradigm
  • be able to read a simple Java program and explain how the computer executes each statement
  • be able to write a simple Java program given a pseudocode or detailed English description of what the program should do
  • be able to use top-down design to develop pseudocode for a well-structured program given English specifications for the program's task

Object-Oriented Programming: The second part of the course will move on to programming in the object-oriented paradigm, and will introduce the concepts central to object-oriented programming: classes, objects, instance variables and methods, inheritance, and polymorphism. There will also be an increasing amount of attention paid to the design and organization of good programs.

Objectives:

  • understand the object-oriented programming paradigm
  • be able to read a Java program involving objects, and explain how the computer executes each statement
  • be able to write a class declaration
  • be able to write an object-oriented program given a pseudocode or detailed English description of what the program should do
  • produce a class design and pseudocode for a well-structure program given English specifications for the program's task

Applets and GUIs: One of the features which has made Java popular is the ease with which programs can be integrated into Web pages. Java programs embedded in Web pages are known as "applets". This part of the course will address how to create applets and the graphical user interfaces (GUIs) which applets and most other modern programs provide, and will introduce the "event-driven" mode of programming.

Objectives:

  • understand the structure of event-driven programs
  • be able to use AWT painting routines to drawn pictures
  • be able to write an applet including basic Swing components and custom components, and which responds to mouse motion, mouse clicks, key presses, and other events

Data Structures: The last part of the course will begin to look at some of the advanced topics which will be explored more fully in CPSC 225. Programs are all about manipulating data, and data structures are used to organize data. Choosing an appropriate data structure for a particular application is important for the program's efficiency and simplicity. The simplest and most basic (but still extremely useful) data structure, the array, will be introduced.

Objectives:

  • know the syntax for creating and manipulating arrays
  • be familiar with common uses for arrays
  • be able to explain and implement basic array operations such as inserting, removing, searching, and sorting
Assignments

Exams: There will be two midterm exams and a final exam. The midterms will be in-class, written (no programming on the computer), and closed book/notes. The final will be cumulative, but may have a somewhat greater emphasis on material covered after the second midterm (as much as it is possible to do so). The final will be entirely in the scheduled timeslot, and may contain a programming component. Details on the material covered and the exact format of each exam will be announced prior to the exam.

Quizzes: There will be frequent short (5 minute) quizzes at the start of class throughout the semester, intended to make sure that you keep up with material. They will generally be based on the previous day's lecture or lab, or on the current week's reading. Quizzes are closed book and closed notes.

Labs: There will be weekly labs, generally due at the start of the lab session one week after they are assigned. It is likely that you will not be able to complete the entire lab during the lab period - this is to be expected, and finishing it outside of class will be homework. Attendance in lab sessions is required, and absences (for any reason) will result in a penalty on that lab assignment.

Individual Programming Assignments: There will be two individual programming assignments, in addition to the weekly labs. These will be more sizable programs than the labs, and are intended to give you practice with creating larger programs from scratch.

Final Project: There will also be a final project involving the implementation of a game of your choosing, to be completed individually or in a small group of two or three. The project will give you an opportunity to work on a larger program than the others you'll create for the course, and to go through the complete process of program development from specification to design to implementation. More details will be provided later in the semester.

Lecture Attendance and Participation: You are expected to attend and participate in class. The course material is cumulative, and it is difficult to catch up if you fall behind. As a result, attendance will be taken regularly and more than three absences (for any reason) will lower your final grade. "Participation" means that you are engaged in class - you are not expected to volunteer for everything, but you should contribute to the class in a meaningful way multiple times throughout the semester.

Evaluation

Final grades in this course will be computed as follows:

  • Labs: 30%
  • Programming Assignments: 15% total (7.5% each)
  • Final Project: 10%
  • Midterm Exams: 20% total (10% each)
  • Final Exam: 15%
  • Quizzes: 5%
  • Lecture Attendance and Participation: 5%

Quizzes will be graded on a three-point scale:

  • 3 points - answer is complete and correct
  • 2 points - answer is pretty good, but isn't completely correct
  • 1 point - answer is on the right track, but is very incomplete or has serious flaws
  • 0 points - quiz not handed in, or answer is completely off-track

There is much more to a good program than just having it run correctly - people have to read and work with the program at many stages in the software development process, so it is important to also create a well-organized and well-documented program. As a result, the grade for labs and programming assignments will be based on the following criteria:

  • Functionality - does the program work correctly, and does it do what it is supposed to do? (i.e. does it meet the specifications) Note: A program which does not compile will score very poorly in this category, even if only a small error is preventing compilation. Poorly-formatted output will also reduce the score.
  • Comments - are they present, appropriate, and accurate?
  • Style - includes readability (e.g. proper indentation and following standard naming conventions), code organization (e.g. proper choice of subroutines and grouping of statements), and code simplicity (i.e. avoiding overly awkward constructs when a simpler solution would suffice)

Early in the course, "style" will be graded mostly on proper formatting and naming conventions, but greater weight will be given to issues of code organization and simplicity as the course progresses.

Labs will be graded as follows:

  • Functionality: 70%
  • Comments: 10%
  • Style: 10%
  • Attendance: 10% (were you in lab)

For the individual programming assignments, the breakdown is:

  • Functionality: 65%
  • Comments: 10%
  • Style: 25%

For the final project, the breakdown is:

  • Functionality: 60%
  • Comments: 10%
  • Style: 15%
  • Specifications: 5%
  • Design: 10%

Valid HTML 4.01!