CS 132 Computer Programming IISyllabus
Instructor: Maynard Marquis
Office Hours: In classroom 5:30 p.m. before class, e-mail for assistance at any time, or by appointment.
Phone: (203) 254-4147
E-mail: WebCT account and mmarquis@stagweb.fairfield.edu
Fax: (203) 254-4013
Prerequisite: CS131 or equivalent
Textbook: Java 5 Illuminated, J. Anderson and H. Franceschi, Jones and Bartlett Publishers, 2005. ISBN 0-7637-1667-7.
The textbook is the primary source of material for this course. The Lessons and Examples are also very important. All the homework assignments and examinations come directly from those three sources. The textbook specified above has been ordered for this class in the Fairfield bookstore.
Additional References:
- Java How to Program, Sixth Edition, Deitel & Deitel, Prentice Hall.
- Java Programming: From Program Analysis to Program Design, D.S. Malik and P.S. Nair, Thomson Course Technology, 2003.
- The Complete Reference Java2, Herbert Schildt, McGraw Hill/Osborne.
- Java for Programmers, Douglas Lyon, Pearson Prentice Hall, 2004.
- Java, Java, Java, R. Morelli, Prentice Hall, 2000.
- Sun’s Application Programming Interface, available on the Sun Java Website.
Computer Usage: Students MUST have access to a computer with a Java compiler and an ISP provider. The version of Java to be used is jdk1.5.0_04 or later, which can be downloaded free of charge from the http://java.sun.com web site. Eclipse 3.1 is the mandatory Integrated Development Environment (IDE) to be used for this course. It can be downloaded free of charge from the http://www.eclipse.org web site. Microsoft Word and PowerPoint are also necessary.
The material for this course is available on two forums:
- In-class lectures
- The WebCT site. All students also have a WebCT account.
All material: lectures, examples, and homework assignment, will be placed on the WebCT site. The lectures can be viewed on the site or downloaded from it. The examples and homework assignments can be downloaded from the site. Students are responsible for obtaining homework assignments each week from WebCT.
The WebCT e-mail feature is the primary electronic communication medium for this course. Homework submittals, questions, or other online communication will be done using WebCT e-mail. Similarly, students are responsible for checking their WebCT e-mail account daily for possible message from the instructor.
A file compressor/de-compressor (e.g., WinZip) is required. It can also be downloaded from the web. The Windows XP Operating System (OS) has its own compressor/de-compressor, so WinZip is unnecessary if that is your OS.
Course Notes: On WebCT
Course Description: This continuation of CS131 covers additional topics in the science and theory of programming including modular design, recursion, program verification, robustness, and portability. The course presents high-level language programming applications including records, sets, files, class design, inheritance and polymorphism; introduces data structures such as stacks, linked lists, searching, and sorting; and discusses ethical and social issues in computing. The course continues to emphasize the communication skills introduced in CS131. Three credits.
Course Objectives:
- Teach fundamentals of Object Oriented Programming
- Provide hands-on inclass programming practice
- Introduce common algorithms and programming techniques
- Work with simple data structures such as arrays and objects
- Use and develop classes to solve programming problems
- Demonstrate a number of different problem solving techniques
- Develop consistent and understandable programming style
- Instill the concepts of reusable code and libraries
Outcome: Class after class the student will be able to write progressively more complex computer code using Java technology. The student will become capable of performing the following specific tasks. Homework and the exams are the primary evaluation tools for the Outcome.
- Use wrapper classes to create objects from primitive types. Choose control structures that communicate as well as function.
- Use arrays to implement simple data structures including the understanding of sorting and searching algorithm techniques. Work with multi-dimensional arrays and vectors.
-
Use Object Oriented Programming:
- Use and understand class and helper methods
- Write clear, concise, robust, and reusable classes
- Use instance and class variables and methods appropriately
- Work with inheritance, polymorphism, and abstract classes
- Create and use file stream objects, readers and writers. Use and understand the associated advanced exception handling
-
Develop Graphical User Interfaces (GUI):
- Create a GUI
- Create drawings and display text
- Understand and handle events in GUIs
- Use interfaces, inner classes, and layout managers
- Learn the application of recursive methods
- Become familiar with common computer data structures.
Student Activities: Learning a new computer language is very much a hands-on activity, which cannot be learned from lectures or textbook reading alone. It does require that, but the real learning results from the laboratory trials and the homework assignments. To achieve the course objectives, the student must have good participation, and conduct the computer programming tasks assigned for homework.
This course offers four sources of material to assist the learning process: 1) the lessons, 2) a set of notes and examples for each class session, 3) the textbook, and 4) additional references. The amount of learning to be gained is directly related to the usage of this material. All the homework assignments and test material are taken from the lessons (item #1 above) and the notes and examples (#2). The student should expect to take at least twice the online lecture time for reading, studies, and assignments.
Homework: There is a homework assignment for each of the chapters noted above. Each is numbered after its chapter. For example, HW9 is the homework for Chapter 9. The assignments are in two parts: 1) multiple choice questions (e.g., HW9Q), and 2) a program coding assignment (e.g., HW9C). The homework assignments are made available on WebCT on the first lecture day for that chapter. The answers to the questions are due one week after the assignment is made available and the coding solution is due one week after that.
The homework solutions are to be placed in a single folder, which will contain the source code file(s) (.java extension) as well as any other file associated with the assignment, as specified in the assignment. Then zip the folder and submit it on WebCT before the class on the day they are due. Timely homework submittals are strongly encouraged to permit immediate corrective actions for poorly performed or misunderstood assignments. Re-submittal of poor homework solutions to obtain a better grade is encouraged, but can only be accomplished if the original submittals are on time. Late homework submittals may cause a reduction of 10 points in its mark.
E-mail: The WebCT e-mail feature is the primary mode of communication between the students and the Instructor outside the classroom. Students should check their e-mail site daily. They are also encouraged to use e-mail to ask questions. Questions and their answers are provided to all students via e-mail.
Course Requirements: The schedule of activities and topics to be covered are outlined below. Most of the chapters shown below will be presented in three class sessions while others will take four class periods. They will be presented in the order shown. The student should familiarize himself with the Eclipse IDE and read the syllabus before proceeding with lessons.
Chapters 1-7, Review of work in prior Java course
- Introduction to Programming and the Java Language
- Programming Building Blocks - Java Basics
- Object-Oriented Programming, Part 1: Using Classes
- Introduction to Applets and Graphics
- Flow of Control, Part 1: Selection
- Flow of Control, Part2: Looping
- Object-Oriented Programming, Part2, User-Defined Classes
Goals: Refresh the students' programming capabilities and normalize the knowledge of students from different backgrounds by reviewing CS131 material.
Outcome: The students are brought to a common level of Java and programming knowledge at the beginning of CS132.
Chapter 8 - Single-Dimensional Arrays
- Declaring and Instantiating Arrays
- Accessing Array Elements
- Aggregate Array Operations
- Using Arrays in Classes
- Searching and Sorting Arrays
- Using Arrays as Counters
Goals: Review and expand the knowledge of arrays.
Outcome: The students are able to handle a larger amount of data in their programs.
Chapter 9 - Multidimensional Arrays and ArrayList Class
- Declaring multidimensional arrays
- Accessing the elements
- Aggregate 2D Array Operations
- 2D Arrays Passed To and Returned From Methods
- Other Multidimensional Arrays
- The ArrayList and Vector Classes
Goals: Provide ability to manipulate multidimensional arrays and the resizable classes, ArrayList and Vector.
Outcome: The students are able to handle 2D data as found in tables and input data to a data structure with an undefined size.
Chapter 10 - Object-Oriented Programming, Part 3: Inheritance, Polymorphism, and Interfaces
- Inheritance
- The Protected Access Modifier
- Abstract Classes and Methods
- Polymorphism
- Interfaces
Goals: Teach the concepts of encapsulation, inheritance, polymorphism, abstract classes, and interfaces in Object-Oriented Programming.
Outcome: The students are much better equipped to write Object-Oriented programs.
Chapter 11 - Exceptions and Input/Output Operations
- Exception Handling
- The java.io Package
- Reading from the Java Console
- Reading and Writing Text Files
- Reading and Writing Structured Text Files
- Reading and Writing Objects to a File
Goals: Provide the ability to handle persistent data using files and exception handling.
Outcome: The students are able to preserve data by reading from and writing to data files.
Chapter 12 - Graphical User Interfaces
- GUI Components: JFrame, JPanel, JLabel, Text Fields, Command Buttons, Radio Buttons, Check Boxes, Lists, Combo Boxes
- Event Handling
- Adapter Classes
- Mouse Movements
- Layout Managers
Goals: Expose the students to GUI components, events, and layout managers.
Outcome: The students are able to design and interact with screen displays.
Chapter 13 - Recursion
- Simple Recursion
- Recursion with a Return Value
- Recursion with Two Base Cases
- Animation Using Recursion
- Recursion versus Iteration
Goals: Introduce the concept of recursive methods.
Outcome: The students are able to use and benefit from recursion.
Chapter 14 - An Introduction to Data Structures
- Linked List
- Stack
- Queue
- Array Representation of Stacks and Queues
- Sorted Linked Lists
- Doubly Linked Lists
- Recursively Defined Linked Lists
Goals: Introduce the concept of computer data structures.
Outcome: The students are prepared for the more comprehensive course in Data Structures.
Tests and Exams: There are two exams, a midterm exam and a final exam.
Grading Policy:
Homework : 50
Midterm Examination: 25
Final Examination : 25
A passing grade cannot be achieved without the submittal of the midterm and final examination projects, regardless of the points shown above. Non-submittal produces a penalty beyond the points shown above, and precludes a passing grade. |