|1. Description - |
|This course is a systematic treatment of intermediate concepts in computer science through the study of Java object-oriented programming (OOP) intended for Computer Science majors as well as non-majors and professionals seeking intermediate-level Java experience. Coding topics include Java interfaces, class extension, generics, the Java collections framework, multi-dimensional arrays and file I/O. Concept topics include OOP project design, inheritance, polymorphism, method chaining, functional programming, linked-lists, FIFOs, LIFOs, event-driven programming and guarded code.|
|Prerequisite: C S 1A.|
|Advisory: Eligibility for ENGL 1A or ESLL 26.|
|2. Course Objectives - |
|The student will be able to: |
- Configure a Java Development Kit (JDK) and Integrated Development Environment (IDE) for advanced Java programming.
- Use both instance members and static members, as appropriate, in class design.
- Analyze and demonstrate the use of multi-dimensional arrays in Java.
- Design, implement, and test Java programs that use class inheritance, and explain why this is an example of the ‚ƒúis-a‚ƒù relationship.
- Demonstrate the use of function chaining between derived class and base class methods.
- Describe the difference between deep copies and shallow copies in Java, and write programs that effectively handle deep memory.
- Explain how guarded code is implemented in Java through exceptions.
- Express numbers in decimal, binary and hexadecimal representations and use bitwise logical operators to process data at the bit and byte level.
- Identify an inner class and note its use in event-driven Graphical User Interface (GUI) code.
- Demonstrate a working knowledge of basic abstract data types and their Java-based API classes.
- Produce end-user programs which feature event-driven techniques that provide a sensible and easy-to-use GUI.
- Explain what abstract classes and Java interfaces are and how they are used.
- Describe declaration models for run-time storage allocation, garbage collection and type checking.
- Use some of the Java Collections Framework collections to write efficient and portable application programs.
- Define various types of Java generics and show how each is specialized to a class by the client program.
- Write to and read from files using intermediate file I/O operations in a Java program.
- Design, implement, test, and debug intermediate-level Java programs that use each of the following fundamental programming constructs: string processing, numeric computation, simple I/O, arrays and the Java API.
- Write applications that solve problems in one or more application area: mathematics, physics, chemistry, cellular automata, 3-D simulation, astronomy, biology, business, Internet.
|3. Special Facilities and/or Equipment - |
- Access to a computer laboratory with Java compilers.
- Website or course management system with an assignment posting component (through which all lab assignments are to be submitted) and a forum component (where students can discuss course material and receive help from the instructor). This applies to all sections, including on-campus (i.e., face-to-face) offerings.
- When taught via Foothill Global Access on the Internet, the college will provide a fully functional and maintained course management system through which the instructor and students can interact.
- When taught via Foothill Global Access on the Internet, students must have currently existing e-mail accounts and ongoing access to computers with internet capabilities.
|4. Course Content (Body of knowledge) - |
- Setting up a complete Java environment.
- The JDK
- Configuring the IDE for advanced Java programming
- The proper use of class members and methods
- When to use instance members and methods
- When to use static members and methods
- Implicit and explicit use of the "this" object
- Multi-dimensional arrays
- 2-D arrays
- Ragged 2-D arrays
- Instantiation of objects in multi-dimensional arrays
- The "is a" relationship
- Base classes
- Derived classes (subclasses) and class heirarchy
- Derived class constructors
- Member method overriding vs. simple overloading
- Private, protected, public and default members
- Encapsulation and Polymorphism
- Function Chaining
- Constructor chaining
- Member method chaining
- Deep vs. Shallow Copies of Objects
- Instantiation of member objects in constructors
- Cloning objects
- Deep copy cloning and its uses
- Shallow copy cloning and its uses
- Exception Handling and Event-Driven Programming
- Built-in Java exception classes
- User-defined exceptions
- When to re-throw and when to handle an exception
- Alternatives to exceptions
- Event-handling methods
- Non-decimal arithmetic
- Bitwise numeric operators
- Bitwise logical operators
- Binary and hexadecimal constants
- Inner Classes
- When to use an inner class
- Inner classes in event-driven GUI programs
- Topics in Abstract Data Types (ADTs)
- The vector ADT and Java's ArrayList
- The linked-list ADT and Java's LinkedList
- The Stack and Queue ADT
- Implementing ADTs through inheritance
- Using existing ADTs from java.util
- Topics in Graphical User Interface (GUI) design
- GUI through applets
- GUI through applications
- The Font class
- Multi-threaded GUIs
- Abstract Classes and Interfaces
- Defining and using abstract classes
- Defining and using interfaces
- Implementing interfaces and abstract classes
- Storage Allocation Methods
- Run time binding and storage management of activation records.
- Declaration consequences of pointers, references and value parameters.
- Strong type-checking and run-time vs. compile time error detection.
- Effect of declaration strategy on binding, visibility and lifetime of variables.
- Effect of declaration strategy on scope and persistence of variables.
- Java Collections Frameworks
- Java ArrayLists and ListIterators
- Java LinkedLists and ListIterators
- Java PriorityQueues
- Java Generics
- Generic classes
- Type Parameters
- The occasional need for wrapper classes
- Static generic methods
- Type bounds
- Topics in Java File I/O
- Binary I/O and FileInput/OutputStream
- Handling file exceptions
- Buffered input readers and writers and BufferedInput/OutputStream
- Primitive data and DataInput/OutputStream
- Print Writers and PrintWriter
- Essential examples and Assignment Areas
- String/text processing
- Numeric computation
- User interaction
- Multi-class projects and compound data types
- Inheritance-based projects
- Representative GUI project with event-driven design
- Multi-threading GUI project
- Applications used throughout course in selected areas
- Business and finance
|5. Repeatability - Moved to header area.|
|6. Methods of Evaluation - |
- Tests and quizzes
- Written laboratory assignments which include source code, sample runs and documentation.
- Final examination
|7. Representative Text(s) - |
|Liang, Y. Daniel, Introduction to Java Programming, 8th Edition, Prentice Hall, 2010. |
|8. Disciplines - |
|Computer Science |
|9. Method of Instruction - |
- Lectures which include motivation for syntax and use of the Java language and OOP concepts, example programs, and analysis of these programs.
- On-line labs (for all sections, including those meeting face-to-face/on campus) consisting of
- A programming assignment web-page located on a college-hosted course management system or other department-approved Internet environment. Here, the students will review the specification of each programming assignment and submit their completed lab work.
- A discussion web-page located on a college hosted course management system or other department-approved Internet environment. Here, students can request assistance from the instructor and interact publically with other class members.
- Detailed review of programming assignments which includes model solutions and specific comments on the student submissions.
- In person or on-line discussion which engages students and instructor in an ongoing dialog pertaining to all aspects of designing, implementing and analyzing programs.
- When course is taught fully on-line:
- Instructor-authored lecture materials, handouts, syllabus, assignments, tests, and other relevant course material will be delivered through a college hosted course management system or other department-approved Internet environment.
- Additional instructional guidelines for this course are listed in the attached addendum of CS department on-line practices.
|10. Lab Content - |
- Familiarization with the intermediate-level online lab environment
- Modify and customize project-specific and global settings of an Integrated Development Environment (IDE).
- Use the IDE to create multi-file programming projects.
- Organize projects within an IDE so as to support easy project-switching and orderly submission of labs.
- Gain experience with the steps needed to edit a complex program.
- Modify IDE settings to produce an industry standard code style.
- Organizing and debugging multi-class projects
- Demonstrate the ability to debug programs that contain multiple classes.
- Distinguish between interface and implementation in projects by creating classes that are independent of I/O modality.
- Write individual component classes that are independent of client use and can serve several client programs.
- Incorporate symbolic constants, statics and instance members into classes in a way that demonstrates a mature understanding of object-oriented programming (OOP) in a lab project.
- Debug a multi-class project to produce a working program.
- Exploring advanced array constructs in class design
- Gain experience in effectively using single and multi-dimensional arrays as class members.
- Apply nested loops to process multi-dimensional arrays.
- Use the IDE to debug errors in multi-dimensional arrays.
- Solve problems using fixed-size and dynamic sized arrays, as appropriate.
- Demonstrating competence in intermediate level algorithm design using classes within the IDE
- Use the IDE to implement a multi-faceted algorithm and/or simulation that makes effective use of OOP.
- Evaluate and comment on other students' algorithms.
- Utilize a combination of string processing and numeric processing to address various aspects of the algorithm implementation.
- Produce clear program runs which demonstrate that the algorithm addresses a variety of cases and/or input states.
- Incorporate bitwise and logical operations to address binary logic tasks within an algorithm.
- Building a program that uses class inheritance to demonstrate how re-use is handled in OOP.
- Create a project that contains at least one class intended to be used as a base class.
- Derive (sub-class) one or more classes from the base class.
- Use function chaining to avoid code duplication between base classes and derived classes.
- Differentiate between, and document in your lab, the distinct use of method overloading and method overriding.
- Incorporating basic abstract data types in programming projects
- Implement a fundamental abstract data type (ADT) such as a queue or stack in a programming lab.
- Use a previously written ADT from the programming language's application programmer interface (API) .
- Incorporate inheritance in a project that uses ADTs.
- Provide a client program that tests and demonstrates the correct behavior of the ADT.
- The proper use of deep and shallow copies in conjunction with inheritance and other advanced techniques learned in previous labs
- Create the proper set of methods within a class that enables an object to be cloned (copied deeply) correctly.
- Utilize inheritance to reinforce the segregation of data into base- and derived-level behavior.
- Utilize at least one other lab concept previously, such as binary logic or multi-dimensional arrays to further improve integration of intermediate concepts.
- Separate I/O and implementation in advanced programs.
- Building projects that use generics (A.K.A. templates)
- Demonstrate the difference in a lab project between deriving from a base class and specializing a generic.
- Practice writing a generic as well as using a language-defined generic (template) in a project.
- Use generics to exercise some aspect of ADTs such as specializing a generic ADT to make its behavior specific to an assigned project specification..
- Employ debugging techniques to solve problems that arise when designing with generic (template) classes.
- Exceptions and File I/O in Programming
- Write a class that has methods which use exception handling to report errors to the client.
- Write a test client that uses try/catch blocks to detect exceptions.
- Implement an algorithm or simulation that reads from and/or writes to files rather than the user screen
- Demonstrate various ways errors are handled and reported besides exceptions.
|11. Honors Description - No longer used. Integrated into main description section.|
|12. Types and/or Examples of Required Reading, Writing and Outside of Class Assignments - |
- Textbook assigned reading averaging 30 pages per week.
- Reading the supplied handouts and modules averaging 10 pages per week.
- Reading on-line resources as directed by instructor though links pertinent to programming.
- Reading library and reference material directed by instructor through course handouts.
- Writing technical prose documentation that supports and describes the programs that are submitted for grades.
|13. Need/Justification - |
|This course is a required core course for the AS Degree in Computer Science. |