CSE116: Computer Science 2

Fall 2023


Submit programming assignments
Code examples shown in lecture slides
Memory Diagram Reference
Watch past lectures
Ask questions and find office hours
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)
  • Understand the basics of programming
  • Participate in every lecture and lab (There will NOT be a 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 should expect to spend 40+ hours in a single week on this course alone if you fall behind or if you're not comfortable with the CSE115 material.

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 in CSE116.

Specifically, you are expected to understand the concepts of variables, expressions, functions, conditionals, loops, and reading CSV files.

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
  • 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 x3
    • There are 3 lab quiz requirements that must be completed throughout the semester. These quizzes are labeled on the course schedule as:
      1. Quiz 1 - Java Basics and Classes
      2. Quiz 2 - Linked-Lists and Trees
      3. Quiz 3 - Inheritance and Polymorphism
    • Quizzes will be completed during your lab section 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 portion of that quiz. All completion decisions will be made by a human after reviewing your submission.
    • There are 2 lab quizzes on the schedule for each quiz labelled as "first chance" and "second 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 first quiz, you do not have to take the quiz during the second chance lab.
    • If you do not complete all three quizzes after your first 2 attempts, you will be given a 3rd chance to complete each quiz during the final exam
  • Explain - Lab Interview x3
    • There will be 3 lab interview requirements that must be completed throughout the semester. These interviews are labeled on the course schedule as:
      1. Interview 1 - Java Basics and Classes
      2. Interview 2 - Linked-Lists and Trees
      3. Interview 3 - Inheritance and Polymorphism
    • During interview labs, 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.
    • As with the lab quizzes, 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 first chance lab, you do not have to interview again during the second 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 three 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 tasks.

Final Exam: The final exam is used as a 3rd chance to complete the quizzes and interviews. If you already completed all 3 quizzes and 3 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, 3 Quizzes, and 3 Interviews Grade depends on the number of Application Objectives completed
Less Than All Programming Tasks, Quizzes, and 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. Your final letter grade will be determined as follows:

Application Objectives Completed Grade
30-34 A
26-29 A-
22-25 B+
18-21 B
14-17 B-
10-13 C+
7-9 C
4-6 C-
0-3 or did not complete all Learning Objectives 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 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 morning 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 set to the Wednesday morning following the expected deadline. Complete a task before this deadline to ear 1 application objective. This allows you a second chance to still earn an application objective even if you miss the expected deadline
    • Final Deadline: The final deadline is the night of the last of classes. You must complete all 8 tasks before this deadline or you will fail the course. Meeting this deadline will not result in any application objectives
  • Application Objective Task x2
    • There is a 9th programming task 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
  • Quizzes x6
    • There are 3 quizzes that you must complete in order to pass the class with 3 opportunities to complete each one. These quizzes are graded on a pass/fail basis and you can earn application objectives based on how many attempts you needed to use in order to pass each quiz
    • If you complete a quiz during the first chance lab, you'll earn 2 application objectives
    • If you complete a quiz during the second chance lab [and did not complete it on the first chance], you'll earn 1 application objective
    • If you need to take a quiz a 3rd time during the final exam, you cannot earn any application objectives for that quiz
  • Interview x6
    • The interviews follow the same structure as the quizzes:
    • If you complete an interview during the first chance lab, you'll earn 2 application objectives
    • If you complete an interview during the second chance lab [and did not complete it on the first chance], you'll 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 x4
    • Most lectures will include multiple choice questions to be answered 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.
    • If you answer >=80% of the total available lecture question correctly, you will earn 4 application objective.
    • If you answer >=70% of the total available lecture question correctly, you will earn 3 application objective.
    • If you answer >=60% of the total available lecture question correctly, you will earn 2 application objective.
    • If you answer >=50% of the total available lecture question correctly, you will earn 1 application objectives.

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

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

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


Week 1: Introduction to Java
Lab: No Lab
Monday
August 28
Course Introduction
Wednesday
August 30
Introduction to Java - Slides
Friday
September 1
Java Loops and Conditionals - Slides
Week 2: Introduction to Java
Lab: IntelliJ Setup
Monday
September 4
No Class
Wednesday
September 6
Java Data Structures - Slides
Friday
September 8
Java Examples
Week 3: Testing 1 - Unit Testing
Programming Task 1: Unit Testing
Lab: Memory Diagram Practice
Monday
September 11
Unit Testing - Slides
Wednesday
September 13
Testing Strings/doubles and The Debugger - Slides
Friday
September 15
Testing and Recursion - Slides
Week 4: Classes/OOP 1 - Classes
Programming Task 2: Classes
Lab: Quiz Prep
Monday
September 18
Classes and Objects - Slides
Wednesday
September 20
Classes and Objects - Slides
Friday, September 22 @ 9:00 AM
Programming Task 1: Expected Deadline
Friday
September 22
Testing Classes and Examples - Slides
Week 5: Data Structures 1 - Linked Lists
Programming Task 3: Linked Lists
Lab: Quiz 1 - Java Basics and Classes (First Chance)
Monday
September 25
Linked List Structure - Slides
Wednesday, September 27 @ 9:00 AM
Programming Task 1: Late Deadline
Wednesday
September 27
Linked List Algorithms - Slides
Friday, September 29 @ 9:00 AM
Programming Task 2: Expected Deadline
Friday
September 29
Stack and Queue - Slides
Week 6: Classes/OOP 2 - Inheritance
Programming Task 4: Inheritance
Lab: Interview 1 - Java Basics and Classes (First Chance)
Monday
October 2
Inheritance - Slides
Wednesday, October 4 @ 9:00 AM
Programming Task 2: Late Deadline
Wednesday
October 4
Inheritance and Override - Slides
Friday, October 6 @ 9:00 AM
Programming Task 3: Expected Deadline
Friday
October 6
Sorting with Comparators - Slides
Week 7: Fall Break
No Lab
Monday
October 9
No Class
Wednesday
October 11
No Class
Friday
October 13
No Class
Week 8: Data Structures 2 - Trees
Programming Task 5: Trees
Lab: Quiz 1 and Interview 1 (Second Chance)
Monday
October 16
Binary Trees and Traversals - Slides
Wednesday, October 18 @ 9:00 AM
Programming Task 3: Late Deadline
Wednesday
October 18
Binary Search Trees (BSTs) - Slides
Friday, October 20 @ 9:00 AM
Programming Task 4: Expected Deadline
Friday
October 20
Binary Tree Examples
Week 9: Testing 2 - Testing Strategies
Lab: Quiz 2 - Linked-Lists and Trees (First Chance)
Monday
October 23
Testing Tips
Wednesday, October 25 @ 9:00 AM
Programming Task 4: Late Deadline
Wednesday
October 25
Testing Data Structures
Friday, October 27 @ 9:00 AM
Programming Task 5: Expected Deadline
Friday
October 27
Debugger and Testing
Week 10: Testing 3 - Testing and Files
Programming Task 6: Reading Files
Lab: Interview 2 - Linked-Lists and Trees (First Chance)
Monday
October 30
Files and Exceptions - Slides
Wednesday, November 1 @ 9:00 AM
Programming Task 5: Late Deadline
Wednesday
November 1
Testing With Files
Friday
November 3
Debugger 2
Week 11: Classes/OOP - Polymorphism
Programming Task 7: Polymorphism
Lab: Quiz 2 and Interview 2 (Second Chance)
Monday
November 6
Polymorphism - Slides
Wednesday
November 8
Polymorphism - Slides
Friday, November 10 @ 9:00 AM
Programming Task 6: Expected Deadline
Friday
November 10
Polymorphism Example
Week 12: Data Structures 3 - Graphs
Programming Task 8: Graphs
Lab: Quiz 3 - Inheritance and Polymorphism (First Chance)
Monday
November 13
Graphs - Slides
Wednesday, November 15 @ 9:00 AM
Programming Task 6: Late Deadline
Wednesday
November 15
Graph with BFS - Slides
Friday, November 17 @ 9:00 AM
Programming Task 7: Expected Deadline
Friday
November 17
Graph Examples - Slides
Week 13: Fall Break 2
Monday
November 20
No Class
Wednesday
November 22
No Class
Friday
November 24
No Class
Week 14: Classes/OOP - The State Pattern
Application Objective Task: The State Pattern
Lab: Interview 3 - Inheritance and Polymorphism (First Chance)
Monday
November 27
State Pattern - Slides
Wednesday, November 29 @ 9:00 AM
Programming Task 7: Late Deadline
Wednesday
November 29
State Pattern - Slides
Friday, December 1 @ 9:00 AM
Programming Task 8: Expected Deadline
Friday
December 1
State Pattern - Slides

Week 15: Review
Lab: Quiz 3 and Interview 3 (Second Chance)
Monday
December 4
Review
Wednesday, December 6 @ 9:00 AM
Programming Task 8: Late Deadline
Wednesday
December 6
git / GitHub
Friday
December 8
Review
Week 16: Final
Lab: No Lab
Monday
December 11
No Class - Prepare for Exams
Monday, December 11 @ 11:59 PM
All Programming Tasks: Final Deadline
Monday, December 11 @ 11:59 PM
Application Objective Task: Deadline
Friday
December 15
Final Exam @ 11:45AM - 2:45PM [Norton 190]