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 1answers & 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
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: superclass/subclass relationships continued — multi-level hierarchies, is-a vs has-a, protected in depth Class07.pdf Class code (.zip)Jolteon extends Eevee extends Pokemon, Trainer (composition), and a fix-the-access-modifier exercise

Assignments & Deadlines

AssignmentAssignedDue (D2L)PointsHandout
Homework 1 — Text Processing (Chapter 9: String, StringBuilder, Character, wrapper classes, tokenizing)Thu Sep 3, 2026Tue Sep 15, 2026, 11:59 PM100 (6% of grade)CSC240_Fall2026_HW1.pdf
Starter code (.zip)

Homework 1 — what is in it

  • Q1 Text Analyzer (30 pts): classify the characters of a line (letters / digits / whitespace / other), count vowels and words, reverse it with StringBuilder, and test for a palindrome — TextAnalyzer.java.
  • Q2 Word to Number (25 pts): convert a phoneword such as 1-800-Flowers to 1-800-3569377 one character at a time — Word2Number.java.
  • Q3 Gas Prices (45 pts): parse a CSV of weekly New York gasoline prices (2008–2018) with split/StringTokenizer and Double.parseDouble; compute yearly and monthly averages and the highest/lowest price — GasPrices.java.

Everything you need is in Class 3 (Chapter 9). The handout has the exact output formats, sample runs, self-check values and a submission checklist.

Data file for Q3: CSC240_HW1_gas_prices.csv. The template downloads it automatically from this website; if the download fails on your computer (no network, or an older JDK), the program reads the copy of gas_prices.csv that is inside the starter zip — keep that file in the folder you run the program from (in IntelliJ, the project root). Either way, do not modify getData().

How to submit

  1. Finish the three files from the starter zip: TextAnalyzer.java, Word2Number.java, GasPrices.java. Put your name in the header comment of each file, and do not change any of the existing template code.
  2. Make sure all three files compile and match the sample runs in the handout. Run through the checklist on the last page of the handout.
  3. Compress the three .java files into a single ZIP named LastName_FirstName_HW1.zip (e.g. Lovelace_Ada_HW1.zip). Do not zip the whole IntelliJ project, and do not submit .class files, screenshots, or Word documents.
  4. Upload the ZIP to D2L → CSC 240 → Assignments → Homework 1 before Tuesday, September 15, 2026, 11:59 PM. You may resubmit as many times as you like before the deadline; only the last submission is graded.
  5. Check the D2L confirmation email. 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. Correct answers without code earn 0 points. 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