|CPSC 124||Introduction to Programming||Spring 2011|
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. Programming 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.
This course 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. Students who just want an introduction to computer science might consider taking CPSC 120 instead.
|Course Web Page||
Introduction to Programming Using Java, 5th ed. (Part I)
The book is available online at http://math.hws.edu/javanotes/.
You will probably find it convenient to also have a printed copy of the text for easy reference during class. Printed copies can be ordered from lulu.com: http://www.lulu.com/content/559884. We'll only be using chapters 1-7, so make sure you order (only) Part I. Please do not print out chunks of the text on the Math/CS department printers.
Additional material will be handed out or posted on the course webpage.
No prerequisite, though some familiarity with computers is useful.
|Rationale, Aims, and Objectives||
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 and 329 here.)
This course has five main goals:
By the end of the course, the successful student will be able to:
|Course Content Overview||
The course material can be divided into two main sections: the basics of the Java language and Java programs, and object-oriented programming with Java.
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:
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:
The course will conclude with a brief consideration of graphical user interfaces (GUIs) and how to create them using Java. (We'll create graphical programs throughout the course using some simplified non-standard libraries; this part of the course will reveal what is really going on behind the scenes.) The "event-driven" mode of programming will also be introduced.