Course Introduction, Intro to C++

Welcome to EECS 280! This lecture presents our motivations and big-picture goals, some course logistics, and an introduction to programming in C++.

Updated Winter 2025

Participation credit for async lectures is automatically recorded once you complete the embedded exercises. Take a look at the top left of the page. You'll need to sign in with your @umich.edu Google account so that we know it's you.

Completion of individual exercises is tracked in the navigation panel to the left and section headers within the page. Once all exercises are complete, you'll see a "Completion Verified" message.

To earn participation credit, complete the lecture by 11:59pm on the day the lecture is scheduled.


1: Introductions, The Big Picture

Hello! Let's get started with EECS 280!


A notes for async lectures:

  • They cover the same material as the regular lectures and are kept up-to-date with any changes for the current term.
  • It's just as important as with live lectures to keep up with the material. Async participation is due by 11:59pm the day of the lecture.
  • Generally speaking, I'll post the lectures several days ahead of time so you have a bit more flexibility in when to do them.


2: Course Essentials

Let's take a look at the major components of EECS 280 and course resources, all accessible from our website at eecs280.org.


Don't worry if this all seems a bit overwhelming. There are a lot of different components to the course and a bunch of different resources to get used to. You can find everything from eecs280.org, and we'll try to keep it up-to-date with the most relevant material. I also highly encourage that you ask questions if you're feeling lost - on Ed, Discord, in office hours, in lab, etc.

Setup Tutorials
Here's my recommended approach to getting your computer set up for C++ development (i.e. in the text bubbles below):


C++ Walkthrough Sessions
Our live walkthrough sessions cover setting up your computer, using a command-line interface, compilers, makefiles, IDEs, EECS 280 project workflow, and open Q&A.

  • Tues, Jan 14 at 7-8:30pm via Zoom.
  • Separate, concurrent sessions for Windows/Mac.
  • Links on eecs280.org. Recordings will be posted.



Syllabus
For more details, course polices, etc. - check out our course syllabus at eecs280.org/syllabus.html.



3: Evaluation and Grading
3.1 Not Started

Here's a very quick look at assignments, exams, and grading policies in EECS 280.


We'll come back to review this and add more detail later in the term. (Although it's all there in the syllabus and grade calculator on the website if you'd like to look now.)

I also want to emphasize the importance of keeping up with lectures and actively participating…


3.1 Exercise: Evaluation and Grading

Here's your first participation exercise! Fill in the blanks below.

are the only part of the grade computation that is curved.

Participation in is optionally graded, worth 3% if it helps you.

A student scoring 89.7% overall (with 91.8% on projects, 86.8% on exams) would earn a grade of .

A student scoring 78.2% overall (with 58.1% on projects, 93.25% on exams) would earn a grade of .



4: Lab Groups and Exercises

You'll work small groups of other students to further explore and pratice the course material in lab exercises.


Pretty sure I heard a meow at the end of that video…



5: Machine Code and Compilation

Let's take a break from talking about logistics and dive into our first sequence of course material! We'll start with a brief introduction to the nature of C++ as a compiled language.




6: Demo: A First Progam in C++

So, what does it actually look like to write a program in C++, compile it, and run it?


There were several commands in there, including the g++ hello.cpp -o hello.exe that I used to compile the program. Don't worry about memorizing any of this right now. The tutorials and C++ setup walkthrough sessions will go into some more depth on these.



7: A Tour of C++
7.1 Not Started

Now, we'll spend some time on a brief, whirlwind-style tour of some of the characteristics of C++. This is just a high-level overview, and we'll spend more time on a lot of details throughout the rest of the course.


It's worth looking at expressions and variables in a bit more detail, especially the way variables and their types relate to the underlying memory used in our program.


Understanding variables as a name for an object in memory also helps us understand what would happen if a variable were declared, but not properly initialized before we use it…


Finally, we'll look at a few ways the compiler checks for common errors in programs before we're allowed to run them, using rules of scope and static typing.


7.1 Exercise: C++ Fundamentals

Complete each of the tasks described in the comments.


Sample solution…

  #include <iostream>
  using namespace std;

  int main() {

    // Task 1: Define a variable called price with inital value 7.99.
    double price = 7.99;

    // Task 2: Define a variable called quantity with initial value 4.
    //         The variable's type should only allow whole numbers.
    int quantity = 4;

    // Task 3: Print the result of multiplying the variables to cout.
    //         (Use the unqualified name cout, not std::cout.)
    cout << price * quantity << endl;
  }



8: Fundamental Types and Implicit Conversions

Let's take a look at the set of fundamental data types built in to the C++ language, as well as the rules for implicit conversion between them.


I'll also point out that explicit conversions are possible, where we directly request a conversion. In some cases this may be necessary. In others, it's stylistically preferrable to make an otherwise implicit conversion more obvious. Here's a few examples:

int main() {
  double value = 4.3;

  // implicit conversion, too easy to miss
  int x = value;

  // C-style cast, avoid doing this
  int x = (int)value;

  // C++-style cast, this is preferred
  int x = static_cast<int>(value);
}

In C++, the static_cast form is preferred because it involves stronger compiler checks to ensure the conversion makes sense.



9: Projects and Autograder

You get to exercise the skills you learn in lecture and lab in six large-scale programming projects throughout the course, designed to solidify your understanding and give you a chance to build some neat applications with real-world appeal!




10: Collaboration and Academic Integrity

We want you to learn with and from each other! Enjoying the class with others and having a network you can reach out to for help is highly encouraged. At the same time, we want to make sure everyone has an opportunity to learn for themselves and that nobody takes credit for someone else's work.

It's also important to do the (sometimes challenging, sometimes frustrating!) work yourself, because otherwise you're not going to get much out of the course. This informs our Generative AI Policy. The short version - you're encouraged to use tools like ChatGPT, Copilot, etc. to help you learn, but you aren't allowed to use them to do your work for you. I recommend against using such tools for any code generation, no matter how small. The full version in our syllabus is also worth a read.




11: Wrapping Up

Just a few parting thoughts.


You've reached the end of this lecture! Your work on any exercises will be saved if you re-open this page in the same web browser.

Participation Credit
Make sure to sign in to the page, complete each of the exercises, and double check the participation indicator at the top left of this page to ensure you've earned credit.