CSE116: Computer Science 2

Summer 2023

Watch lecture
Submit programming assignments
Code examples shown in lecture slides
Memory Diagram Reference
Ask questions and find office hours
Chat with other students


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
  • Classes and Object-Oriented Programming (OOP)
  • Data Structures & Algorithms

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


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

  • Invest a minimum of 24 hours/week* in CSE116. This includes 9 hours of lecture and at least 15 hours/week outside of lecture
  • Want to learn about computer science (This is assumed since you are taking a second CSE course)
  • Be comfortable with all of the material from CSE115

CSE115 Review

If you did not take CSE115 at UB, or would otherwise like to review the material, below are some CSE115 resources to help you get caught up:

Keep in mind that you must understand the concepts of CSE115 and be prepared to apply them to the syntax of a new language (Java). You will not be required to write Python or JavaScript in CSE116.

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 and test programs 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, trees, and graphs using memory diagrams
  • Write: Write and test programs that use linked-lists, trees, and graphs as well as implement new algorithms to expand the functionality of each data structure

You must demonstrate that you've completed all learning objectives to earn a passing grade in this class. To complete all learning objectives, you must complete a total of 6 memory diagram quizzes and 8 programming assignments.

Learning Objective Completion

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

  • Memory Diagram Quizzes x6
    • There will be 6 lab quiz requirements that must be completed throughout the semester. These quizzes are labeled on the course schedule as:
      1. Classes 1 - Classes
      2. Data Structures 1 - Linked-Lists
      3. Classes 2 - Inheritance
      4. Data Structures 2 - Trees
      5. Classes 3 - Polymorphism
      6. Data Structures 3 - Graphs
    • Quizzes will be completed in the first hour of 3 specified lectures and will assess you ability to trace through stack and heap memory during the execution of given code
    • These quizzes are graded on a pass/fail basis. If you pass the quiz, you have completed the learning objective for that quiz. All completion decisions will be made by a human after reviewing your submission. Each of these quizzes will cover 2 of the learning objectives and they will be graded independently
    • You must pass all 6 quizzes in order to pass the class. Any quiz that you did not pass, you will have a second chance to complete the quiz during the last lecture of the semester
    • If after both attempts, you have not completed all 6 quizzes, you will be given one last chance to complete upto 2 quizzes. These will be scheduled outside of lecture time.
  • Programming Tasks x8
    • There are 8 programming tasks assigned throughout the semester. You must complete all 8 tasks to pass the course.
    • Programming tasks will be introduced, and discussed, during the lecture where the material needed to complete the task is covered. Each task is expected to be completed by the morning 1 week following the introduction of the material. You should always aim to complete the task by this expected deadline. The actual deadline for each task is the day after the last day of classes. If you do not complete all tasks before this deadline, you will fail the class. Do your work early, stay up to date on the course, and you will not have to worry about this deadline.

Learning Objective Requirements Completed Grade
All 8 Programming Tasks and all 6 Quizzes Grade depends on the number of Application Objectives completed
Less Than All Programming Tasks and 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. Your final letter grade will be determined as follows:

Application Objectives Completed Grade
8-10 A
7 A-
6 B+
5 B
4 B-
3 C+
2 C
1 C-
0 or did not complete all Learning Objectives F

Application Objectives

You can improve your letter grade by showing that you can apply the learning objectives to solve real-world problems in a timely manner. The objectives are primarily designed to encourage you to keep up with the material in this very fast-paced course. You will have the following opportunities to complete application objectives.

  • Programming Task Expected Deadlines x6
    • Each of the 8 programming tasks have an expected deadline which is the time at which the course staff expects a student to complete the task. If this course used standard percentage-based grading, this would be the only deadline. Since the consequences are so harsh for missing a single task (To ensure that you learn all of the material) the actual deadlines have been extended to the day after the last day of class to give you ample time to study the material. However, to encourage you to still meet the expected deadlines, you can earn application objectives by completing tasks before these expected deadlines.
    • Each time you complete a programming task before the expected deadline, you will earn 1 application objective upto a max of 6 application objectives.
  • Quizzes x4
    • Since you must complete all 6 quizzes to pass the class, you will have 2 opportunities to complete each quiz. As an incentive to stay current with the material of the course, and not fall behind, you can earn application objectives by completing the quizzes on the first attempt.
    • Each time you complete a quiz on the first attempt, you will earn 1 application objective upto a max of 4 application objectives.
    • If you complete all 6 quizzes on the first attempt, there's no reason for you to attend the last day of class.


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:

UB Academic Integrity Policy:

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 courses 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. I 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 an AI to assist in writing your code.
  • Collaborating with another student to write code for an assignment. <-- This is the most common type of violation. DO NOT write code together!
  • 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.

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

Lecture 1: Introduction to Java
May 30
Course Introduction
Introduction to Java - Slides
Java Loops and Conditionals - Slides
Lecture 2: Testing 1 - Unit Testing
Lecture 3: Classes/OOP 1 - Classes
Programming Task 2
June 6
Classes and Objects - Slides
Classes and Objects - Slides
Testing Classes and Examples - Slides
Lecture 4: Data Structures 1 - Linked Lists
Programming Task 3
Thursday, June 8 @ 9:00 AM
Programming Task 1 Expected Deadline
June 8
Linked List Structure - Slides
Linked List Algorithms - Slides
Stack and Queue - Slides
Lecture 5: Testing 2 - Quiz 1 && Testing Strategies
Tuesday, June 13 @ 9:00 AM
Programming Task 2 Expected Deadline
Tuesday, June 13 @ 11:00 AM
Classes 1 && Data Structures 1 Quizzes
June 13
Testing with Structure
Testing Linked Lists and Trees
The Debugger
Lecture 6: Classes/OOP 2 - Inheritance
Thursday, June 15 @ 9:00 AM
Programming Task 3 Expected Deadline
June 15
Inheritance - Slides
Inheritance and Override - Slides
Sorting with Comparators - Slides
Lecture 7: Data Structures 2 - Trees
June 20
Binary Trees and Traversals - Slides
Binary Search Trees (BSTs) - Slides
Binary Tree Examples
Lecture 8: Testing 3 - Quiz 2 && Testing and Files
Thursday, June 22 @ 9:00 AM
Programming Task 4 Expected Deadline
Thursday, June 22 @ 11:00 AM
Classes 2 && Data Structures 2 Quizzes
June 22
Files and Exceptions - Slides
Testing With Files
Lecture 9: Classes/OOP - Polymorphism
Tuesday, June 27 @ 9:00 AM
Programming Task 5 Expected Deadline
June 27
Polymorphism - Slides
Abstract Classes and Interfaces - Slides
Polymorphism Example
Lecture 10: Data Structures 3 - Graphs
Thursday, June 29 @ 9:00 AM
Programming Task 6 Expected Deadline
June 29
Graphs - Slides
Graph with BFS - Slides
Graph Examples - Slides
Lecture 11: Quiz 3 && Testing Tips
Thursday, July 4 @ 9:00 AM
Programming Task 7 Expected Deadline
Tuesday, July 4 @ 11:00 AM
Classes 3 && Data Structures 3 Quizzes
July 4
Testing Tips and Debugging
Lecture 12: Second Chance Quizzes
Thursday, July 6 @ 9:00 AM
Programming Task 8 Expected Deadline
Tuesday, June 13 @ 11:00 AM
Classes 1/2/3 && Data Structures 1/2/3 Second Chance Quizzes
Friday, July 7 @ 11:59 PM
All Programming Task Actual Deadlines