CHAPTER 3 OVERVIEW -HENDRICKSON
3. Ch-3 Aritmetic, Var, Input,Const & Lib funct
a. Lecture over new concepts
3.1 Arithemetic in C++
1. Understand an expression
2. Evaluate expressions using int & double
3. Understand the order of operations
4. Evaluate mixed mode expressions
5. Distinguish between valid & invalid mixed mode expressions
3.2 Using Variables
1. Understand the utilization of memory for storing data
2. Distinguish between a variable name & a value of a variable
3. Use variables in expressions & output statements
3.3 Input
1. To be able to use the standard input stream & its operator
2. To design a program using interactive data
3.4 String Variables(apstring library)
1. Declaration & use of a string variable
2. Learn how to input one word & one line at a time
3. Learn how strings are represented in computer memory
4. Learn how to concatenate strings(ap-style)
3.5 Using Constants
1. Be aware of the appropriate use of constants
2. Use constants in programs
3. To be able to format constants
3.6 Library functions
1. Understand the reason for a library function
2. Use library functions in a program
3. Use appropriate data types while using functions
3.7 Type compatibility and type conversion
1. How different data types relate to each other
2. How data types can be converted from one to another
3.8 Graphics-part 2(input & move geometric shapes)
1. Input values to specify specific positions
2. Learn how to use graphic operations with relative coordinates
3. Changing foreground and back ground color
4. Determining screen size
b. Programming assignments discussion(note: top-down approach)
1. program 5 P123 #1(no input-cin)
2. program 6 p123 #3(no-input-cin)
3. program 7 p123 #7(no-input-cin)
4. program 8 p123 #8(use input-cin)
5. program 9 p123 #10(use input-cin)
6. program 10 p123 #11(use input-cin)
7. program 11 p124 #14(use input-cin..harder than 4,5 or 6)
8. program 12 p125 #15(type cast integer)
9. program 13 p125 #17(use input..feet->yards)
10. program 14 p125 #18(regular)
11. program 15 p126 #20(regular)
10. program 14 p126 #21(honors)
11. program 15 p126 #22(honors)
c. Debugging techniques
1. Spell key(reserved) words correctly
2. End lines with a semi-colon(error often the line above)
3. careful use of extractor (<< cout) for output
a. insertion(>> cin)
4. graphics:
a. #include graphics.h
b. set i.d.e. for graphics
c. use functions graphdriver & init graph & closegraph();
d. check your coordinates
e. check variables are in range
f. moveto & lineto, outtext..be careful
g. "c:...\\bgi" be careful of the path!!!
h. colors(words or numbers!)
5. type mismatch error(char in an integer variable)
6. real division = int/decimal or decimal/int
7. division by zero error
8. #includes iomanip , math.h & "apstring" errors
a. library constants..spell them right!!!
9. Declare variables as you create them(int, char, double)
10. cast int to doublesfloats) as needed
11. cast char to int and int to char for character tricks
12. random numbers...
a. use stdlib.h , time.h
b. becareful of fand().. formluas(p101)
13. Be sure that style and indentation...
a. create blocks of code that go together and indent
d. Homework
1. 3.1 page 70 #1-7 all
2. 3.2 page 77 #1-9 all
3. 3.3 page 86 #1-7 all
4. 3.4 page 94 #1-8 all
5. 3.5 page 97 #1-3 all
6. 3.6 page 101 #1-5 all
7. 3.7 page 107 #1-8 all
8. 3.8 page 117 #1-8 all
9. Vocabulary P120(42 words)
10. Chapter Review p122 #1-25 all
e. Chapter Tests & Quizzes
Go back to chapter 2. . . .
Go forward to chapter 4. . . .
Go back to Computer Science page. . . .