CSE116: Computer Science 2

Fall 2024

Jump to current week
Autolab Submit programming assignments
Piazza Ask questions and find office hours
GitHub Example Code examples shown in lecture slides
Tracing Tool Memory Diagram Tracing Tool
Tracing Tool Demo Tracing Tool Demo Video
Memory Diagrams Memory Diagram Reference
YouTube Watch past lectures
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
  • 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.

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 weeks 1 or 2)

* 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 alone if you fall behind or if you have not mastered the basics of programming

Learning Objectives

Being successful in CSE116 requires completion of all of the learning objective requirements.

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
  • Explain/Interview: Describe the concepts of classes, inheritance, and polymorphism and explain how they can be used to help us write software
  • 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
  • Explain/Interview: Describe the structure and applications of linked-lists and trees
  • 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.

  • Read - Lab Quiz x2
    • There are 2 lab quiz requirements that must be completed throughout the semester. These quizzes are labeled on the course schedule as:
      1. Quiz 1 - Data Structures
      2. Quiz 2 - OOP
    • Quizzes will be completed during your lab section and will assess your ability to trace through stack and heap memory during the execution of given code.
    • There are 2 lab quizzes on the schedule for each quiz labelled as "1st chance" and "2nd chance". If you do not complete the quiz on the first chance, you can attempt the quiz again during the second chance quiz. If the course staff verifies that you've completed the learning objective on the 1st chance quiz, you do not have to take the quiz during the 2nd chance.
    • If you do not complete both quizzes after your first 2 attempts, you will be given a 3rd chance to complete each quiz during the final exam.
    • Each quiz contains 2 traces for you to complete.
    • Each trace is graded on a pass/fail basis. All completion decisions will be made by a human after reviewing your submission.
    • To complete a quiz learning objective, you must pass at least 2 traces for that quiz. This means you must successfully complete at least 2 data structures traces and 2 OOP traces across all your attempts (after 6 total attempts at traces for each quiz). Example: For OOP, you pass 1 of the 2 traces on the 1st chance, fail both on the 2nd chance, then pass 1 of 2 on the final exam, then you still pass the OOP quiz learning objective since you passed 2 of the 6 traces
  • Explain - Lab Interview x4
    • There are 4 lab interview requirements that must be completed throughout the semester. These interviews are labeled on the course schedule as:
      1. Interview 1 - Classes
      2. Interview 2 - Linked-Lists
      3. Interview 3 - Trees
      4. Interview 4 - Inheritance & Polymorphism
    • During lab interviews you will have a 10-minute interview with a TA. The TA may ask any questions they deem appropriate in order to assess that you can explain the relevant concept. The TA will submit a summary of your answers that will be reviewed by the course staff.
    • The interviews are graded on a pass/fail basis. After human review of your answers, it will be decided whether or not you completed the explain portion of the learning objective through your interview performance. If you complete the interview during the 1st chance lab, you do not have to interview again during the 2nd chance lab.
    • Your interviewing TA does not make decisions for learning objective completion. Do not pressure your TA into marking you for completion. Likewise, your TA cannot tell you during the interview whether or not you passed since they will not know. The course staff will weigh all evidence while reviewing the reports from all TAs and efforts will be made to neutralize the variance between TAs (i.e. Your completion of learning objectives should not be affected by which TA you were assigned for an interview).
    • If you do not complete all 4 interview after your first 2 attempts, you will be given a 3rd chance to complete each interview during the final exam. The final exam interviews will be interview-style questions, but it will be a written exam where you'll write your answers to the questions
  • 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.

Final Exam: The final exam is used as a 3rd chance to complete the quizzes and interviews. If you already completed both quizzes and all 4 interviews after the first 2 attempts for each, you do not need to attend the final exam.


