CSE116: Computer Science 2

Fall 2022


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:

  • Program Execution
  • Object-Oriented Programming
  • 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)
  • Be comfortable with the material from CSE115
  • Participate in every lecture and lab (There will NOT be a lab during week 1)
  • Have access to a computer with a reliable Internet connection

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

If it is clear that you are working on this course for at least 12 hours/week, we will do whatever we can to ensure that you are successful in this course.

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 (Scala). You will not be required to write Python or JavaScript in CSE116.

Learning Objectives

In CSE116 you will learn concepts related to the following 3 learning objectives. Being successful in CSE116 requires completion of all 3 of these objectives. Each objective is divided into 3 parts:

  • Read - Given a program related to the learning objective, trace through its execution and show what is stored in memory at every step. This will be assessed through quizzes during the learning objective verification labs. Every quiz will involve tracing through a memory diagram of several programs.
  • Explain - Communicate verbally about the concepts of the learning objective. You must demonstrate an understanding of these concepts, as well as comprehensive knowledge of the related terminology. This will be assessed through interviews during the learning objective verification labs
  • Write - Given a real-world problem statement, write a program that solves the problem. This will be assessed through the coding projects throughout the course. Each project will contain 3 tasks, all of which much be completed on time to complete the write portion of a learning objective.

Learning Objective 1 - Program Execution

In CSE115 there was a focus on writing programs to accomplish specific tasks. In CSE116 we will focus on how those programs run. For program execution, we will study how memory is managed and how to automate the testing of programs.

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

  • Read: Trace through programs and track the state of stack memory throughout their execution using memory diagrams
  • Explain: Describe the concepts of stack memory, stack frame, variable scoping, and unit testing, while reflecting on their importance in the programs we write
  • Write: Write methods using Scala and write automated tests to verify the functionality of such methods

Learning Objective 2 - Object-Oriented Programming

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: Trace through the execution of programs that use inheritance and polymorphism while tracking the state of stack and heap memory using memory diagrams
  • Explain: Describe the concepts of classes, inheritance, and polymorphism and explain how they can be used to help us write software
  • Write: Implement programs that change behavior based on the type of an object stored in a variable by applying the concepts of inheritance and polymorphism

Learning Objective 3 - 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: Trace through the execution of programs that use linked-lists, trees, and graphs using memory diagrams
  • Explain: Describe the structure of linked-lists, trees, and graphs and the implications of these structures including applications of each
  • Write: Write programs that use linked-lists, trees, and graphs as well as implement new algorithms to expand the functionality of each data structure

Grading

You must demonstrate that you completed all 3 learning objectives to earn a passing grade in this class. To complete a learning objective, you must complete all 3 portions (read, explain, write) of that objective.


Learning Objectives Completed Grade
3 Grade depends on the number of application objectives completed
0-2 F


If you have completed all 3 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
6-7 A-
5 B+
4 B
3 B-
2 C+
1 C
0 C-


Learning Objective Completion

You must demonstrate that you've completed all 3 learning objectives to pass this class.

