CSE116: Computer Science 2

Spring 2025

Jump to current week

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/week* in CSE116 including at least 7 hours/week outside of class/lab
  • Want to learn about computer science (This is assumed since you are taking a second CSE course)
  • Have a strong understanding of the basics of programming (Including expressions, variables, functions, conditionals, loops, arrays, key-value stores, and memory traces)
  • Participate in every lecture and lab (There is NO lab during week 1)

* The 12 hour/week minimum is an average. If you invest less than 12 hours/week in CSE116 during the first several weeks of the semester, or do not fully understand all the CSE115 topics, you should expect to work significantly more than 12 hours/week while you catch up. You can expect to spend 40+ hours in a single week on this course if you fall behind or if you have not mastered the basics of programming

Learning Objectives

Being successful in CSE116 requires completion of all the learning objective requirements. There are 15 Learning objectives divided into 4 categories:


Read Code / Lab Tracing Quizzes

There are 3 Tracing Quizzes that will take place in lab that will assess your completion of learning objectives. For each quiz you will be provided with the code for a program, and you are to trace through the stack and heap memory usage throughout its execution.

These quizzes are completed in an exam environment. Accessing anything other than the quiz material in UBPower (The tracing tool) is an academic integrity violation.

  1. Tracing Quiz 1 - Classes: Trace the memory usage of programs that use classes to create objects that are stored using references
  2. Tracing Quiz 2 - Data Structures: Trace the memory usage of programs that use Linked-Lists and Trees
  3. Tracing Quiz 3 - Object-Oriented Programming (OOP): Trace the memory usage of programs that use inheritance and polymorphism

Explain Concepts / Lab Interviews

There are 3 Interviews that will take place in lab that will assess your completion of learning objectives. Interviews are limited to 10 minutes where a TA will ask you a variety of questions related to the concept being assessed. To pass an interview, you must demonstrate that you can competent explain these concepts on a technical level. Simple regurgitating memorized definitions will not earn credit on these interviews. You should be able to have a conversation with another human about the concepts which is what the interviews simulate

Your interviewing TA does not make decisions for learning objective completion. Your interviewing TA will record your answers during the interview which will be reviewed by a separate grading team. Do not pressure your interviewing TA into marking you for completion

  1. Interview 1 - Classes: Explain the concepts of classes, objects, references, heap memory, and how they affect the programs we write
  2. Interview 2 - Data Structures: Describe the structures of linked-lists, binary trees, stacks, queues, binary search trees, and algorithms to work with their data
  3. Interview 3 - Object-Oriented Programming (OOP): Explain the concepts of inheritance and polymorphism and how they can help us as we write large pieces of software

Write Code / Lab Coding Quizzes

There are 3 Coding Quizzes that will take place in lab that will assess your completion of learning objectives. For these quizzes you will be given a small programming task, and you will write code to complete the task in a timed environment without access to any outside material. You will use IntelliJ to write your code and will have unlimited submission to AutoLab within the lab time.

These quizzes are completed in an exam environment. Accessing anything other than the quiz material in IntelliJ or AutoLab is an academic integrity violation.

  1. Coding Quiz 1 - Classes: Write programs that includes classes, creates objects, modifies objects on the heap, and passes objects by reference
  2. Coding Quiz 2 - Data Structures: Write programs that use linked-lists and binary trees
  3. Coding Quiz 3 - Object-Oriented Programming (OOP): Write programs that use inheritance and polymorphism

Write Large Programs / Take Home Coding Tasks

There are 6 Coding Tasks that you'll complete outside of class time that will assess your completion of learning objectives. These tasks are where students spend most of their time working on CSE116. Through these tasks, you will gain hands-on experience applying the concepts of the course to a large project. All 6 coding tasks build on each other as you work on a project throughout the semester

  1. Coding Task 1 - Classes: Implement and use classes in a large program
  2. Coding Task 2 - Linked-Lists: Use linked-lists in a large program
  3. Coding Task 3 - Inheritance: Apply inheritance to new classes in a large program
  4. Coding Task 4 - Trees: Use trees in a large program
  5. Coding Task 5 - Polymorphism: Apply polymorphism to add new features in a large program
  6. Coding Task 6 - Graphs: Use graphs in a large program

