Week2
This week, we learned the basic rules of C++ including literals, identifiers, symbols, variables, arithmetic operators, assignment, standard input/output (cin/cout). These topics are mainly from Chapter 2 of the textbook (Tapestry). However, input stream (cin), variables, data types and arithmetic operators are in Sections 3.1 and 3.2. Assignment operator is discussed in Section 4.1.
Then we continued with other basic data types such as char, double and other versions of int. We covered limits of these data types and discussed integer overflow. We also covered some more arithmetic operations and operator precedence and finished with some more assignment operators. We only could not cover the fahrcels.cpp file in class, we will cover it in the recitations next week. These are in basics2.ppt file below. Topics are mostly from Chapter 3 of the textbook (up to section 3.4), but it includes assignment operator which is in Chapter 4 of the book. Integer and real representation and limits are not detailed in the book. short, signed, unsigned are not explained in the book either.
Example programs we covered in the class (area.cpp, time.cpp and time2.cpp) are not in the book. These programs are given below.
The .swf file (animation) should be copied to the same folder as the basics.ppt file.
Powerpoint files and animations
C++ codes discussed in class (some of them might have been modified in class to show extra features)
area_cpp
Recitation02
Here are some very helpful animations on how to debug a program and how to prepare your homework for submission prepared by Can Yildizli.