UW-Madison · CS300 · Programming II

CS300: ace the component, not just read the notes

Your complete guide to University of Wisconsin-Madison's programming ii course. See where the marks are, work real practice questions, and study with an AI tutor that knows CS300.

3 credit points Intermediate undergrad Offered Fall / Spring Department of Computer Sciences

Sia generates CS300 practice questions, walks through object-oriented design: class versus object and interfaces step by step, and quizzes you on the material the component that weights most heavily.

Spot the bug

Find what is wrong

Multiple choice · the fix is revealed after you answer

You need a structure that must support inserting elements and repeatedly removing the smallest, on a dataset that changes constantly. Which is the best choice and why?

The fix

List the required operations first: insert, and remove-minimum, both repeated many times.

An unsorted array inserts in O(1) but finding the minimum costs O(n) each time, so the repeated removals dominate.
A sorted array gives O(1) access to the minimum but O(n) insertion because elements must shift.
A binary heap gives O(log n) for both operations, which is the balance this workload needs. An unbalanced BST can degrade to O(n) in the worst case, which is why the heap is the safer answer.

The trap: Choosing the structure that is fastest at the operation you looked at first. The second published outcome of this course is comparing Big-O worst case complexity across different ADT implementations, and questions are built so that each option wins on exactly one operation and loses on the other. classic slip!

Overview

What CS300 is, and where it sits

COMP SCI 300 is the second course in the UW-Madison programming sequence and the one that matters most administratively: declaring the Computer Sciences major requires a grade of BC or higher in it, together with calculus. It carries 3 credits at intermediate level.

The content moves from writing programs to designing them. Object-oriented programming with classes and objects comes first, then array-based and linked data structures including lists, stacks and queues. Assignments require multi-class programs using interfaces, generics and exception handling. The course then introduces the abstract data types that the rest of the curriculum assumes: List, Stack, Queue, PriorityQueue implemented as a heap, and the binary search tree, alongside searching and sorting, recursion, and an introduction to complexity analysis.

Two published outcomes tell you where the difficulty actually sits. One is analysing and comparing the Big-O worst case complexity of different ADT implementations, which is the analytical half of the course. The other is identifying and properly testing all boundary conditions for comprehensive testing, which is the difference between a program that works on the example and one that earns full marks.

How it differs from its first-year siblings. COMP SCI 300 sits between Programming I and Programming III. Either COMP SCI 200 in Java or COMP SCI 220 in Python can precede it, and a placement route also exists.

Always treat your own course outline and the exam timetable as authoritative.

Difficulty & time commitment

Is CS300 hard, and how much time does it take?

CS300 is manageable if you keep a weekly rhythm and treat the back half as the main event. The pattern is consistent: it starts gently and steepens, and the heaviest assessment is the part that separates grades.

Difficulty
3.7 / 5
Hard. Gentle early, demanding back half. Hard to fail with steady work; a top grade takes consistent practice.
Coursework
0%
Coursework carries most of the grade. The heaviest single component is the component at 0%.
First thirdObjects, interfaces, generics
Middle thirdLists, stacks, queues, priority queues
Final thirdTrees, recursion, complexity analysis

The difficulty curve and the assessment weighting point the same way: the back half is harder and worth more. Front-loading effort there is the highest-return decision in the course.

Is this course for you

Who tends to do well, and who tends to struggle

You will likely do well if

  • You design before you type; multi-class assignments punish improvisation.
  • You test boundary conditions as a habit, which is a published outcome.
  • You can hold implementation and analysis in mind together.
  • You start assignments early enough to rewrite a bad design once.

You may struggle if

  • You are still shaky on loops and arrays from Programming I.
  • You treat complexity as theory to skim before the exam.
  • You test only the example input.
  • You are relying on this course for major declaration and leave the work late.
do this ↘
What top students do differently
  • For every structure, write the complexity of every operation, not just the headline one.
  • Implement each ADT twice, array-based and linked, and compare them yourself.
  • Write the test cases before the implementation for at least one assignment.
  • Draw the pointer or reference diagram before coding any linked structure.

Syllabus

The 10 topics, topic by topic

The exam-weight marker on each topic shows where the marks concentrate. The amber topics carry the highest exam weight.

T1

T1 · Object-oriented design: class versus object

Course description

The distinction the whole course rests on, and the first genuine design decision students make.

T2

T2 · Interfaces, iterators and generics

Course description

Writing code against a contract rather than an implementation, and parametric polymorphism that makes structures reusable.

T3

T3 · Exception handling and file-based data

Course description

Reading and writing data and objects to files, and responding to the failures that come with them.

T4

T4 · Array-based versus linked implementations

Course description

The same abstract structure built two ways, and the trade-offs that follow. This comparison drives the complexity material.

T5

T5 · List, Stack and Queue

Learning outcome 1

The core abstract data types and their common operations, which the outcomes ask you to list and describe precisely.

High exam weightQuiz me on list →
T6

T6 · Priority queue and heap

Learning outcome 1

Ordered access without full sorting, implemented as a heap.

T7

