Course Overview
Advanced topics in object-oriented programming, including project design, planning, and testing with milestones and checklists. Programming topics include text processing (StringBuilder, StringTokenizer), inheritance, polymorphism, abstract classes, interfaces, generic classes, exception handling, random-access files, serialization, and an introduction to basic data structures such as collection classes and linked lists.
Expected Background
Prerequisite: successful completion of CSC 142. You should be comfortable with Java basics, control flow, methods, arrays, and elementary object-oriented programming.
→ Take the CSC 141/142 diagnostic (online)
Feeling rusty on classes & objects? → Interactive Classes & Objects review (self-check, ungraded)
Textbook & Tools
Textbook: Tony Gaddis, Starting Out with Java: From Control Structures through Data Structures, 4th Edition (ISBN 978-0134787961). The 3rd Edition is also acceptable.
- Java (JDK) version specified in D2L.
- IntelliJ IDEA recommended (Eclipse, NetBeans, or jGRASP acceptable).
Slides & Schedule
| # | Date | Topic | Slides | Supporting Materials |
|---|---|---|---|---|
| 1 | Aug 25, 2026 | Introduction; review of Java/OOP; project design, planning, milestones, testing | Class01.pdf | CSC 141/142 diagnostic; Syllabus (PDF); Class code (.zip) |
| 2 | Sep 1, 2026 | Java/OOP review (classes, objects, references, arrays); project design, milestones, checklists, testing | Class02.pdf | Class code (.zip) — includes AccountFlawed.java (find the flaws!) |
| 3 | Sep 3, 2026 | Chapter 9: wrapper classes; Character class; String methods; StringBuilder; tokenizing | Class03.pdf | HW1 assigned (due Tue Sep 15, 11:59 PM, D2L) · Starter code (.zip); Gaddis Ch. 9; Class code (.zip) |
| 4 | Sep 8, 2026 | Chapter 9: tokenizing in depth (split with regex, StringTokenizer, Scanner); parsing tokens into numbers; CSV record to object | Class04.pdf | Class code (.zip) · HW1 due Tue Sep 15, 11:59 PM; Quiz 1 Thursday (Chapter 9) · try 2 practice examples first |
| 5 | Sep 10, 2026 | Chapter 9: integrated text-processing problems (sentence capitalizer, password verifier, phone formatter, word statistics, score file, Pokémon search); build-a-Pokédex mini-project (CSV → objects → GUI); bridge to Chapter 10 | Class05.pdf | Quiz 1 — answers & explanations posted · Class code (.zip) — includes scores.csv and pokemonName.csv · Pokédex mini-project starter (.zip) — parse pokemon_data.csv into objects, call the provided GUI, then send your pick to the Pokémon World · Pokédex mini-project — final solution (.zip) |
| 6 | Sep 15, 2026 | Chapter 10: inheritance fundamentals; superclass/subclass relationships; the protected access modifier | Class06.pdf | Review: Pokédex capstone wrap-up · HW1 due tonight, 11:59 PM · Class code (.zip) — Pokemon.java/Eevee.java (protected fields) and a Vehicle/ElectricCar pair |
| 7 | Sep 17, 2026 | Chapter 10: polymorphism and dynamic method binding — a parent-type reference pointing to a child object, and which overridden method actually runs | Class07.pdf | Class code (.zip) — Shape/Circle/Rectangle polymorphism warm-up, plus an in-class Triangle exercise · Pokemon extension (.zip, optional) — the same idea scaled to Jolteon extends Eevee extends Pokemon and all 9 Eeveelution forms, is-a vs has-a, and a MegaEvolvable interface bonus |
| 8 | Sep 22, 2026 | Chapter 10: abstract classes & interfaces — review of reference vs. actual type and constructor chaining, then making a class impossible to instantiate directly and a capability any unrelated class can opt into | Class08.pdf | Class code (.zip) — review folders plus abstract class Shape, interface Resizable, and an in-class exercise giving Vaporeon the MegaEvolvable capability from Class 7's Pokemon bonus |
| 9 | Sep 24, 2026 | Chapter 10 synthesis: overriding Object's equals() and toString(), the Comparable<T> interface for sorting — then the Mega Evolution capstone: real Mega forms via MegaEvolvable, sent to the Pokémon World and Mega Evolved live. HW2 assigned. | Class09.pdf | HW2 assigned (due Tue Oct 6, 11:59 PM, D2L) · HW2 starter (.zip) · Class code (.zip) — equals()/toString(), Comparable<Shape>, a Triangle synthesis exercise, and the Mega Evolution capstone (05_mega_world_starter: make Charizard/Blastoise implements MegaEvolvable, then send them to the Pokémon World and Mega Evolve them live) · midterm (Chapters 9–10) planned for Oct 8 |
| 10 | Sep 29, 2026 | Mega Evolution capstone (finish Class 9's: Charizard, Blastoise, send to the Pokémon World and Mega Evolve live), then midterm review for Chapters 9–10: tracing, compiles/runs/crashes, abstract class vs. interface, and a write-the-classes practice problem | Class10.pdf | Capstone: Class 9 code (.zip) → 05_mega_world_starter · Pokémon World · Review: Class 10 code (.zip) — Chapter 9 trace, Chapter 10 trace, compiles-or-not, and midterm-style programming practice (Vehicle/Car/Truck + loading fleet.csv) · Midterm Thu Oct 8 (Chapters 9–10, in class, online with a built-in code editor, mostly programming) · Practice exam (open now) |
| 11 | Oct 1, 2026 | Chapter 10 (last section): Comparator<T> vs. Comparable<T>, anonymous inner classes, functional interfaces, and lambda expressions; ArrayList sort/removeIf/forEach (not on the Oct 8 midterm) | Class11.pdf | Class code (.zip) — the same Comparator written three ways (named class → anonymous class → lambda), an in-class ShapeFilter exercise, and sorting the Pokédex with one-line lambdas · HW2 due Tue Oct 6, 11:59 PM |
| – | Oct 6, 2026 | Class cancelled (instructor sick) — self-study for the midterm: work through the practice exam (Chapters 9–10). Chapter 11 (exceptions) moves to Thu Oct 15 (Class 12). | Midterm practice exam (not graded) · Review: Class 10 code (.zip) · HW2 due tonight, 11:59 PM · Midterm Thu Oct 8 (Chapters 9–10), as planned | |
| Exam | Oct 8, 2026 | Midterm (Exam 1), ONLINE — Chapters 9–10, 9:30–10:45 AM from your own computer (no penalty up to 30 minutes over, until 11:15 AM). Do not come to Anderson Hall 315. | Exam link (open 9:30–11:15 AM) — access code in D2L and your email · Practice exam (not graded) | |
| 12 | Oct 15, 2026 | Chapter 11: exceptions — reading a stack trace, try/catch, the exception class hierarchy, multiple catch blocks and multi-catch, checked vs. unchecked, throws, and propagation up the call stack (moved from the cancelled Oct 6 class; Oct 13 is Fall Break) | Class12.pdf | Class code (.zip) — stack trace, try/catch, catch order, checked exceptions & throws, and an in-class Pokédex loader that survives a hand-typed pokemon_dirty.csv · Read Gaddis 11.1 |
| 13 | Oct 20, 2026 | Chapter 11: finally, throw, and your own exception classes — starts with Class 12's Pokédex loader exercise (no time for it Thursday), then the finally block, throwing exceptions yourself (IllegalArgumentException / IllegalStateException), throw vs. throws, and writing a custom checked exception | Class13.pdf | Bring the Class 12 code (.zip) — we start with 05_pokedex_loader_starter (TODO 1–5) · Class 13 code (.zip) — finally traces and closing a file, Circle/BankAccount that throw, InsufficientFundsException, and an in-class exercise: make Pokemon.setLevel throw your own InvalidLevelException · Read Gaddis 11.1–11.2 |
| 14 | Oct 22, 2026 | Chapter 11: exception propagation and design — where to catch and what gets skipped, wrapping an exception with a cause and reading "Caused by:", try-with-resources, overriding methods that throw, six design rules; capstone: a Pokédex loader that reports instead of crashes | Class14.pdf | HW3 assigned (due Tue Nov 10, 11:59 PM, D2L; 12%) · HW3 starter (.zip) · Class code (.zip) — catch-high vs. catch-low propagation trace, BadLineException with a cause, try-with-resources old vs. new, Loader interface overriding rules, and the in-class capstone 05_pokedex_loader_v2_starter (PokedexLoader returns the good Pokémon, keeps the bad lines, throws one PokedexLoadException, writes rejects.txt) · Next week: Ch. 11.3 binary files, random access & serialization |
| 15 | Oct 27, 2026 | Chapter 11: exception propagation and design — finishing the Pokémon setLevel solution (checked or unchecked?), where to catch and what gets skipped, wrapping with a cause and reading "Caused by:", try-with-resources, overriding methods that throw, six design rules | Class15.pdf | Code: Class 13 zip (04_pokemon_level_starter) and Class 14 zip (01–05; capstone 05_pokedex_loader_v2_starter if time) · After today you can do HW3 Q1–Q4 |
| 16 | Oct 29, 2026 | Chapter 11.3: advanced file I/O — binary files with DataOutputStream / DataInputStream, random-access files (fixed-length records, seek, update in place), and object serialization (Serializable, ObjectOutputStream, transient) | Class16.pdf | Class code (.zip) — text vs. binary byte counts, RandomAccessFile temperatures, serializing an ArrayList<Student>, and the in-class 04_pokemon_save_starter (save the team as objects + a level table you update in place) · Used in HW3 Q5 · Read Gaddis 11.3 |
Assignments & Deadlines
| Assignment | Assigned | Due (D2L) | Points | Handout |
|---|---|---|---|---|
Homework 3 — Warehouse (Chapter 11: custom exception classes, throw, checked vs. unchecked, multi-catch, wrapping with a cause, try-with-resources, a loader that reports instead of crashes, object serialization, random-access files) | Thu Oct 22, 2026 | Tue Nov 10, 2026, 11:59 PM | 100 (12% of grade) | CSC240_Fall2026_HW3.pdf Starter code (.zip) |
Homework 2 — Payroll (Chapter 10: abstract classes, inheritance & super, polymorphism, interfaces, equals(), Comparable) | Thu Sep 24, 2026 | Tue Oct 6, 2026, 11:59 PM | 100 (6% of grade) | CSC240_Fall2026_HW2.pdf Starter code (.zip) |
Homework 1 — Text Processing (Chapter 9: String, StringBuilder, Character, wrapper classes, tokenizing) | Thu Sep 3, 2026 | Tue Sep 15, 2026, 11:59 PM (closed) | 100 (6% of grade) | CSC240_Fall2026_HW1.pdf Starter code (.zip) |
Homework 2 — what is in it
A small weekly payroll system. The starter compiles as-is; add your code where the TODO comments are.
- Q1 Employee hierarchy (35 pts):
abstract class Employeewith an abstractweeklyPay()and one sharedtoString();SalariedEmployee(salary / 52) andHourlyEmployee(time-and-a-half after 40 hours). - Q2 Manager (15 pts):
Manager extends SalariedEmployeeand adds a weekly bonus on top ofsuper.weeklyPay(). - Q3 Interfaces (25 pts):
Employee implements Payable, Comparable<Employee>;equals()by id;compareTo()by weekly pay; and an unrelatedInvoiceclass that is alsoPayable. - Q4 PayrollApp (25 pts): load
employees.csvinto the right subclass objects, skip the duplicate id, and print the report, the sorted report, and every payment through oneArrayList<Payable>.
Everything you need is in Classes 6–9 (Chapter 10). The handout has the complete expected output and a submission checklist. HW2 is also good practice for the midterm (planned for Oct 8).
How to submit
- Finish the seven
.javafiles from the starter zip. Put your name in the header comment of each. Do not modifyPayable.javaoremployees.csv, and keep every given signature. - Make sure everything compiles and that
PayrollApp’s output matches the handout exactly (keepemployees.csvin the folder you run from; in IntelliJ, that is the project root). - Compress the seven
.javafiles into one ZIP namedLastName_FirstName_HW2.zip. Do not zip the whole IntelliJ project, and do not submit.classfiles. - Upload the ZIP to D2L → CSC 240 → Assignments → Homework 2 before Tuesday, October 6, 2026, 11:59 PM. You may resubmit before the deadline; only the last submission is graded. The D2L timestamp is authoritative.
Tutorials & Supporting Materials
- Example code from each class is linked in the schedule above (per-class .zip, open in IntelliJ). All-in-one: CSC240_code.zip
- CSC 141/142 Diagnostic — online submission
- Diagnostic reference answers (posted after class)
- Install IntelliJ IDEA Community Edition: jetbrains.com/idea