Learning Objective Requirements Completed Grade
All 8 Programming Tasks, both Quizzes, and all 4 Interviews Grade depends on the number of Application Objectives completed
Less than all Programming Tasks, both Quizzes, and all Interviews 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
30-33 A
27-29 A-
24-26 B+
21-23 B
18-20 B-
15-17 C+
12-14 C
9-11 C-
5-8 D+
0-4 D


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 x16
    • Each of the 8 programming tasks have 3 separate deadlines. Completing all tasks before the earliest deadline will earn you a total of 16 application objectives. These deadlines are:
    • Expected Deadline: The expected deadline is set on the Friday night after the week when the material for the task was covered in lecture. 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 2 application objectives
    • Late Deadline: This deadline is 1 week after expected deadline. Complete a task before this deadline to earn 1 application objective. This allows you a second chance to still earn an application objective even if you are failing behind in the course. If you are consistently relying on the late deadlines, you are at risk of failing the course and must work hard to catch back up
    • Final Deadline: The final deadline is 1 week after the late deadline. You must complete all 8 tasks before their final deadline or you will fail the course. This means that if you miss any of the 8 final deadlines, you will fail the course regardless of your performance throughout the rest of the course. This deadline is set a full 3 weeks after the content for the task has been covered in lecture. Students who fall more than 3 weeks behind in CSE116 are not able to catch back up and pass the course. 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
  • Application Objective Task x2
    • There is an additional programming tasks called the "Application Objective Task" that is not related to your learning objectives and therefore does not need to be completed to pass the class. This task offers the opportunity to earn 2 additional application objectives
    • There's only 1 deadline for the application objective task. Each task is divided into 2 parts that are each worth 1 application objective so you can still earn 1 application objective even if you don't complete the entire task by the deadline
  • Quizzes x4
    • Each quiz opportunity contains 2 traces (For a total of 6 traces for each quiz - Data Structures and OOP). On either of your first 2 opportunities, if you successfully complete both traces you will earn 2 application objective.
    • No application objectives are available on final exam
  • Interview x8
    • If you complete an interview during the 1st chance lab, you will earn 2 application objectives
    • If you complete an interview during the 2nd chance lab [and did not complete it on the first chance], you will earn 1 application objective
    • If you need to take an interview a 3rd time during the final exam, you cannot earn any application objectives for that interview
  • Lecture Questions x3
    • 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 or travel) and no additional drops will be given for any reason (ie. If you have to miss more than 2 full weeks of lecture, you have bigger problems to worry about than your lecture question points).
    • If, after the 6 drops, you answer all lecture questions correctly, you will earn 3 application objectives
    • If, after the 6 drops, you missed (either not submitted or submitted with an incorrect answer) between 1 and 4 lecture questions, you will earn 2 application objectives
    • If, after the 6 drops, you missed (either not submitted or submitted with an incorrect answer) between 5 and 9 lecture questions, you will earn 1 application objective
    • If, after the 6 drops, you missed (either not submitted or submitted with an incorrect answer) more than 9 lecture questions, you will not earn any application objectives from lecture questions