You will have the following opportunities to demonstrate completion of the 3 parts of each objective. Once you earn completion for all 3 parts, you have completed the corresponding learning objective.

  • Read - Lab Quiz
    • Each learning objective will include a code reading quiz that you will take during lab. To complete the read portion of a learning objective, your quiz submission must demonstrate that you can read code as specified in the learning objective portion of the syllabus. All quizzes will require you to complete a memory diagram for several programs.
    • These quizzes are graded on a pass/fail basis. If you pass the quiz, you have completed the read portion of the learning objective. All completion decisions will be made by a human after reviewing your submission.
    • There are 2 lab quizzes on the schedule for each learning objective. If the course staff verifies that you've completed the read portion of a learning objective after you take the first quiz, you do not have to take the quiz during the second verification lab.
  • Explain - Lab Interview
    • During each learning objective verification lab, while you are taking your code reading quiz, 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 concepts as specified in the learning objective portion of the syllabus. 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 learning objective verification lab, you do not have to interview again during the second verification lab. (If you completed both the quiz and interview during the first lab, you do not need to attend the second verification 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 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).
  • Write - Coding Projects
    • Each learning objective will contain a program project with 3 weekly tasks to complete which involve writing code. To complete the write portion of a learning objective, you must complete all 3 tasks of the corresponding project on time.
    • Programming tasks will be introduced, and discussed, during lecture throughout the week where the material needed to complete the task is covered. All tasks are due on Wednesday morning, 2 weeks after the material is covered. If you do not complete a task before it is due, you can no longer earn credit for the write portion of the learning objective, and you will fail the class. This is to prevent you from falling more than 2 weeks behind in this course. It is nearly impossible to overcome a 2-week deficit in this course. Do your work early, stay up to date on the course, and you will not have to worry about these deadlines.
    • If you earn credit for all required objectives in AutoLab you will have completed the write portion of that learning objective. In rare cases, some objectives may be waived after human review as long as you have demonstrated that you can write code as specified in the learning objective portion of the syllabus (i.e. Do not stress about obscure errors in your AutoLab feedback as long as you know your code works and you have comprehensive unit testing. If your testing is anything less than amazing, do not expect a waiver).

Recovery Opportunities: The grading policy, at least at first glance, seems very harsh. If you miss any part of a learning objective, you fail the course. In reality, we understand that life happens. You might get sick, your car might break down on your way to lab, or you might have 4 midterms in 1 week and not have time to work on CSE116. To address this, the course already has 2 opportunities for each quiz and interview, and the deadline for each programming task has been extended by 1 week from the expected/early/reasonable deadline (explained in the next section) to effectively give you 2 chances for each task. For cases when 2 opportunities are not enough, you can use recovery opportunities.

You have 4 recovery opportunities to use throughout the semester which can be used to earn another opportunity to complete a quiz, interview, or programming task. If you use a recovery opportunity on a quiz or interview, we will schedule a makeup quiz or interview for you at a time outside of lab. If you use a recovery opportunity on a programming task, you will be given an additional 1-week extension on that task.

