CMPS 144/144L (Computer Science 2)
Intersession 2024
Syllabus
Programming Assignments
Prog. Assg. #1: Polynomial
Prog. Assg. #2: KeyPadLock
Prog. Assg. #3: Slider Puzzle Configuration
Prog. Assg. #4: Outdegree-1 Graphs
Prog. Assg. #5: Solving the Slider Puzzle
Prog. Assg. #6: Binary Codeword Tree Builder
Lab Assignments
Lab #1:
Activity #1:
Complete the Temperature Class
Activity #2:
Complete the TimeOfDay Class
Lab #2: 3-Color Partitioning
Lab #3: Inheritance/Child Classes
Lab #4: Using Abstract Classes for Sorting and Partitioning
Lab #5: Using Stacks to Process FPAE's
Lab #6: Shortest Paths using a Queue; Indexed List via Link1
Lab #7: Red/Blue Classifiers and Recursion
Lab #8: More Recursion
Lab #9: Binary Search Trees and Hash Tables
Lecture Notes
Software Quality
Exceptions
Cloning in Java
ArrayLists
Iterators
Loop invariants
Red/Blue Jar of Marbles Game
Introduction to Loop Invariants
Multiplication
Searching an Array: Development of Linear and Binary Search Algorithms
Inheritance
Inheritance Example:
Coin
and Descendant Classes
A Different example using same abstraction:
TossableCoin
(parent)
TossableCoinWithCounts
(child)
polymorphism demonstration
Development of a Counter Class Hierarchy
source code
Code Reuse via Inheritance and Generics; Case Study: Sorting
Stacks
All About Stacks
Stack (interface)
Array-based implementation:
StackViaArray
Reference/Pointer-based implementation:
Link1
StackViaLink1
Queues
All About Queues
Queue (interface)
Array-based implementation:
QueueViaArray
Reference/Pointer-based implementation:
Link1
QueueViaLink1
Tester Application:
QueueTestApp
Comparator-based Sorting using Generics
Recursion-related
:
Intro. to Recursion
Recursive Solutions to Array and String Problems: Three Examples
Recursion: How it Works
Recursion: Timing
QuickSort:
QuickSort: A Recursive Sorting Algorithm
Source code
BinarySearcher
Trees
Binary Trees
AVL Trees
(optional reading)
HeapSort
Huffman Coding/Compression:
Notes on Coding and Data Compression
Morse Code Translator
Algorithm and Example
Another Worked Example
Hashing
Java Resources
Java Package Hierarchy
(i.e., links to all packages)
Links to particular packages/classes
java.lang
:
Math
String
java.util
:
Scanner
Iterator
ArrayList
Java SE Download
jGrasp IDE
jGrasp Tutorials
(198-page pdf file) (links to separate chapters exist on web page at URL specified in previous hyperlink).
How Java Works
(how stuff works) (Note that the hyperlinks for downloading JDK, etc., on this page are out of date.)
Java "home page"
Java Tutorials
The Java Tutorials
Object-Oriented Programming Concepts
Language Basics
Classes and Objects
Interfaces and Inheritance
Numbers and Strings
Arrays
Generics
Packages
How to Make Frames (Main Windows)
How to Write Doc Comments for the Javadoc Tool
Programming with Assertions in Java