Logistics

All 9 of the lab learning objectives are listed on the course schedule. All of these assessments are graded on a pass/fail basis (You've either completed the learning objective or you have not). Ideally, you will complete every objective during these labs. If you don't complete an objective this lab, you will have the following opportunities to prove that you have completed the objective:

  • All 6 Coding Tasks need to completed before their corresponding final deadline
  • All 9 of these assessments have a "2nd attempt" lab on the schedule. Each of these labs provide a 2nd chance to complete the specified tracing quiz, interview, and coding quiz. You may attempt all 3 assessments during these labs if needed, though you still must finish within the lab time. If you've completed all 3 assessments on your first attempt, there is no need to attend this lab
  • For any of these 9 learning objectives that you do not complete after the 1st and 2nd attempts, you will have a 3rd attempt to prove that you've completed the learning objective on the final exam. The 3rd attempt for these 9 lab learning objectives is the only purpose of the final exam. If you complete all 9 of these objectives on your first 2 attempts, you do not need to attend the final exam
  • Please note that this course follows a master-based structure where you must complete all learning objectives to avoid having gaps in your knowledge that can make future courses nearly impossible to complete. Three attempts are only offered due to this mastery-based approach to make sure you have ample chances to prove that you've filled in these gaps. Please do not use the existence of 3 chance to blow off the first 2. Many students have failed this course by relying on the extra chances to skip labs or show up unprepared. Please do not do this. We like all our students, but we do not want to see you in CSE116 next semester.

Learning Objective Requirements Completed Grade
All 3 Tracing Quizzes, all 3 Interviews, all 3 Coding Quizzes, and all 6 Coding Tasks (15 Learning Objective complete) Grade depends on the number of Effort Points earned
Less than all Tracing Quizzes, all Interviews, all Coding Quizzes, and all Coding Tasks (0-14 Learning Objective complete) F

Effort Points

If you have completed every learning objectives, your grade will be determined by the number of effort points you've earned. These points are designed to incentivize you to keep up with the material of the course and participate in every lecture and lab. Effort points are not meant to be overly difficult to earn. Your final letter grade will be determined as follows:

Effort Points Earned Grade
24-26 A
23 A-
22 B+
21 B
20 B-
18-19 C+
16-17 C
14-15 C-
10-13 D
0-9 F


Earning Effort Points

Falling even 1 week behind in this course will significantly increase your chances of failing. Effort points offer you incentives to stay up-to-date on the material by giving you chances to improve your letter grade by showing us that you have successful study habits (eg. You show up to every lecture and lab, you start working on assignments early, and you study for your 1st attempt on every lab assessment).

  • Practice Learning Objective Assessments (The 0 assessments) x4
    • For each of the 4 Learning Objective categories (Tracing quizzes, interviews, coding quizzes, coding tasks), there is an assessment labeled 0 (eg. Coding task 0). These assessments are not associated with any learning objectives (Not required to pass the course) and are meant to give you practice for the learning objective assessments. For each 0 assessment you successfully complete, you will earn 1 effort point
    • You only have one chance to earn each of these effort points. Since they are not required to pass the course, there is no need to offer multiple opportunities to complete them
  • Coding Task Expected Deadlines x6
    • Each of the 6 coding tasks have 2 deadlines, the expected deadline and the final deadline. As the name implies, you are expected to complete every task before its expected deadline. With a traditional course grading structure, this would be the only deadline. Since this courses follows a mastery-based structure (You are required to complete every learning objective), there is a second deadline that effectively gives you a 2-week extension so you still have a chance to pass the class even if you have to miss an expected deadline.
    • Each time you complete a task before its expected deadline, you will earn 1 effort point
  • Lab Learning Objective Assessments x9
    • You have 3 attempts to complete each of the 9 lab learning objectives (Tracing quiz 1-3, interview 1-3, and coding quiz 1-3). Each time you complete one of these learning objectives during a first attempt lab (without needing the 2nd attempt or final exam), you will earn 1 effort point
    • Lab absence policy: For each of the 3 category (Tracing quiz, interview, coding quiz), you may earn up to 1 effort point during a 2nd chance lab. This will be done automatically and will apply whether you attempted to assessment and did not pass on the first attempt, or if you did not even attend the first attempt lab. With this policy, if you have to miss an assessment lab, there's no need to provide a doctors or any other documentation. Stay home, stay safe, don't miss your siblings wedding. Whatever it is, you can miss any 1 lab with no repercussion and no questions asked. If you have to miss multiple labs, you will need to provide official documentation for all labs that you missed if you expect an exception
  • Lab Activities x5
    • There are 6 lab activities on the lab schedule. Participating in a lab activity will earn you 1 effort point. One activity will be dropped (As part of the absence policy) for a maximum of 5 effort points from activities. These are meant to be easy points to earn as long as you attend lab, were on time, and actively participated throughout the activity.
  • Lecture Questions x2
    • Most lectures will include questions or activities to be completed during live lectures. These will be simple questions designed to encourage you to attend lecture and stay up to date on the material. Since lectures will be recorded, there is a temptation to watch lecture days, or even weeks, after they occur. These questions are to serve as an incentive for you to attend lecture and avoid falling behind in the course.
    • We will drop a total of 6 (2 weeks worth) lecture questions that were either not submitted or submitted with an incorrect answer. You can use these 6 drops for any reason (Including illness, travel, forgetting to submit you answer, or pressing the wrong button). If you have to miss more than 2 full weeks of lecture and expect to be able to makeup more than 6 lecture questions, you must provide official documentation stating that you were unable to attend lecture for more than 2 weeks. Please note that a plane ticket is not official documentation.
    • If, after the 6 drops, you answer all lecture questions correctly, you will earn 2 effort points
    • If, after the 6 drops, you missed (either not submitted or submitted with an incorrect answer) between 1 and 3 lecture questions, you will earn 1 effort point
    • If, after the 6 drops, you missed (either not submitted or submitted with an incorrect answer) more than 3 lecture questions (Missed >9 total), you will not earn any effort points from lecture questions

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:

  • Pressuring a TA to falsify an interview report.
  • Submitting code, or other work, for course credit that is not your own.
  • 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)
  • Using Artificial Intelligence to help you write code
  • 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).
  • Submitting lecture questions without attending the entire lecture in person.

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.