T7 · Binary search tree

Learning outcome 1

The first non-linear structure, and where average and worst case start to diverge sharply.

T8

T8 · Recursion, searching and sorting

Course description

Solving problems by self-reference, and the classic algorithms that show why implementation choice matters.

High exam weightQuiz me on recursion →
T9

T9 · Introduction to complexity analysis

Learning outcome 2

Big-O worst case reasoning applied to competing implementations of the same ADT. The analytical core of the course.

T10

T10 · Testing boundary conditions

Learning outcome 3

A stated outcome: identifying and properly testing all boundary conditions rather than the typical case.

How it's assessed

Assessment structure

If you read nothing else

A component-by-component weighting breakdown is not published for this course. Rather than estimate one, we publish only what the course itself states. Check your current course outline for the exact percentages.

No component weighting is published. The university catalogue publishes course description, credits, requisites, course designation and learning outcomes, but not assessment weights, and instructor syllabi carrying them are set per section and per term. Rather than estimate a breakdown or reuse a superseded one, none is asserted here. Check the syllabus your instructor posts for this term. Not published in the catalogue. Format is set per section by the instructor.

How to actually pass it

A weekly rhythm, two checklists, and the traps to avoid

The course rewards consistency over cramming, and practice over re-reading. Here is the loop that works, then what to have nailed before each exam.

The weekly loop

Before lecture
Review the structure being covered so lecture time goes on the trade-offs.
Same week
Implement the week's structure from scratch, without the lecture code open.
Same week
Write boundary tests for what you built: empty, one element, duplicate, full.
Every fortnight
Re-derive the complexity of an earlier structure cold.

Before the mid-semester checklist

  • Class versus object, and object-oriented design decisions
  • Interfaces, iterators and generics
  • Array-based and linked list implementations
  • Stacks and queues, and what each is for

Before the final heaviest topics

  • Priority queues and heaps
  • Binary search trees and their degradation
  • Recursion, searching and sorting
  • Big-O analysis compared across implementations
  • Comprehensive boundary testing

The mistakes that cost marks

01

Quoting average case when the question asks worst case. The outcome names worst-case Big-O specifically, and BSTs are the classic example where the two diverge.

02

Designing while typing. Multi-class programs with interfaces and generics need a design first; retrofitting one is more expensive than starting again.

03

Testing only the typical case. Identifying and properly testing all boundary conditions is a published outcome, so it is assessed.

04

Underestimating the declaration stakes. A BC or higher is required to declare the major, so this is not a course to treat as one of several.

Formula & concept sheet

The vocabulary and formulas you must own

Abstract data type
A structure defined by its operations rather than its implementation.
Interface
A contract specifying operations a class must provide, allowing code to depend on behaviour rather than implementation.
Generics
Parametric polymorphism: writing one structure that works for many element types.
Exception handling
Responding to error conditions without abandoning program structure.
Linked structure
Nodes connected by references, as opposed to contiguous array storage.
Priority queue
An ADT serving the highest-priority element first, typically implemented as a heap.
Binary search tree
An ordered tree with logarithmic operations when balanced and linear when not.
Recursion
A method defined in terms of itself, with a base case that terminates it.
Big-O
An asymptotic upper bound on how a cost grows with input size.
Boundary condition
An input at the edge of the valid range, where implementations most often fail.

Common acronyms: {'term': 'QR-B', 'def': 'Quantitative Reasoning Part B designation'} · {'term': 'ADT', 'def': 'Abstract data type'} · {'term': 'L&S', 'def': 'College of Letters & Science'}.

Where it fits

Prerequisites, related courses & why it matters

Requires satisfied Quantitative Reasoning Part A and one of COMP SCI 200, 220, 301, 302, 310, or placement into COMP SCI 300; or the E C E 252 and E C E 203 pair; or graduate standing; or declaration in the Capstone Certificate. Not open to students with credit for COMP SCI 367.

Why it matters beyond the grade. COMP SCI 300 is the declaration gate for the Computer Sciences major, requiring a BC or higher, and the abstract data types it installs are the vocabulary of technical interviews.

FAQ

Frequently asked questions

Why does COMP SCI 300 matter so much?

Declaring the Computer Sciences major requires a grade of BC or higher in COMP SCI 300, COMP SCI/E C E 354 or COMP SCI 400, together with calculus. For most students that means this course.

What are the prerequisites?

Satisfied Quantitative Reasoning Part A plus COMP SCI 200, 220, 301, 302, 310 or placement into COMP SCI 300, among other routes.

What language is used?

Java, continuing the introductory sequence.

What is the hardest part?

Usually the shift from writing code that works to analysing why one implementation is better than another. The complexity outcome is examined, not just discussed.

How is it graded?

No weighting is published in the catalogue; assessment is set per section.

Is it still running?

Yes. The catalogue records it as last taught in Summer 2026.

Study CS300 with Sia

Work through object-oriented design: class versus object, interfaces, exception handling and the rest of the course with a tutor that knows it and quizzes you on the topics the assessments weight most heavily.

Start studying with Sia