CPSC 124 Introduction to Programming Spring 2018

CPSC 124 Course Information

On this page:


Course Description, Content, and Objectives

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.

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 creativity, 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.

This course is an introduction to the theory and practice of computer programming, emphasizing techniques of program development in the object-oriented paradigm. It is the first course in the computer science major and minor, and is intended for students who have an interest in computer science and a desire to learn to program. Previous programming experience is not expected or required. Students who just want an introduction to computer science or a slower-paced introduction to some programming basics might consider taking CPSC 120 instead.

The course has five main goals:

  • developing a solid grounding in the fundamental concepts of object-oriented programming, including data types, variables, conditionals, repetition, arrays, subroutines, and classes and objects
  • developing fluency in basic Java syntax and semantics
  • establishing good programming habits
  • building confidence about what you do and don't know, and the knowledge of how to learn what you don't know
  • building excitement about programming as a creative art, and computer science as a field of study

The course material can be divided into three main sections: the basics of the Java language and Java programs, object-oriented programming with Java, and GUI programming.

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, I/O (input/output), and arrays. Specific objectives include:

  • understand the procedural programming paradigm
  • be able to read a Java program and explain how the computer executes each statement
  • be able to write a 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
  • know the syntax for creating and manipulating arrays
  • be familiar with common uses for arrays

Object-Oriented Programming: The second part of the course will focus on the object-oriented paradigm, and will introduce the concepts central to object-oriented programming: classes, objects, instance variables and methods, inheritance, and polymorphism. Some attention will be paid to the design and organization of good programs in the object-oriented paradigm. Specific objectives include:

  • understand the object-oriented programming paradigm
  • be able to read a Java program involving objects and classes, 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-structured object-oriented program given English specifications for the program's task
  • use a new class given an API describing how it works

GUI Programming: The course will conclude with a brief consideration of graphical user interfaces (GUIs) and how to create them using Java. The "event-driven" mode of programming will also be introduced.

By the end of the course, the successful student will be able to:

  • frame the solution to straightforward tasks in terms of object-oriented programming concepts, and translate that solution into Java code
  • correctly trace any Java code that uses the constructs studied in class
  • take steps to resolve compiler, runtime, and logic errors independently
  • navigate a Linux environment (manage files, use a text editor, compile and run programs)
  • identify what she/he does and doesn't know about a task at hand, and take steps to address what isn't known

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 and 329 here.)


Prerequisites

No prerequisite, though some familiarity with computers is useful.


Textbook

Introduction to Programming Using Java, 7th ed. (Part I)
David Eck

The book is freely available online at http://math.hws.edu/javanotes/.

You can also download a PDF copy if you prefer an electronic version that you can read offline, or order a printed copy if you'd like something you can refer to away from the computer. See the "Downloading And Other Links" section at the bottom of the http://math.hws.edu/javanotes/ page for more information. We'll only be using chapters 1-7, so you only need to order Part I. (Alternatively, if you are planning to take CPSC 225, you can order the whole book now and save a few dollars.) Please do not print out chunks of the text on the Math/CS department printers.

Any additional material will be handed out in class and/or posted on the course webpage.


Software

All of the software needed for this course is available on the computers in two labs: Rosenberg 009 and the Math/CS lab (Lansing 310). You are encouraged to use these machines for your coursework.


Valid HTML 4.01!