Week 1: Introduction to Java
Coding Task 0: Java Basics
Lab: No Lab
Wednesday
January 22
Course Introduction
Friday
January 24
Introduction to Java - Slides
Week 2: Introduction to Java
Lab: Activity - git
Monday
January 27
Java Loops and Conditionals - Slides
Wednesday
January 29
Java Data Structures - Slides
Friday
January 31
Java Examples + IntelliJ and GitHub Demo
Week 3: Testing 1 - Unit Testing
Lab: Activity - Java
Monday
February 3
Unit Testing - Slides
Wednesday
February 5
Testing Strings/doubles - Slides
Friday
February 7
Testing and Recursion - Slides
Friday, February 7 @ 11:59pm
Task 0: Deadline
Week 4: Classes/OOP 1 - Classes
Coding Task 1: Classes
Lab: Interview 0 and Tracing Quiz 0 - Java Basics
Monday
February 10
Classes and Objects - Slides
Wednesday
February 12
Classes and Objects - Slides
Friday
February 14
Testing Classes and Examples - Slides
Week 5: Data Structures 1 - Linked Lists
Coding Task 2: Linked Lists
Lab: Activity and Coding Quiz 0 - Java Basics
Monday
February 17
Linked List Structure - Slides
Wednesday
February 19
Linked List Algorithms - Slides
Friday
February 21
Stack and Queue - Slides
Friday, February 21 @ 11:59pm
Task 1: Expected Deadline
Week 6: Testing 2 - Testing Strategies
Lab: Interview 1 and Tracing Quiz 1 - Classes
Monday
February 24
Testing Tips
Wednesday
February 26
Testing Data Structures
Friday
February 28
Debugger and Testing
Friday, February 28 @ 11:59pm
Task 2: Expected Deadline
Week 7: Classes/OOP 2 - Inheritance
Coding Task 3: Inheritance
Lab: Activity and Coding Quiz 1 - Classes
Monday
March 3
Inheritance - Slides
Wednesday
March 5
Inheritance and Override - Slides
Friday
March 7
Sorting with Comparators - Slides
Friday, March 7 @ 11:59pm
Task 1: Final Deadline
Week 8: Data Structures 2 - Trees
Coding Task 4: Trees
Lab: 2nd Attempt for Interview 1, Tracing Quiz 1, and Coding Quiz 1
Monday
March 10
Binary Trees and Traversals - Slides
Wednesday
March 12
Binary Search Trees (BSTs) - Slides
Friday
March 14
Binary Tree Examples
Friday, March 14 @ 11:59pm
Task 3: Expected Deadline
Friday, March 14 @ 11:59pm
Task 2: Final Deadline
Week 9: Spring Break
Lab: No Lab
Monday
March 17
No Lecture - Spring Break
Wednesday
March 19
No Lecture - Spring Break
Friday
March 21
No Lecture - Spring Break
Week 10: Testing 3 - Testing and Files
Lab: Interview 2 and Tracing Quiz 2 - Data Structures (LL and Trees)
Monday
March 24
Files and Exceptions - Slides
Wednesday
March 26
Testing With Files
Friday
March 28
Debugger Tips
Friday, March 28 @ 11:59pm
Task 4: Expected Deadline
Week 11: Classes/OOP - Polymorphism
Coding Task 5: Polymorphism
Lab: Activity and Coding Quiz 2 - Data Structures (LL and Trees)
Monday
March 31
Polymorphism - Slides
Wednesday
April 2
Polymorphism - Slides
Friday
April 4
Polymorphism Example
Friday, April 4 @ 11:59pm
Task 3: Final Deadline
Week 12: Data Structures 3 - Graphs
Coding Task 6: Graphs
Lab: 2nd Attempt for Interview 2, Tracing Quiz 2, and Coding Quiz 2
Monday
April 7
Graphs - Slides
Wednesday
April 9
Graph with BFS - Slides
Friday
April 11
Graph Examples - Slides
Friday, April 11 @ 11:59pm
Task 5: Expected Deadline
Friday, April 11 @ 11:59pm
Task 4: Final Deadline
Week 13: AO1 - The State Pattern
Lab: Interview 3 and Tracing Quiz 3 - OOP (Inheritance and Polymorphism)
Monday
April 14
The State Pattern - Slides
Wednesday
April 16
The State Pattern - Slides
Friday
April 18
The State Pattern - Slides
Friday, April 18 @ 11:59pm
Task 6: Expected Deadline
Week 14: Review
Lab: Activity and Coding Quiz 3 - OOP (Inheritance and Polymorphism)
Monday
April 21
Review
Wednesday
April 23
Review
Friday
April 25
Review
Friday, April 25 @ 11:59pm
Task 5: Final Deadline
Week 15: Review
Lab: 2nd Attempt for Interview 3, Tracing Quiz 3, and Coding Quiz 3
Monday
April 28
Review
Wednesday
April 30
Review
Friday
May 2
Review
Friday, May 2 @ 11:59pm
Task 6: Final Deadline
Week 16: Final Exam
Lab: No Lab
Monday
May 5
Make up day
Monday
May 12
Final Exam @ 7:15 - 10:15 PM

Website GitHub Website GitHub