Lecture 00: Intro

Jan 8, 2024  β”‚  Last updated Jan 2, 2024 by Charlotte Curtis

HTML Slides html β”‚ PDF Slides PDF

Land Acknowledgement

center h:500px

Today’s topics

About me

bg right flavour

Name: Charlotte Curtis

Background: Biomedical Engineering undergrad, Electrical Engineering PhD

Research: Vector graphics and PDF manipulation (sewing patterns)

Pronouns: She/her

Call me: Charlotte

Office: B175P

Email: ccurtis@mtroyal.ca

What is this class all about?

Introduction to object-oriented analysis and design, programming using an object-oriented language, and implementation of linked data structures. Issues of modularity, software design, and programming style will be emphasized.

Why another programming language?

Python

  • Intuitive syntax
  • Allows you to focus on the algorithm
  • Lots of magic, like garbage collection

C++

  • More complex syntax
  • Makes you to think about memory management
  • Closer to the metal

As CS students, you will learn a lot about how computers work and different ways of interacting with them

Course objective highlights

Where does this course fit?

center h:450

What is this class not about?

“C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off” - Bjarne Stroustrup

The year was 1998

bg right:40% fit flavour

Assessments

AssessmentWeightDescription
Lab exercises10%
Assignments32%4 assignments, 8% each
Midterm20%80 minutes, March 6th, 2024
Final38%3 hours, during final exam period

Course Format

Attendance is not mandatory, but highly correlated to success

Lab Exercises

Assignments

Assignment late policy

bg right:30% fit flavour

Academic Integrity

If you read something, understand it, and can implement it without looking at the source, you’re not in violation of the academic integrity policy

Getting Help

Course resources

bg left:40% fit flavour

Development Tools

center flavour

  • Git Version control system
  • Emacs Text editor
  • C++ compiler: g++ for C++ 98

We will be working on a Linux server called INS

flavour

emoji Tangent: Let’s talk about Linux

What comes to mind when you hear the word “Linux”?

Hello World

Python

print("Hello World!")

C++

#include <iostream>
using namespace std;

int main() {
    cout << "Hello World!\n";
    return 0;
}

To save space on slides, I will be omitting #include <iostream> and using namespace std; most of the time. However, these are needed to compile!

emoji Tracing time!

  • Trace the code to the right, predict what is printed to the terminal, and submit your answer in iClicker
  • Feel free to discuss with your neighbours
int main() {
    int x = 0;
    int z = 0;
    while (x < 5) {
        z += x * x;
        ++x;
    }
    cout << z << '\n';
    return 0;
}

Coming up Next

Textbook Sections 1.3-1.4, 2.1-2.5



Next: Lecture 01: C++ Basics