| i
Suggested Outline for First Year Programming i |
The suggested text is Computing Concepts with Java 2 Essentials by Cay Horstmann. The accompanying website, www.horstmann.com, contains the programming examples from the book and possible laboratory exercises.
This outline is based on a 14 week semester and assumes that there will be a weekly lab and two midterm exams. It is meant as a guideline to help plan the course for those who have not taught Java before or have not used Horstmann's book. Chapters 1-7 and Sections 11.1 and 11.2 are to be covered in the first semester. The remainder of the book is to be covered in the second semester.
The priority of these courses is for the students to learn to program
in Java, design programs of moderate length, and to solve problems.
With this in mind, lab and programming exercises should be an integral
part of the course.
| ii
First Semester: CMP 230: Programming Methods I ii |
|
|
Reading | Topics | Activities | |
|
|
Introduction to Java and Computing | Chapter 1 | What is programming, the Anatomy of a Computer, Programming Languages and Machine Code, Compilation Process and Errors, A First Look at Objects, Classes, and Algorithms. | Students should learn the basics of editing, compiling, and running
a program.
Possible Lab: Introduce basics of the computer lab and java compiler. Compile the "hello world" program on p 21 of the textbook. |
|
|
Fundamental Data Types | Sections 2.1-2.5 | Number Types, Assignment, Type Conversion, Constants, Arithmetic, Strings. | Students should learn how to obtain the programs from the textbook
(either from the CD or off the webpage).
Example: compile the programs discussed in Chapter 2. Possible Lab: Modify the coins example from the chapter to store the total as a double. Or, fix the errors in the program in Review Exercise R2.6, p 93. |
|
|
Reading Input and Introduction to Objects | Sections 2.7-2.8, 3.1-3.2 | Reading Input with the ConsoleReader Class, (Optional: Reading Input with Standard Java), Determining Object Behavior, Defining Methods. | Students should write a program that takes input from the keyboard.
Possible Lab: p 96 contains several simple calculation programs (calculate area of circle, given radius; given sides, calculate perimeter of rectangle, etc.). Possible Programs: P2.9 (Giving Change), P2.12 (Harder: Separating thousands with a comma), P2.15 (Printing a Grid), P2.19 (Harder: Converting from Military Time), P2.22 (Converting numbers to Months). |
|
|
More on Classes | Sections 3.3-3.7 | Instance Variables, Implementing Methods, Constructors, Putting a Class to Work, Discovering Classes. | Students should write a simple program using objects.
Possible Lab: P3.1 which sets up a BankAccount object. Possible Programs: P3.2 (Implement an Employee class), P3.9 (Implement a Circle class). |
|
|
Copying Objects and Applets | Sections 3.8-3.9, 4.1-4.3 | Copying Object References, Null References, Basic HTML, Simple Applets. | First Exam |
|
|
More on Applets | Sections 4.4-4.9 | Graphical Shapes, Colors, Fonts, Simple Drawing, Reading Text Input, Comparing Visual and Numerical Information. | Possible Lab:
Possible Programs: |
|
|
Decisions | Sections 5.1-5.3 | If-statements, Comparing Values, Multiple Alternatives. | Possible Lab:
Possible Programs: |
|
|
Boolean Expressions and Iterations | Sections 5.4, 6.1-6.3 | Using Boolean Expressions, While Loops, For Loops, do Loops. | Possible Lab:
Possible Programs: |
|
|
More on Iterations | Sections 6.4-6.6 | Nested Loops, Processing Input, Random Numbers and Simulations. | Possible Lab:
Possible Programs: |
|
|
Methods and Parameters | Sections 7.1-7.3 | Method Parameters, Different Types of Methods, Static Methods. | Second Exam |
|
|
More on Methods | Sections 7.4-7.6 | Return Statements, Static Variables, Scoping. | Possible Lab:
Possible Programs: |
|
|
Introduction to Arrays | Sections 11.1-11.2 | Using Arrays to Store Data, Array Parameters and Return Values. | Possible Lab:
Possible Programs: |
|
|
More on Methods and Recursion | Sections 7.7-7.9 | Comments, Preconditions, and Recursions. | Possible Lab:
Possible Programs: |
|
|
More on Recursion and Review | Section 7.9 | Recursion and Review. | Possible Lab:
Possible Programs: |
| i
Second Semester: CMP 326: Programming Methods II i |
|
|
Reading | Topics | Activities | |
|
|
Testing | (Review Chapters 1-7)
Sections 8.1-8.3 |
Review of CMP 230 Topics, Unit Tests, Selecting Test Cases, Test Case Evaluation. |
Possible Lab: |
|
|
Debugging and Introduction to Inheritance | Sections 8.4-8.7, 9.1 | Program Traces, Asserting Conditions, The Debugger, Debugging Strategies. | .
Possible Lab: |
|
|
More on Inheritance | Sections 9.2-9.5 | Converting Between Class Types, Inheritance Hierarchies, Inheriting Instance Variables and Methods, Subclass Construction. |
Possible Lab: Possible Programs: |
|
|
Polymorphism and Interfaces | Sections 9.6-9.10 | Polymorphism, Interfaces, Access Control, Objects, Packages. |
Possible Lab: Possible Programs: |
|
|
Event Handling | Sections 10.1-10.3 | Events, Event Listeners, Event Sources, Event Adapters, Implementing Listeners as Inner Classes | First Exam |
|
|
More on Event Handling | Sections 10.4-10.6 | Frame Windows, Adding User Interface Components to a Frame, Reading Text Input | Possible Lab:
Possible Programs: |
|
|
Arrays and Vectors | Sections 11.1-11.7 | Review of Arrays, Vectors, Two-Dimensional Arrays | Possible Lab:
Possible Programs: |
|
|
Graphical User Interface | Sections 12.1-12.4 | Layout Managers, Buttons, Text Components, Choices | Possible Lab:
Possible Programs: |
|
|
More on GUI and Streams | Sections 12.5-12.6,
13.1-13.2 |
Menus, Swing Components, Streams, Readers, Writers, Reading and Writing Text Files | Possible Lab:
Possible Programs: |
|
|
Streams and Exceptions | Sections 13.3-13.7 | Exception Handling, Reading Data in Graphics Programs, Command Line Arguments, Random Access, Object Streams | Second Exam |
|
|
Object Oriented Design | Sections 14 | Software Life Cycle, Relationships Between Classes, Examples of Design | Possible Lab:
Possible Programs: |
|
|
Sorting | Sections 15.1-15.4 | Selection Sort, Profiling Selection Sort, Analyzing the Performance, Merge Sort. | Possible Lab:
Possible Programs: |
|
|
More on Sorting and Searching | Sections 15.5-15.9 | Analyzing the Merge Sort Algorithm, Searching, Binary Search, Searching and Sorting Real Data, the Efficiency of Recursion. | Possible Lab:
Possible Programs: |
|
|
Introduction to Data Structures and Review | Chapter 16 | [If time, Overview of Linked Lists and Binary Search Trees,] Review. | Possible Lab:
Possible Programs: |