Recovery opportunities cannot be used to extend the deadline of application objectives.

  • Recovery opportunities will be used automatically if they are needed. Since the alternative is failing the course, we will assume that you want to use them if you don't complete a quiz/interview/task
  • If you have a legitimate, and documented, excuse for missing a lab or deadline (e.g. A doctors note saying you couldn't make it to lab), you will be given the makeup or extension without having to use one of your 4 recovery opportunities
  • You can use multiple recovery opportunities on the same quiz/interview/task if needed (With the exception of the last few tasks. You cannot extend any task deadline past the Wednesday of finals week)

Application Objectives

You can improve your letter grade by showing that you can apply the learning objectives to solve real-world problems. You will have the following opportunities to complete application objectives.

  • Programming Projects x3
    • Each of the 3 learning objective projects will contain a 4th programming task that will be labeled as an Application Objective. If you complete the application objective before the deadline of the 3rd programming task, you will earn an application objective in the course.
  • Programming Task Expected Deadlines x2
    • Each task has 2 deadlines. The first is the expected deadline which is the time at which the course staff expects a student who is putting in their 12 hours/week to complete the task. If this course used 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 by 1 week 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.
    • If you complete at least 5 of the 9 tasks before their expected deadlines, you will earn 1 application objective.
    • If you complete at least 7 of the 9 tasks before their expected deadlines, you will earn 2 application objectives.
  • 1st Quizzes/Final Exam x3
    • During the first verification quiz for each learning objective, you will have an opportunity to earn an application objective. To earn this application objective, you must demonstrate a deep understanding of the execution of the programs through your memory diagrams.
    • You cannot earn this application objective on the second chance quizzes or on any makeup quizzes.
    • You will have a second opportunity to earn these application objectives on the final exam. The final exam will contain memory diagram quiz-style questions for all 3 of the learning objectives and the exam will be separated by learning objective. For any applications that you did not earn during the first quiz, you can earn on the final exam (e.g., If you earned the application objective on the quiz for learning objectives 2 and 3, then you don't have to do these portions of the final exam and you would only complete learning objectives 1 on the final).
    • If you earned all 3 application objectives on the quizzes, or if you already earned an A in the course, there's no reason for you to take the final exam.
  • Lecture Questions x2
    • Most lectures will include 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 earn >=60% of the total available lecture question points, you will earn 1 application objective.
    • If you earn >=80% of the total available lecture question points, you will earn 2 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 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 or application objective verification.
  • 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!
  • 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, or hiring, someone to help you write code
  • 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.


Learning Objective 1: Program Execution
Project 1: Pale Blue Dot
Week 1
Lab: No Lab
Monday, August 29
Wednesday, August 31
IDE Setup / Scala Introduction
Objective: Setup your IDE (IntelliJ) for Scala and Python development on your laptop and write a simple Scala program
Friday, September 2
Scala Types and Reading Files
Objective: Write a program that can parse a text file
Week 2
Lab: IntelliJ Setup
Monday, September 5
No Class - Labor Day
Wednesday, September 7
Scala Data Structures
Objective: Write a program that stores values in a data structure
Friday, September 9
Unit Testing
Objective: Write tests to verify that your code is correct
Saturday, September 10 @ 9:00 AM Project 1 - Task 1 Expected Deadline
Week 3
Lab: LO1 Memory Diagrams Practice
Monday, September 12
Unit Testing
Objective: Write tests to verify that your code is correct
Wednesday, September 14 @ 9:00 AM Project 1 - Task 1 Deadline
Wednesday, September 14 @ 9:00 AM Project 1 - Task 2 Expected Deadline
Wednesday, September 14
Memory Stack and Scope
Objective: Explore how the program stack stores values in your program
Friday, September 16
Memory Stack and Scope
Objective: Explore how the program stack stores values in your program
Week 4
Lab: Learning Objective 1 Verification - Quiz and Interview
Monday, September 19
Learning Objective 1 Examples
Wednesday, September 21 @ 9:00 AM Project 1 - Task 2 Deadline
Wednesday, September 21 @ 9:00 AM Project 1 - Task 3 Expected Deadline
Wednesday, September 21
Learning Objective 1 Examples with Recursion
Friday, September 23
Learning Objective 1 Examples with Recursion
Learning Objective 2: Object-Oriented Programming (OOP)
Project 2 : Point of Sale
Week 5
Lab: Learning Objective 1 review
Monday, September 26
Classes and Objects
Objective: Define and use classes to create objects
  • Wikipedia: Class - Overview and reference (More detail than we'll cover in lecture)
  • Scala: Class - Application of Classes using Scala syntax
  • Python: Class - Application of Classes using Python syntax
  • Scala API - Reference for all Scala packages/classes/objects
Wednesday, September 28 @ 9:00 AM Project 1 - Task 3 Deadline
Wednesday, September 28 @ 9:00 AM Project 1 - Application Objective Deadline
Wednesday, September 28
Memory Heap and References
Objective: Explore the concept of the heap and references to objects
Friday, September 30
Memory Heap and References
Objective: Further explore stack and heap memory
Week 6
Lab: Learning Objective 1 Verification - Second Chance
Monday, October 3
Inheritance
Objective: You will be able to write abstract classes and concreted classes that inherent an abstract class
Wednesday, October 5 @ 9:00 AM Project 2 - Task 1 Expected Deadline
Wednesday, October 5
Inheritance Examples
Friday, October 7
Polymorphism
Objective: Understand polymorphism and how it can be used in your programs
Week 7
Lab: No Lab
Monday, October 10
No Class - Extra office hours in Davis 344 during lecture time
Wednesday, October 12
No Class - Extra office hours in Davis 344 during lecture time
Friday, October 14
No Class - Extra office hours in Davis 344 during lecture time
Week 8
Lab: LO2 Memory Diagrams Practice
Monday, October 17
Polymorphism Example
Wednesday, October 19 @ 9:00 AM Project 2 - Task 1 Deadline
Wednesday, October 19 @ 9:00 AM Project 2 - Task 2 Expected Deadline
Wednesday, October 19
Design Pattern: State Pattern
Objective: You will gain experience with the state design pattern to dynamically change the behavior of an object
Friday, October 21
Design Pattern: State Pattern
Objective: Gain more familiarity with the state design pattern
Week 9
Lab: Learning Objective 2 Verification - Quiz and Interview
Monday, October 24
Learning Objective 2 Examples
Wednesday, October 26 @ 9:00 AM Project 2 - Task 2 Deadline
Wednesday, October 26 @ 9:00 AM Project 2 - Task 3 Expected Deadline
Wednesday, October 26
Learning Objective 2 Examples
Friday, October 28
Learning Objective 2 Examples
Learning Objective 3: Data Structures & Algorithms
Project 3
Week 10
Lab: Learning Objective 2 review
Monday, October 31
Linked List
Objective: Understand the structure of a linked list and several linked-list algorithms
Wednesday, November 2 @ 9:00 AM Project 2 - Task 3 Deadline
Wednesday, November 2 @ 9:00 AM Project 2 - Application Objective Deadline
Wednesday, November 2
Linked List
Objective: Explore how various operations are performed on a linked list and how to use them as stacks and queues
Friday, November 4
Linked List
Objective: Reinforce your understanding of Linked Lists
Week 11
Lab: Learning Objective 2 Verification - Second Chance
Monday, November 7
Binary Tree and Traversals
Objective: Gain familiarity with the structure of binary trees and how to traverse existing trees
Wednesday, November 9 @ 9:00 AM Project 3 - Task 1 Expected Deadline
Wednesday, November 9
Binary Search Tree
Objective: Explore an application of binary trees by using them for searching and sorting
Friday, November 11
Tree Examples
Objective: Trace a memory diagram with a tree traversal
Week 12
Lab: LO3 Memory Diagrams Practice
Monday, November 14
Graph Representations and Algorithms
Objective: Learn how to represent a graph in code and work with that representation
Wednesday, November 16 @ 9:00 AM Project 3 - Task 1 Deadline
Wednesday, November 16 @ 9:00 AM Project 3 - Task 2 Expected Deadline
Wednesday, November 16
Breadth-First Search
Objective: Traverse a graph with BFS and use it in pathfinding applications
Friday, November 18
Graph Examples
Objective: Reinforce your understanding of graphs and BFS
Week 13
Lab: No Lab
Monday, November 21
No Class
Wednesday, November 23
No Class
Friday, November 25
No Class
Week 14
Lab: Learning Objective 3 Verification - Quiz and Interview
Monday, November 28
Learning Objective 3 Examples
Wednesday, November 30 @ 9:00 AM Project 3 - Task 2 Deadline
Wednesday, November 30 @ 9:00 AM Project 3 - Task 3 Expected Deadline
Wednesday, November 30
Learning Objective 3 Examples
Friday, December 2
Learning Objective 3 Examples
Review
Week 15
Lab: Learning Objective 3 Verification - Second Chance
Monday, December 5
Learning Objective 3 review
Wednesday, December 7 @ 9:00 AM Project 3 - Task 3 Deadline
Wednesday, December 7 @ 9:00 AM Project 3 - Application Objective Deadline
Wednesday, December 7
Review
Friday, December 9
Review
Wednesday, December 14
Final Exam @ 7:15PM - 10:15PM [Section A in Davis 101; Section B in Hochstetter 114]