Week 1: Class Overview and Introduction to C++ Programming

Learning objectives:

Upon finishing this learning module, you should be able to:
  • Describe how a C++ program is goes from source code to working program
  • Identify the functions of basic components of a C++ program
  • Do basic console input/output
  • Use assignment and the basic math operators

Deadlines This Week:

  • Wed 11:59PM - Background Survey and Class Policies Review in eLearn. The review is scored as an assignment. The survey is not graded, but if you do not complete it you will be given a 0 on the Class Policies Review.

Classroom Schedule:

Monday
  • Setup access to Revel Introduction to Programming with C++ - see discussion board for link
  • Review Syllabus and Course Tips (find them in the Documents link at the top of the page)
  • Read Ch 1.1-1.6
  • Install QtCreator at home
Tuesday
  • Declare variable, assign values, do math. Use the debugger.
  • Finish Ch1, Ch 2.4-2.6
  • Do MentalCodeDebugging WS
Wed
  • Write a program that accepts input, calculates an answer and outputs it.
  • Ch 2.1-2.3 and 2.8-2.10
Friday
  • Wrap up samples.
  • Development advice.
  • Read Ch 2.14

Online Activity Outline:

Class Intro

  • Watch this quick website intro video.

    For any video, you can click in the lower right corner to watch on YouTube. You can then use the settings icon there (Gear symbol at bottom of video) to watch at higher quality. Doing so can make a big difference when trying to read code examples.
  • Review Syllabus and Course Tips (find them in the Documents link at the top of the page). Then do the Background survey and Class Policies Review activity in eLearn.

Getting Started

  • Read Ch1.1-1.5... you probably already know parts of this (you better if you took 160!!!) but there will be parts that are new.
  • Get started with Qt Creator and C++
    • Install Qt Creator (see Resources links at the top of this page for instructions). All code you submit must build using standard C++... if you try to use another tool for programming (XCode on Mac, Visual Studio on Windows) and don't know what you are doing, you probably are going to end up submitting code that does not build for me and getting penalized for it. Use Qt Creator.
    • Download the source code for book examples
    • These videos demonstrate how to use Qt Creator for this course:
      Qt Creator Basics
      Renaming Files
      Using My Examples
  • Finish reading Ch 1 - as you are reading chapters, try checkpoint exercises as you go - you can download answer keys from the book author's website (see Resources links at the top of this page). On that site, click the Solutions tab.

C++ & Development Basics

  • Work your way through Ch 2.1-6 and 2.8-2.10. This video gives some advice about using cin to take input from the user:
    Input Based Programs
  • Do the MentalCode worksheet (see Classroom slides/examples link lower on page) to practice using the debugger and test your understanding of how math works in C++. The debugger is a CRITICAL tool for learning programming. It is what lets you look at what your code is doing step by step. These two videos introduce it and talk about some of the odder things you will see math wise while programming:
    Using The Debugger
    Math Weirdness
  • Read Ch 2.14
  • Start the assignment as you work through the rest of the week. This video talks through that program to show how you should approach building programs: one step at a time:
    Building a program step by step

Extra Info:

Compiling details

Looking for more information on what exactly happens when code is compiled? Try here:
Compiling and Linking tutorial

Learncpp.com

This online tutorial covers some of the same ground as the Liang readings use it as a supplement if you need one:
LearnCpp.com chapters 0, 1.1-1.3, 2.1-2.5, 3.1-3.2
Warning : learncpp.com shows how to use multiple different IDE's for writing code. Until you know how to test to see if your code is standards compliant, I highly recommend sticking with QtCreator and the provided templates.

Classroom slides/examples:

Directory of files from the week
Right click files and save to your computer

Assignment:

Assignment #1