CSE116: Computer Science 2

Summer 2025

Jump to current week
YouTube Watch lecture (Live and VOD)
Autolab Submit programming assignments
GitHub Example Code examples shown in lecture slides
Tracing Tool Memory Diagram Tracing Tool
Memory Diagrams Memory Diagram Reference
Piazza Ask questions and find office hours
Discord Chat with other students

Syllabus

Course Description

You know the basics of programming. You're proficient in variables, functions, control flow, data structures, and file IO. With these concepts, you can train a computer to complete nearly any task you can imagine. So what's next?

Writing large programs

You will learn how to write and organize large pieces of software. To this end, in CSE116 you will study:

  • Unit Testing - How to automate the process of verifying that your code is correct
  • Classes and Object-Oriented Programming (OOP) - Organize your code into classes and objects
  • Data Structures & Algorithms - Efficiently work with different types of data

While studying these topics we will have a focus on how your programs work, not just that they work.

Expectations

This is not an easy course! To do well in this course you are expected to:

  • Invest a minimum of 12 hours/lecture* in CSE116 including at least 9 hours/week outside of class
  • Want to learn about computer science (This is assumed since you are taking a second CSE course)
  • Understand the basics of programming
  • Stay up-to-date with the course content (You are expected to fully understand the content of every lecture before the next lecture begins

* The 12 hour minimum is an average. If you invest less than 12 hours/lecture in CSE116 early in the semester, or do not fully understand all the CSE115 topics, you should expect to work significantly more than 12 hours/lecture while you catch up. You should expect to spend 50+ hours in a single week on this course alone if you fall behind or if you're not comfortable with the CSE115 material. Do not fall behind.

Learning Objectives

Being successful in CSE116 requires completion of all of the learning objective requirements. You must complete every Learning Objective requirement in order to pass CSE116.

Learning objectives are divided into 2 primary categories:


Classes/Object-Oriented Programming (OOP)

Instead of writing programs as a collection of variables and functions, with object-oriented programming we will group these variables and functions into classes and objects. This allows developers to reason about their programs at a higher level of abstraction.

A student has completed this objective if they are able to:

  • Read/Quiz: Trace through the execution of programs that use classes, inheritance, and polymorphism while tracking the state of stack and heap memory using memory diagrams
  • Write: Write programs and testing that use classes, inheritance, and polymorphism

Data Structures & Algorithms

We will study several new approaches for storing data and computing with that data. Primarily, we will see linked-lists, trees, and graphs while exploring applications of each data structure.

A student has completed this objective if they are able to:

  • Read/Quiz: Trace through the execution of programs that use linked-lists and trees using memory diagrams
  • Write: Write programs and testing that use linked-lists, trees, and graphs as well as implement new algorithms to expand the functionality of each data structure

Learning Objective Completion

To complete the learning objectives of this course, you must complete all of the following requirements.

  • Quiz x2
    • There are 2 quiz requirements that must be completed during the semester.
      1. OOP Quiz
      2. Data Structures Quiz
    • Quizzes will be completed during midterm and/or final exam and will assess your ability to trace through stack and heap memory during the execution of provided code.
    • These quizzes are graded on a pass/fail basis. If you pass the quiz, you have completed the learning objective portion of that quiz. All completion decisions will be made by a human after reviewing your submission.
    • Both the midterm and final exam with consists of both the OOP and Data Structures quiz. This provides you with 2 opportunities to complete each quiz. If you pass a quiz on the midterm, you do not have to retake it on the final exam. If you pass both quizzes on the midterm, you do not have to take the final exam.
    • The midterm and final with both contain 2 programs to trace for each quiz. This means that for each quiz (OOP and Data Structures) you will have a total 4 opportunities to complete a trace for that quiz. If you pass any of the 4 traces, you will have completed that learning objective (Meaning that there are 8 total traces that you can complete. You must pass 1 OOP trace and 1 Data Structures trace to pass the course.)
  • Write - Programming Tasks x8
    • There are 8 learning objective programming tasks assigned throughout the semester. To complete the write portion of the learning objectives, you must complete all 8 programming tasks.

Learning Objective Requirements Completed Grade
All 8 Programming Tasks and 2 Quizzes Grade depends on the number of Application Objectives completed
Less than all Programming Tasks all Quizzes F

Application Objectives

If you have completed all of the learning objectives, your grade will be determined by the number of application objectives you've completed. Most application objectives are designed to incentivize you to keep up with the material of the course and are not meant to be overly difficult to earn. Your final letter grade will be determined as follows:

Application Objectives Completed Grade
10-12 A
9 A-
8 B+
7 B
6 B-
5 C+
4 C
3 C-
0-2 F


Application Objectives

Falling even 1 week behind in this course will significantly increase your chances of failing. Application Objectives offer you incentives to stay up-to-date on the material by giving you chances to improve your letter grade.

  • Programming Task Expected Deadlines x8
    • Each of the 8 programming tasks have 2 separate deadlines, the expected deadline and final deadline. Each time you complete a task before its expected deadline, you will earn 1 application objective
    • Expected Deadline: The expected deadline is the morning (8am) 2 days after the material for the task was covered in lecture (This is less than 48 hours. The summer moves extremely fast!). The intent is that you are expected to complete the task before the next lecture begins. As the name implies, this is when you are expected to be able to complete the task if you are keeping up with the course. Each time you complete a task before it's expected deadline, you will earn 1 application objective
    • Final Deadline: The final deadline is the night (11:59pm) 11 days after the material for the task was covered in lecture. You must complete all 8 tasks before their late deadlines, or you will fail the course. This means that if you miss any of the 8 final deadlines, you will fail regardless of your performance throughout the rest of the course. Students who fall behind enough to need to use a final deadline are often too far behind to have any chance of catching back up. This deadline removes any false hope you may have of catching up after falling so far behind. Meeting this deadline will not result in any application objectives.
  • Quizzes x4
    • There are 4 total traces on the midterm exam. For each trace that you pass on the midterm, you will earn 1 application objective
    • The final exam gives you a second chance to pass the class via 4 more traces, but you will not earn any application objectives if you need to use the final exam

Readings

There is no textbook for this course. Instead, links to relevant readings and tutorials are provided in the course schedule. When a reading is listed you should study it before lecture.

Academic Integrity

CSE Department Academic Integrity Policy:
https://engineering.buffalo.edu/computer-science-engineering/information-for-students/undergraduate-program/cse-undergraduate-academic-policies/cse-academic-integrity-policy.html

UB Academic Integrity Policy:
https://catalogs.buffalo.edu/content.php?catoid=11&navoid=571#preamble

In addition to the department and university policies, the following details apply to this course.

All submitted work must be of your own creation, and you must not share your submission with anyone else. If any submission is very similar to code that has been submitted by another student, or can be found online, it is in violation of this course's academic integrity policy, and all students will be penalized whether they were copying or sharing their code with other students so they can copy. If two submissions are similar beyond what is likely if the students worked independently, then both students are in violation of the academic integrity policy.

All violations will result in:

An F in CSE116.

It is your responsibility to understand what constitutes an academic integrity violation. If you have any question whether something you are doing is a violation or not, ask for clarification before receiving an F in the course. We will not entertain excuses after you have been caught.

Examples of acceptable behavior:

  • Discussing an assignment with your classmates and brainstorming abstract solutions, then writing the code independently
  • Forming study groups and discussing course material and assignments on Discord, Zoom, etc.
  • Searching the Internet for supplementary material on the course topics
  • Asking the teaching staff for clarification on a homework question
  • Having, or hiring, someone to help you understand the concepts of the course

Examples of unacceptable behavior:

  • Submitting code, or other work, for course credit that is not your own.
  • Using Artificial Intelligence to help you write code
  • Collaborating with another student to write code for an assignment. (Do not sit next to your friend while you both work on the coding tasks)
  • Allowing another student to see your code or submission for an assignment.
  • Allowing another student to access your work that will be submitted for course credit. (Examples: Do not post you code publicly, host your code in a public repository, or allow a classmate to access your laptop)
  • Having someone help you write code.
  • Hiring someone to write code for you.
  • Copying a large amount of material found on the Internet into your submission.
  • Attempting to access the grading code on Autolab.
  • Asking any of the course staff to falsify your grade (eg. Asking for any result that you did not rightfully earn).

Any student may be challenged by the course staff to explain their code. If they can not explain their code in a way that convinces the course staff that they were the author of all the code they submitted for course credit, they will be found in violation of this academic integrity policy. Please note that if you are in violation of any other part of this policy, it is still a violation even if you can explain your code (eg. If you did write the code, but helped someone else cheat)

If you plan on cheating, plan on taking this course again.


Lecture 1: Introduction to Java
Tuesday
May 27
Course Introduction

Introduction to Java - Slides

Java Loops and Conditionals - Slides
Lecture 2: Introduction to Java
Thursday
May 29
Java Data Structures - Slides

Java Examples
Lecture 3: Testing 1 - Unit Testing
Programming Task 1: Unit Testing
Tuesday
June 3
Unit Testing - Slides

Testing Strings/doubles - Slides

Testing and Recursion - Slides
Lecture 4: Classes/OOP 1 - Classes
Programming Task 2: Classes
Thursday, June 5 @ 8:00am
Task 1: Expected Deadline
Thursday
June 5
Classes and Objects - Slides

Classes and Objects - Slides

Testing Classes and Examples - Slides
Saturday, June 7 @ 8:00am
Task 2: Expected Deadline
Lecture 5: Data Structures 1 - Linked Lists
Programming Task 3: Linked Lists
Tuesday
June 10
Linked List Structure - Slides

Linked List Algorithms - Slides

Stack and Queue - Slides
Lecture 6: Classes/OOP 2 - Inheritance
Programming Task 4: Inheritance
Thursday, June 12 @ 8:00am
Task 3: Expected Deadline
Thursday
June 12
Inheritance - Slides

Inheritance and Override - Slides

Sorting with Comparators - Slides
Saturday, June 14 @ 8:00am
Task 4: Expected Deadline
Saturday, June 14 @ 11:59pm
Task 1: Final Deadline
Lecture 7: Data Structures 2 - Trees
Programming Task 5: Trees
Monday, June 16 @ 11:59pm
Task 2: Final Deadline
Tuesday
June 17
Binary Trees and Traversals - Slides

Binary Search Trees (BSTs) - Slides

Binary Tree Examples
No Lecture
Friday, June 20 @ 8:00am
Task 5: Expected Deadline
Thursday
June 19
No Lecture
Saturday, June 21 @ 11:59pm
Task 3: Final Deadline
Lecture 8: Midterm Exam, then Testing 3 - Testing and Files
Programming Task 6: Files
Monday, June 23 @ 11:59pm
Task 4: Final Deadline
Tuesday
June 24
Midterm Exam - First 1.5 hours of lecture
Tuesday
June 24
Files and Exceptions - Slides

Testing With Files
Lecture 9: Classes/OOP - Polymorphism
Programming Task 7: Polymorphism
Thursday, June 26 @ 8:00am
Task 6: Expected Deadline
Thursday
June 26
Polymorphism - Slides

Polymorphism - Slides

Polymorphism Example
Saturday, June 28 @ 8:00am
Task 7: Expected Deadline
Saturday, June 28 @ 11:59pm
Task 5: Final Deadline
Lecture 10: Data Structures 3 - Graphs
Programming Task 8: Graphs
Tuesday
July 1
Graphs - Slides

Graph with BFS - Slides

Graph Examples - Slides
Lecture 11: Final Exam
Thursday, July 3 @ 8:00am
Task 8: Expected Deadline
Thursday
July 3
Final Exam - The entire 2.5 hours of lecture
Saturday, July 5 @ 11:59pm
Task 6: Final Deadline
Monday, July 7 @ 11:59pm
Task 7: Final Deadline
Saturday, July 12 @ 11:59pm
Task 8: Final Deadline

Website GitHub Website GitHub