|1. Description - |
|This course is a systematic treatment of intermediate data structures, algorithm analysis and abstract data types in the Java programming language intended for Computer Science transfer majors. Coding topics include large program software engineering design, multi-dimensional arrays, string processing, primitives, compound types, and allocation of instance and static data. Concept topics include dynamic memory, inheritance, polymorphism, hierarchies, recursion, linked-lists, stacks, queues, trees and hash tables.|
|Prerequisite: C S 1A|
|2. Course Objectives - |
|The student will be able to: |
- Use instance members, static members, and dynamic data structure allocation as appropriate in object-oriented Java class design.
- Analyze and demonstrate the use of multi-dimensional arrays in Java.
- Design, implement, and test Java programs that use object-orientation and class inheritance as a key ingredient to good software design, and explain why sub-classing is an example of the “is-a” relationship.
- Describe the difference between deep copies and shallow copies in Java, and write programs that effectively handle deep memory.
- Demonstrate a working knowledge of data abstraction through various data types, data structures and their Java-based API classes, and choose the appropriate data structure to model a given problem.
- Give examples of the proper use of recursion and describe when iterative solution is more efficient.
- Explain what abstract classes and Java interfaces are and how they are used.
- Describe declaration models for runtime storage allocation and garbage collection.
- Use the Java Collections Framework 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.
- Design, implement, test, and debug intermediate-level Java programs that use each of the following fundamental programming constructs: user interaction and communication, string processing, numeric computation, simple I/O, arrays and the Java API.
- Analyze the basic algorithms of a general tree ADT.
- Use object-oriented programming (OOP) to create alternative implementations of binary search trees in Java, and verify or compare the logN behavior of each.
- Analyze, classify and measure the main non-NlogN sorts and write a clear report of the results.
- 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) - |
- The proper use of class members and methods
- Primitive vs. compound types
- Types as collection of values (data members) and operations (method members).
- Type checking and incompatibility in classes.
- 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
- Inheritance in Software Design
- 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
- Separation of behavior and implementation and other attributes of good software design
- 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
- 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
- Base case vs. general case.
- Divide-and-conquer strategies
- Analysis of recursive solutions which are not appropriate due to exponential time complexity vs. iterative polynomial complexity
- Recursive backtracking
- 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.
- Consequences of reference declarations and parameter-passing in Java and the relationship between Java references and the values/pointer mechanism of other languages.
- 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
- Essential examples and Assignment Areas
- String/text processing
- Numeric computation
- User interaction
- Multi-class projects and compound data types
- Inheritance-based projects
- General Trees
- Tree nodes, roots, leaves, children and siblings
- Binary node implementation of a general tree
- Insertion and deletion in general trees
- Traversal with recursion
- Searching and Binary Search Trees (BSTs)
- Ordering condition and structure condition
- OOP (object-oriented-programming) Implementation
- Time complexity consequence of the divide-and-conquer algorithm in of BSTs
- NlogN Sorts
- Merge sort
- Heap sort
- 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) - |
|Weiss, A. Mark Allen. Data Structures and Algorithm Analysis in Java. Third Edition. Addison Wesley, 2011. |
|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 - |
- 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.
- 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 queue and stack abstract ions in programming projects
- Implement a fundamental queue and stack abstract data type (ADT) 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.
- 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.
- Using linked-list ADTs to optimize for size-varying or space-sensitive data types
- Demonstrate the ability to use programming language-supplied linked-list structures in a problem that is not easily solved using fixed-size ADTs such as arrays.
- Incorporate generics so as to allow the algorithm to work on various underlying data types.
- Try different sized data for the linked-list and demonstrate that it handles growth properly.
- Demonstrating competence with binary search trees
- Implement a binary search tree (BST) from scratch, or make significant assigned adjustments to an existing BST data structure supplied by your instructor.
- Use recursion as appropriate for some of the BST methods.
- Demonstrate that the class works on various underlying base type by use of generic specialization.
- Incorporating hash tables into programs
- Produce a lab that creates or modifies a hash table and hashing function.
- Write a client that tests out the hash table on various data.
- Using a large data set, demonstrate that near-constant time access is produced by the hashing function and hash table.
- Supply runs and report results with varying sized data sets.
- Analysis of a single sort algorithm
- Implement a single sort algorithm as directed by the instructor.
- Experiment with coding adjustments to try to improve the performance.
- Compare the known time complexity of that algorithm with what you observe using increasingly larger data sets.
- Attempt to explain any discrepancies in the expected vs. observed growth rate of the sort algorithm.
- Analysis of multiple sort algorithms
- Implement multiple sort algorithms, at least two of which involve Shell sort and quicksort.
- Experiment with coding adjustments to try to improve the performance on any one of them to see if you can beat the fastest of the algorithms.
- Time the algorithms on very small to very large data sets.
- Report on which algorithms work better on small sets, and which on large sets.
|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 restricted support course for the A.S. degree in Computer Science. |