Overview

C++ is a programming language. It most of the applications you use are written in C++ or a similar language. You will write the programs to control your robot in C++. Like a spoken language, a programming language has a vocabulary and grammar rules. A C++ program can be thought of as a list of instructions, in order, for the computer to carry out.

To program, first create a step-by-step plan for how the computer will do what you want it to do. This plan is an algorithm.

For example, an algorithm for making a bowl of cereal might be:

  • Take a bowl from the cabinet
  • Place it on the counter
  • Take out a box of cereal from the cabinet
  • Open the box of cereal
  • Pour the cereal from the box into the bowl until it almost reaches the top of the bowl
  • Close the box
  • Put the box back in the cabinet
  • Open the fridge
  • Take the milk from the fridge
  • Open the milk
  • Pour milk into the bowl until the cereal reaches the top of the bowl
  • Close the milk
  • Put the milk back into the fridge
  • Take a spoon from the silverware drawer
  • Put the spoon into the bowl

Algorithms are detailed and exact. When you program, the language will enforce this.

Next Step

Proceed to “First Program: Hello World”