CSC 240 Computer Science III

2026-Fall Course Website

Course Overview

Instructor: Si Chen · schen@wcupa.edu

Meeting: Tuesday / Thursday, 9:30 – 10:45 AM · Anderson Hall 315

Term: Fall 2026 (Aug 24 – Dec 12, 2026) · CRN: 34660

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.

Slides & Schedule

#DateTopicSlidesSupporting Materials
1Aug 25, 2026Introduction; review of Java/OOP; project design, planning, milestones, testing Class01.pdf CSC 141/142 diagnostic; Syllabus (PDF); Class code (.zip)
2Sep 1, 2026Java/OOP review (classes, objects, references, arrays); project design, milestones, checklists, testing Class02.pdf Class code (.zip) — includes AccountFlawed.java (find the flaws!)
3Sep 3, 2026Chapter 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)
4Sep 8, 2026Chapter 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
5Sep 10, 2026Chapter 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)
6Sep 15, 2026Chapter 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
7Sep 17, 2026Chapter 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
8Sep 22, 2026Chapter 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
9Sep 24, 2026Chapter 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
10Sep 29, 2026Mega 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)
11Oct 1, 2026Chapter 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, 2026Class 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
ExamOct 8, 2026Midterm (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)
12Oct 15, 2026Chapter 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
13Oct 20, 2026Chapter 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
14Oct 22, 2026Chapter 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
15Oct 27, 2026Chapter 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
16Oct 29, 2026Chapter 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

AssignmentAssignedDue (D2L)PointsHandout
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, 2026Tue Nov 10, 2026, 11:59 PM100 (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, 2026Tue Oct 6, 2026, 11:59 PM100 (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, 2026Tue 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 Employee with an abstract weeklyPay() and one shared toString(); SalariedEmployee (salary / 52) and HourlyEmployee (time-and-a-half after 40 hours).
  • Q2 Manager (15 pts): Manager extends SalariedEmployee and adds a weekly bonus on top of super.weeklyPay().
  • Q3 Interfaces (25 pts): Employee implements Payable, Comparable<Employee>; equals() by id; compareTo() by weekly pay; and an unrelated Invoice class that is also Payable.
  • Q4 PayrollApp (25 pts): load employees.csv into the right subclass objects, skip the duplicate id, and print the report, the sorted report, and every payment through one ArrayList<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

  1. Finish the seven .java files from the starter zip. Put your name in the header comment of each. Do not modify Payable.java or employees.csv, and keep every given signature.
  2. Make sure everything compiles and that PayrollApp’s output matches the handout exactly (keep employees.csv in the folder you run from; in IntelliJ, that is the project root).
  3. Compress the seven .java files into one ZIP named LastName_FirstName_HW2.zip. Do not zip the whole IntelliJ project, and do not submit .class files.
  4. 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.

Late work: no credit unless a valid excuse is communicated before the deadline (see syllabus, Section 7). Partial credit: a program that does not fully work still earns points if a comment at the top says what works, what does not, and what you tried; a file that does not compile receives at most half of that question. Individual work: you may discuss concepts, but not exchange or co-write code; AI tools may explain concepts and error messages but may not write your solution (syllabus, Section 6). You must be able to explain every line you submit.

Questions? Office hours Tue/Thu 12:30–2:00 PM (by appointment), Wed 1:00–3:00 PM, 25 University Ave. Room 131, or email schen@wcupa.edu with the question number, the exact error message, and what you already tried.

Tutorials & Supporting Materials