CS 125 Introduction to Programming Principles


Objectives

This course will teach fundamental concepts of computer programming, including how to write small object-oriented programs. This course begins with basic elements of programming languages (such as variables, constants, expressions and statements). The course then examines objects and object-oriented programming in detail, culminating in the ideas of overriding and inheritance.

Intended Audience

CS 125 is intended for students who have no prior computer programming experience. Students who have performed well on a course meeting the requirements of ICS3M (see http://www.edu.gov.on.ca/eng/document/curricul/secondary/grade1112/tech/tech.html#ICS3M) should consider taking CS 133 or CS 135.

Related Courses

Successors: CS 126 or CS 134.

Antirequisites: CS 115, 120, 121, 122, 123, 130, 131, 132, 133, 135, 137, 145, 4M Computer and Information Science or equivalent experience, CHE 121, CIVE 121, ECE 150, GENE 121, PHYS 139, SYDE 121.

Hardware/Software

Used in course: BlueJ or ProfessorJ or DrScheme or ... (Available to most operating systems.)

Assumed knowledge: Computer literacy.

References

Java: An introduction to computer science & programming, 3rd ed., by Walter Savitch, Prentice-Hall, 2004. Course notes.

Schedule

3 hours of lectures and one 2 hour lab per week. Normally available in Fall, Winter and Spring.

Outline

Introduction (3 hours)

Introduction to the course. Computer hardware and memory; programming languages. A First Java application program. Compilers, interpreters and (virtual) machines. Using an IDE Tokens, types, and values. Number systems and data representation.

Basic concepts in programming (3 hours)

Basic program structure. Variables and constants. Operators. Expressions and simple statements. The class String. A brief overview of objects. Simple output.

Control structures (6 hours)

Conditional statements (if-else). Logical and boolean expressions. Nested and compound statements. While loops. Different kinds of loops (for, do-while). Nesting loops. Tracing and debugging.

Object-oriented programming (15 hours)

Invoking String methods. Defining methods. Invoking methods on user defined objects. Simple parameters. Return values. Instance variables. Local variables. Scope, visibility and persistence; encapsulation. Accessor and mutator methods. Variables of a class type and objects, writing your own classes. Creating objects. Objects in the memory model. Objects as parameters. Methods calling methods; helper methods being private. Static methods and variables. Top down design, systematic testing. Overloading. Writing constructors.

Arrays (6 hours)

Arrays: declaration, creation and indexing. Arrays of primitive types. Iterating through arrays. Arrays as parameters and return values. Arrays of objects. Searching arrays and simple array processing. Sorting an array. Two dimensional arrays.

Advanced object-oriented concepts (5 hours)

Class structure and inheritance. Accessing the parent class. Overriding methods. Simple OO dispatch. Inheritance.

History of computing (1 hr)


Campaign Waterloo

David R. Cheriton School of Computer Science
University of Waterloo
Waterloo, Ontario, Canada N2L 3G1

Tel: 519-888-4567 x33293
Fax: 519-885-1208

Contact | Feedback: cs-uops@cs.uwaterloo.ca | David R. Cheriton School of Computer Science | Faculty of Mathematics


Valid HTML 4.01!Valid CSS! Last modified: Wednesday, 27-Jan-2010 14:03:45 EST


Menu:ShowHide