Syllabus - CS 32: Object-Oriented Design & Implementation

Instructor: Mehmet Emre – emre@cs.ucsb.edu

Lectures: Monday, Wednesday 12:30pm–13:45pm at NH 1006 (in person)

Prerequisite: CS 24 or equivalent

General Information

This course is a continuation of introductory classes CS 16 and CS 24. We are going to explore more features of C++, generic programming, object-oriented programming, programming tools and compilation pipeline, and some data structures and algorithms along the way.

This course is a potpourri of topics: advanced topics in object-oriented programming including polymorphism, inheritance, encapsulation; an introduction to compilation, linking, and loading; templates; manual memory management; specific data structures and algorithms; and recent advances in design and development tools, practices, libraries, and operating system support.

Since the course covers a pleathora of topics, we will be using three required textbooks, and several handouts. There will be also recommended text books and resources if you want to learn more about the data structures we cover or modern C++.

How to succeed in this course

Because you are going to learn a lot of topics and develop new skills, this course is designed around giving you a lot of practice. To properly apply the topics you learn taught here, you need to develop an intuition for them, so I suggest (1) prototyping your solutions constantly, (2) testing your understanding, and (3) refining your understanding when you change your design/approach/code/etc. Writing a lot of code this way will help you build an understanding on when and how to apply the techniques you learn in this class.

Debugging memory bugs (or bugs in general) can get frustrating. Definitely reach out to the course staff if you get stuck. We deliberately spread out office hours to allow you to discuss your work and questions with us, you can also ask your questions on GauchoSpace forums. If you need to share your code to ask questions, you can email the staff using GauchoSpace, and include a link to your assignment repo on GitHub. Pair programming, tracing the steps of your program, and explaining your approach to another person are tremendously useful when you are stuck. We encourage working in pairs so you have another person to discuss your solution with. Even if you are working solo, you can still come to the office hours to do the same with the instructor/TAs/LAs.

A tentative schedule

A tentative schedule of particular topics to cover are as follows:

  • Week 1: Linear search, templates, a refresher on standard library containers.
  • Week 2: Object-oriented design, abstract data types, namespaces
  • Week 3: Recursive algorithms, binary search, sorting
  • Week 4: Hashing
  • Week 5: Midterm review + Midterm
  • Week 6: Inheritance, polymorphism
  • Week 7: Exceptions, Dynamic memory management
  • Week 8: Dynamic memory management (ctd.)
  • Week 9: Modern C++ constructs
  • Week 10: Intro to operating systems, processes

Learning outcomes

By the end of the class, the students will:

  • Implement and analyze the complexity of several algorithms and data structures, such as:
    • sorting algorithms
    • hash tables
  • Debug their programs using debugging tools.
  • Assess the advantages and disadvantages of different C++ language constructs for dynamic memory allocation.
  • Familiarize themselves with operating systems (OS) concepts in relation to how the OS runs the programs they write.
  • Design the structure of their programs for creating modular, reusable code; using the topics we learn in this class:
    • Encapsulation
    • Exceptions
    • Polymorphism in different flavors
  • Practice pair programming to communicate how they write code, if they choose to do so.

Class structure

The lectures are going to be structured mainly around live coding sessions, although we will also discuss more theoretical topics (designing particular algorithms) before writing C++ code. These sessions will work as discussions where students have suggestions for key points when writing the program, give input on what a program may do, and suggest possible solutions to any bugs in the presented program.

In the lab sections, the students will work on their programming assignments (also called labs). The students may choose to work in pairs, in which case they will do pair programming as outlined in the main class page.

Assessment

There are two kinds of assignments: homeworks (on paper/GradeScope) and lab assignments (writing programs). There will be roughly 2 homeworks and 1 lab per week on average. In addition to the assignments, there will be a midterm and a final. The exact breakdown of grades are to be determined but here is the tentative breakdown (mainly, the relative weight of the exams may change depending on how much material is covered in each exam):

  • Labs: 24%
  • Homeworks: 18%
  • Midterm: 26%
  • Final: 32%

Each lab and homework is worth the same grade, and the grades are normalized. Two labs (lab 5 and lab 6) have two parts each. Each part of these labs is worth half as much as a normal lab.

Late work policy

We will consider late submissions only for medical or family emergencies where documentation can be provided. This does not include overwhelming workload from other courses, scheduling conflicts, or vacation plans. However we have some accommodations for general life conflicts:

  • We will drop the lowest lab grade.
  • We will drop the lowest 4 homework grades.

I highly encourage you to finish the homeworks/labs even if you miss the deadline. They will prepare you for the exams.

There will not be any make-up exams unless you cannot take the exam because of a medical condition. In that case, contact the me directly or through DSP (if you already provided the documentation to DSP), and I will prepare a make-up exam (which may be an oral exam).

Calculation of letter grades

We are going to use the following grading scheme after calculating the percentage points for everyone:

First, we start with the fixed (not curved) grading scheme where B=80%, B+=83%, A-=87%, A=90% and so on.

  1. If the average (mean) score of the students who did not drop the class is above 80%, then we will use the fixed grading scheme.
  2. If the class average among the students who did not drop the class is below 80%, then we will shift the grading scheme so that the average score gets a B.
  3. After the steps above, we will use a clustering algorithm (part of gradelib) to adjust the grading scale according to a cut-off so that there are no students who are "on the cusp of the next letter grade".

What this algorithm guarantees is that:

  • Your grade will be at least as high as using the standard grading scheme where C=70% (and B=80%).
  • You will not miss the next letter grade because of a small difference (e.g., if the threshold is 0.3, and you got 82.8 but a B+ is 83, then you will still get a B+).

Course policies

