On this page:
2.1.1 Objectives
2.1.2 Exercises (due 2011/  09/  02 08:  45:  00)
2.1.3 Optional Exercises (due 2011/  09/  09 08:  45:  00)
2.1.4 Notes

2.1 Introduction to Programming and C++

2.1.1 Objectives

At the end of this class, you should know:

At the end of this class, you should be able:

Here are some resources that may be useful:

2.1.2 Exercises (due 2011/09/02 08:45:00)

1. You and your friends decide to order a pizza and share the cost according to how many slices you eat. The pizza is cut into 8 slices. You eat 3 of them. If the pizza costs $12, how much should you contribute? Write a program to perform the computation.

2.1.3 Optional Exercises (due 2011/09/09 08:45:00)

2. Your fellowship of nine defeat eight orcs and one bugbear. Each orc is worth 50 XP and the bugbear is worth 80 XP. How many XP does each member of the fellowship receive? (Assuming standard AD&D experience division where each party member receives an equal share.) Write a program to perform the computation.

2.1.4 Notes

These notes are primarily for my sake, but I don’t see any reason to hide them from you.

Syllabus/website/resources

 

Why are you here?

 

What is programming?

 

What does a programmer do?

 

Elementary school math is computation

 

Middle school math is more operations and symbolic computation

 

Computers are fast students that don't speak English

 

Humans speak information

-- Like what

 

Computers need data

-- What kinds

 

Computer do operations

-- Like?

 

> show the hello world skeleton & run the program

 

> make stupid mistakes

 

> print some numbers (integers and decimal)

 

> do some operations (+, -, *, /)

 

> nest operations

 

> more operations