COURSE DESCRIPTION Dept., Number Semester hours IS 323 Course Title 4 Course Coordinator Object Oriented Programming Catherine Dwyer and John Molluzzo Catalog Description (2004-2006) Continued development of discipline in program design, style, and expression, debugging and testing using Java; introduction to basic concepts of computer science including algorithmic analysis, basic aspects of string processing, recursion, search, sort, and simple data structures implemented via classes. New Description The mechanics of linked lists of objects; recursion; derivation including constructor chaining, abstract classes, and polymorphism; interfaces; exception handling. Solving problems for which these are the primary tools. May 2006 Textbook Faculty can choose the latest edition of the following: John Lewis and William Loftus; Java: Software Solutions; Addison Wesley Walter Savitch; Java: An Introduction to Computer Science & Programming; Prentice Hall Kim B. Bruce, Andrea Danyluk, and Thomas Murtagh; Java: An Eventful Approach; Prentice Hall References (latest edition is preferred) David Flanagan; Java in a Nutshell; O'Reilly Peter van der Linden; Just Java 2; Sun Microsystems Press (Prentice Hall) Y. Daniel Liang; Introduction to Java Programming; Prentice Hall Steve Holzner; Eclipse ; O'Reilly
Dan McCracken; "My First Eclipse Experience"; http://ccnyddm.com/221spring2005/eclipse_tutorial_release_09.htm Kathy Sierra and Bert Bates; Head First Java; O'Reilly Course Goals Objective 1: Students will acquire the ability to declare and manage arrays of objects. Outcome: Students will be able to explain that creating an array of objects does not create objects apart from the array itself (i.e. each element is initialized to null). Outcome: Students will be versed in the mechanics of calling methods on objects accessed by way of an array name and a subscript. Students will also be able to manipulate the objects within the array (insertion, deletion, searching, sorting). Objective 2: Students will acquire the ability to declare and manage two-dimensional arrays. Outcome: Students will be able to solve problems dependent upon a storage structure offering access by way of a row and a column. They will be able to perform such operations as inserting values into particular elements, finding the sum of a row or column, and displaying the array in rectangular form. Outcome: Students will be able to solve problems dependent upon visualizing a two-dimensional array as an array of arrays (i.e. a one-dimensional array, wherein each element stores an array). Objective 3: Students will acquire the ability to build and manage linked lists of objects -- objects with a "next" field such as: class Node { char letter; Node next; } This reinforces the understandings: (i) that a logically unlimited number of objects, each with an autonomous set of instance variables, may be instantiated from the same class; (ii) that a reference variable stores an address; and (iii) that diagrams provide guidance in building and desk-checking code.
Outcome: Students will be able to construct classes for list processing: appending nodes onto the front or the rear of a singly linked list, deleting nodes from the front or the rear of the list, and traversing the list for any action that involves node-bynode activity (e.g. counting the nodes on the list, printing something from each node, or searching). Objective 4: Students will learn about recursion (methods containing one recursive call), the concept of a stack of local referencing environments, work "on the way up" (i.e. the iteration of code before the recursive activation), work "on the way down" (i.e. the iteration of code that follows the recursive activation), and tail recursion. Outcome: Students will be able to desk-check recursive methods by sketching the stack of activations and returns, and students will be able to build recursive methods such for processing a singly linked list from back to front. Objective 5: Students will learn to construct class derivation hierarchies. This includes the inheritance of public members from ancestor classes, augmenting an extending class with incremental fields and methods, method overriding, the difference between overriding and overloading, the principles of constructor chaining, polymorphism, and abstract classes. Outcome: Students will be able to explain and illustrate how polymorphism enables "old code" to manage new objects as well as to describe and exemplify the other programming constructs used in assembling classes into object-oriented software systems. Objective 6: Students will learn about the interface construct and how to use an interface type for implementing callbacks. Outcome: Students will be able to compare and contrast the abstract classes and interfaces. Outcome: Students will be able to specify an interface, declare classes that implement that interface, write code in accordance with the rules for interface usage, and describe and exemplify the value of this construct. Outcome: Students will be able to implement a JButton, declare a class that implements the ActionListener interface, and call addactionlistener() on the JButton to register an ActionListener object for callbacks. Students will be able to explain that listeners use the callback mechanism made possible by the interface construct.
Objective 7: Students will acquire the ability for exception handling. This includes the try/catch/finally statement, extending the Exception class for checked exceptions and the RuntimeException class for unchecked exceptions, the throw clause for throwing an Exception object, the propagation of exceptions, and the throws clause on method headings for propagating checked exceptions. Outcome: Students will be able to write programs that recover from exceptions thrown by Java as well as throw and recover from exceptions of their own declaration. Objective 8: Obtain a preliminary understanding of big-o through the study of the linear search in contrast to the binary search. Outcome: Students will be able to implement a linear search within arrays of objects as well as linked lists. Outcome: Students will be able to depict the mechanism of the binary search and explain why no more than O(lgN) compares are needed to locate an object (or determine that it is not present). Outcome: Students will be able to contrast an information storage and retrieval system built upon a linear search with a system built on the binary search relative to performance and their appropriateness for different kinds of applications. Prerequisites by Topic IS 223 Major Topics Covered in the Course Two-dimensional Arrays of Primitive Types implementing a rectangular array computing the row sums and column sums of a rectangular array implementing a ragged array (e.g. an array of int arrays) The Mechanics of Linked Lists putting the first node onto an empty list attaching a node to the front of a list attaching a node to the rear of a list removing the node from the front of a list removing the node from the rear of a list traversing the list to process the nodes
Arrays of Objects putting objects into an array, processing the elements (e.g. searching, moving objects from one compartment to another, removing objects from the array) traps associated with references variables (assignment creates an alias, not a clone; the equality operators test "addresses," not conceptual equality; a reference as an actual argument passed by value may be mutated) Recursion methods with one recursive call the stack of local referencing environments work on the way up (code ahead of the call) and work on the way down (code following the return) tail recursion Extending Classes (Inheritance) building a derivation hierarchy method overriding and contrasting overriding to overloading final methods and final classes constructor chaining the uses of super Polymorphism and Abstract Classes using polymorphism to enable old code to work with new objects upcasting and downcasting abstract classes for building derivation hierarchies Java s Object class upcasting to Object and downcasting from Object the wrapper classes for primitives Exception Handling the try/catch/finally statement extending the Exception class for checked exceptions and extending the RuntimeException class for unchecked exceptions the throw clause to throw exceptions the throws clause (on method headings) for propagating checked Exceptions
Interfaces the interface as an abstract class the interface as a data type using an interface to build callbacks Input from the Keyboard and Text File I/O calling readline() on a BufferedReader object wrapping a BufferedReader around an InputStreamReader tied to System.in to read from the keyboard calling print() and println() on a PrintWriter wrapped around a FileWriter for output to text files and the close() method wrapping a BufferedReader around a FileReader to read Strings from a text file Introducing the Abstract Windowing Toolkit (java.awt) and (javax.swing) [OPTIONAL] instantiating a JFrame and calling an assortment of methods on it (e.g. setdefaultcloseoperation(jframe.exit_on_close), setvisible(true), setsize(), setlocation(), setresizable(), setcursor(), and repaint() ) getting a JFrame's contentpane (which is a Container), setting its background color with setbackground(), setting its layout manager with setlayout(), and using add() to add components also JPanels Color objects and the RGB system for specifying colors Font objects (constructor demo: Font ("TimesRoman", Font.BOLD, 20) ) JLabel objects and the methods sethorizontalalignment(), setforeground(), setbackground(), setfont(), setopaque(), and setbounds() for when the outside Container has no layout manager the java.awt.event.actionlistener interface, its required method, public void actionperformed(actionevent e), and the java.awt.event.actionevent class objects of the following kinds: JButtons, JMenuBars, JMenus, and JMenuItems JSlider objects and their methods setmajortickspacing(), setpaintticks(true), setpaintlabels(true), and getvalue() (constructor demo: JSlider (JSlider.HORIZONTAL, 0, 255, 204) ) the javax.swing.event.changelistener interface, its required method public void statechanged(changeevent e), and the javax.swing.event.changeevent class
Estimate Curriculum Category Content (Semester hours) Area Core Advanced Area Core Advanced Hardware and Networking and Software Telecommunications Modern Programming Language Data Management Quantitative Analysis 4.0 Analysis and Design Role of IS in an Organization Information Systems Environment