Here are some course policies:

  • Per university policy, masks are mandatory in indoors spaces for the first week which includes all the rooms we will use for lectures, labs, and office hours. If you do not put a mask on, I will ask you to leave the room. If you don't do either, then I will cancel the class and you will be reported to the Office of Student Conduct.
  • Collaboration is only permitted when specifically allowed for — otherwise, you must do your own work. Read the first page of each lab and homework to see if collaboration is allowed.
  • Attendence is not required but highly encouraged.
  • You must turn-in your homework before the lecture the day it is due.
  • All regrade requests must be done through Gradescope within one week of grading.

Accommodations for disabilities

Students with disabilities may request academic accommodations for exams online through the UCSB Disabled Students Program. Please make your requests as early in the quarter as possible to ensure proper arrangement.

Medical accommodations and recording of lectures

Overall, the lectures involve an element of participation and pondering. So, I will not be recording any of the lectures (DSP may choose to record it as part of a student's accommodation but they will not share it with the rest of the class).

If you cannot make it to a lecture because of medical reasons (including COVID-19), let me know and I will set up some accommodations other than recording the lecture for you.

Non-discrimination policies

Under Title IX, university students are protected from harassment and discrimination based on gender and sex. If a student feels uncomfortable or in need of support at any time related to their gender, sex, and/or sexual orientation, please contact your TA and/or course instructor immediately. If a student would like to disclose information related to pronouns, name changes, or identities, we encourage you to do so. UCSB's Resource Center for Sexual and Gender Diversity on the 3rd floor of the Student Resource Building is also available to advocate and be of and support to students.

You can specify your preferred pronouns on GOLD, these are shown in GauchoSpace. Similarly, you can check others' pronouns when responding to refer to them properly in this class. Remember that it is always okay to use someone's name to avoid using the wrong pronouns for them. For more information, visit http://rcsgd.sa.ucsb.edu/education/pronouns

All students have the right to learn and participate in a classroom environment free of intimidation, harassment, and discrimination based on characteristics such as gender, race, age, sexual orientation, disability, religious or political beliefs and affiliations. I will address any related issues that surface immediately; please help me to cultivate a positive classroom environment by communicating any concerns that you have.

Statement on sexual harrassment

UCSB does not tolerate sexual harassment/sexual violence, which is prohibited by University policy and state and federal law. The Title IX Compliance and Sexual Harassment Policy Compliance Office (TIX/SHPC) provides assistance in preventing and resolving and investigating complaints of sexual harassment/sexual violence and gender discrimination. https://oeosh.ucsb.edu/titleix/

Mandatory reporting

As an instructor, one of my responsibilities is to help create a safe learning environment on our campus. I want to ensure that students feel they can speak to me, but I also want students to be informed that I have a mandatory reporting responsibility related to my role as an instructor. I am required to share information regarding sexual misconduct or information about a crime that may have occurred on UCSB's campus or in the community. A result of my mandated report will be that students will receive outreach and resources from the campus Title IX office. Students may speak to someone confidentially by contacting CARE, Campus Advocacy, Resources & Education at the 24/7 advocacy line at (805) 893-4613 or visit them in person at the Student Resource Building.

Mental health

On top of the usual stress factors, switching to in-person education may require some mental adjustment or create additional stress. Personal concerns such as stress, anxiety, relationships, depression, cultural differences, can interfere with the ability of students to succeed and thrive. For helpful resources, please contact UCSB Counseling & Psychological Services (CAPS) at 805-893-4411 or visit http://counseling.sa.ucsb.edu/.

Responsible scholarship

Honesty and integrity in all academic work is essential for a valuable educational experience. We need to remind you about the university policies regarding academic dishonesty, and to submit your own original work. You can look up the website of Office of Student Conduct for more details on this topic.

An important reminder is that do not put your work on a public repository. There have been cases in the past where some students found and copied other students' code in public repositories on GitHub. Unfortunately, in such situations, it can be tricky figuring out who copied from whom, and whether both parties participated in this willingly. Using version control systems is good software engineering practice, and we encourage it. However, if you are using common source code hosting sites like GitHub and GitLab, they both allow you to create private repositories for free The former allows private repositories at least when you join the UCSB GitHub organization, you will be able to create private repositories in an organization we provide, so you can show your code to the course staff when asking questions., and you should use private repositories for this class.

Furthermore, for general academic support, students are encouraged to visit Campus Learning Assistance Services (CLAS) early and often. CLAS offers instructional groups, drop-in tutoring, writing and ESL services, skills workshops and one-on-one consultations. CLAS is located on the third floor of the Student Resource Building, or visit http://clas.sa.ucsb.edu

Communication Channels

At the time of writing this syllabus, this course is planned to be taught in-person. Besides the opportunities to ask questions in office hours and labs, we will use the following channels:

  • The class material will be distributed via the class website.
  • Assignments are going to be turned in via Gradescope and GitHub.
  • We will use GauchoSpace for asking questions or discussing topics online.

Textbooks

Required textbooks:

  • Problem Solving with C++ - Walter Savitch, 9th edition
  • Data Structures and Other Objects Using C++ - Michael Main & Walter Savitch, 4th edition
  • Operating Systems: Three Easy Pieces by Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau - We will use only some chapters, and they are available online. I will link to them in the relevant homework assignments.

Recommended textbooks:

The textbooks in this list are not required but they are useful if you want to deepen your understanding of the material covered in this class.

Disclaimer

This syllabus is as accurate as possible, but it may be changed at the instructor's discretion, within the bounds of UC policy.

Footnotes:

1

The former allows private repositories at least when you join the UCSB GitHub organization, you will be able to create private repositories in an organization we provide, so you can show your code to the course staff when asking questions.

Author: Mehmet Emre

Created: Spring 2022

The material for this class is based on Prof. Richert Wang's material for CS 32