Lab Absence Policy:
  • For up to 1 interview, you can earn the full 2 application objectives on your second attempt if you missed the 1st attempt. This will be done automatically. This allows for an excused absence without penalty and without having to provide documentation. If you are sick for a week, make your own judgement to stay home and use this policy, and the dropped lecture questions, to still have a chance to earn every application objective in the course.
  • Note that this policy does not apply to quizzes since the 1st and 2nd attempts are already treated the same
  • You will not be given a 4th chance to any interview or quiz after missing a lab even with a legitimate reason for your absense. The course is designed to give every student 2 chances to allow for a wide variety of situations including illnesses. The expectation is that every student will only need 1 attempt for any quiz or interview and the 2nd chance - with an opportunity to earn application objectives - is only given to allow for extraneous circumstances
  • If you have legitimate reasons for missing both the 1st and 2nd attempts for an interview/quiz, you can be given an extra attempt that may be scheduled outside of lab. To earn such an attempt, you must provide documentation that proves that you had to miss both weeks of lab (eg. a doctors note excusing you from classes with dates that cover both labs). If you legitimately had to miss 2 weeks of lab, you should have such documentation in your possession. Excuses without documentation will not be entertained (eg. You can't simply claim that you were sick for that long)

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://catalog.buffalo.edu/policies/integrity.html

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. 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:

  • 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. <-- This is the most common type of violation. DO NOT write code together!
  • 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.

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


Week 1: Introduction to Java
Lab: No Lab
Monday
August 26
Course Introduction
Wednesday
August 28
Introduction to Java - Slides
Friday
August 30
Java Loops and Conditionals - Slides
Week 2: Introduction to Java
Lab: No Lab
Monday
September 2
No Lecture
Wednesday
September 4
Java Data Structures - Slides
Friday
September 6
Java Examples + IntelliJ and GitHub Demo
Week 3: Testing 1 - Unit Testing
Programming Task 1: Unit Testing
Lab: Practice Quiz + IntelliJ Setup
Monday
September 9
Unit Testing - Slides
Wednesday
September 11
Testing Strings/doubles - Slides
Friday
September 13
Testing and Recursion - Slides
Week 4: Classes/OOP 1 - Classes
Programming Task 2: Classes
Lab: Practice Interview
Monday
September 16
Classes and Objects - Slides
Wednesday
September 18
Classes and Objects - Slides
Friday
September 20
Testing Classes and Examples - Slides
Friday, September 20 @ 11:59pm
Task 1: Expected Deadline
Week 5: Data Structures 1 - Linked Lists
Programming Task 3: Linked Lists
Lab: 1st Chance - Interview 1 (Classes)
Monday
September 23
Linked List Structure - Slides
Wednesday
September 25
Linked List Algorithms - Slides
Friday
September 27
Stack and Queue - Slides
Friday, September 27 @ 11:59pm
Task 2: Expected Deadline
Friday, September 27 @ 11:59pm
Task 1: Late Deadline
Week 6: Testing 2 - Testing Strategies
Lab: 1st Chance - Interview 2 (Linked List) && Debugging Activity
Monday
September 30
Testing Tips
Wednesday
October 2
Testing Data Structures
Friday
October 4
Debugger and Testing
Friday, October 4 @ 11:59pm
Task 3: Expected Deadline
Friday, October 4 @ 11:59pm
Task 2: Late Deadline
Friday, October 4 @ 11:59pm
Task 1: Final Deadline
Week 7: Classes/OOP 2 - Inheritance
Programming Task 4: Inheritance
Lab: 2nd Chance - Interview 1 && Debugger Activity
Monday
October 7
Inheritance - Slides
Wednesday
October 9
Inheritance and Override - Slides
Friday
October 11
Sorting with Comparators - Slides
Friday, October 11 @ 11:59pm
Task 3: Late Deadline
Friday, October 11 @ 11:59pm
Task 2: Final Deadline
Week 8: Fall Break 1
Lab: No Lab
Monday
October 14
No Lecture - Fall Break 1
Wednesday
October 16
Catch Up Day
Friday
October 18
Catch Up Day
Week 9: Data Structures 2 - Trees
Programming Task 5: Trees
Lab: 2nd Chance - Interview 2
Monday
October 21
Binary Trees and Traversals - Slides
Wednesday
October 23
Binary Search Trees (BSTs) - Slides
Friday
October 25
Binary Tree Examples
Friday, October 25 @ 11:59pm
Task 4: Expected Deadline
Friday, October 25 @ 11:59pm
Task 3: Final Deadline
Week 10: Testing 3 - Testing and Files
Programming Task 6: Files
Lab: 1st Chance - Interview 3 (Trees)
Monday
October 28
Files and Exceptions - Slides
Wednesday
October 30
Testing With Files
Friday
November 1
Debugger Tips
Friday, November 1 @ 11:59pm
Task 5: Expected Deadline
Friday, November 1 @ 11:59pm
Task 4: Late Deadline
Week 11: Classes/OOP - Polymorphism
Programming Task 7: Polymorphism
Lab: 1st Chance - Quiz 1 (Data Structures)
Monday
November 4
Polymorphism - Slides
Wednesday
November 6
Polymorphism - Slides
Friday
November 8
Polymorphism Example
Friday, November 8 @ 11:59pm
Task 6: Expected Deadline
Friday, November 8 @ 11:59pm
Task 5: Late Deadline
Friday, November 8 @ 11:59pm
Task 4: Final Deadline
Week 12: Data Structures 3 - Graphs
Programming Task 8: Graphs
Lab: 1st Chance - Interview 4 (Inheritance & Polymorphism) & Quiz 2 (OOP)
Monday
November 11
Graphs - Slides
Wednesday
November 13
Graph with BFS - Slides
Friday
November 15
Graph Examples - Slides
Friday, November 15 @ 11:59pm
Task 7: Expected Deadline
Friday, November 15 @ 11:59pm
Task 6: Late Deadline
Friday, November 15 @ 11:59pm
Task 5: Final Deadline
Week 13: AO1 - The State Pattern
Application Objective Task
Lab: 2nd Chance - Interview 3 & Quiz 1
Monday
November 18
The State Pattern - Slides
Wednesday
November 20
The State Pattern - Slides
Friday
November 22
The State Pattern - Slides
Friday, November 22 @ 11:59pm
Task 8: Expected Deadline
Friday, November 22 @ 11:59pm
Task 7: Late Deadline
Friday, November 22 @ 11:59pm
Task 6: Final Deadline
Week 14: Fall Break 2
Lab: No Lab
Monday
November 25
Catch Up Day
Wednesday
November 27
No Lecture - Fall Break 2
Friday
November 29
No Lecture - Fall Break 2
Week 15: Review
Lab: 2nd Chance - Interview 4 & Quiz 2
Monday
December 2
Review
Wednesday
December 4
Review
Friday
December 6
Review
Friday, December 6 @ 11:59pm
Task 8: Late Deadline
Friday, December 6 @ 11:59pm
Task 7: Final Deadline
Friday, December 6 @ 11:59pm
Application Objective Task: Final Deadline
Week 16: Review
Lab: No Lab
Monday
December 9
Catch Up Day
Friday, December 13 @ 11:59pm
Task 8: Final Deadline
Week 17: Final Exam
Lab: No Lab
Monday
December 16
Final Exam @ 11:45 - 2:45 PM

Website GitHub Website GitHub