| Class
| Topics/Activities |
Homework |
| 1 |
- Review the highlighted portions of the course syllabus
- Review the home page of our class web site
- Review cplusplus.com. This site may be a helpful supplement as an online textbook.
- Demonstration of the famous "hello world" program. Memorize it as it's typed out in our variables notes since it will be a quiz at our next class.
- How to use the Visual C++ Compiler software
- Do Assignment #1 as a class
- Introduce Angel
& how to upload Assignment #1 to its drop box
|
|
| 2 |
- Submit Assignment
#1
- Quiz on the Hello World program.
- Any questions regarding Angel or the Visual C++ compiler
?
- Review codepad.org online compiler
- a program that displays several lines of text
with several cout statements
- a program that displays several lines of text
with only one cout statement
- comment out sections of code using // as well as /* ... */
- a program that uses an int variable and prints the value of the variable
- a program that stores a floating-point value
in an int variable and displays the truncated value
of the variable
- a program that performs a computation with doubles and ints and then displays the new value of the variable
- a program that prompts and obtains an inputed integer
- trace a program on scratch paper to check the
logic of the program
- compiling and testing a program incrementally
- a program that uses a constant
- a program that reflects the Coding
Standards
for this course (e.g. this demo)
- a program that does not reflect the proper Coding
Standards
for this course
- Practice identifying declaration, assignment & comment statements
- Discuss Assignment
#2
& the Five Steps of the Programming Process.
- Demonstrate how any demo program in this web site can be
reviewed and executed using copy and paste.
|
- Be prepared for a pop quiz anytime for the rest
of the semester on the Hello World program
as well as the Five Steps of the Programming Process.
- variables worksheet #1
- variables worksheet #2
-
variables worksheet #3
- These worksheets (as well as any similar worksheets assigned in the
future) may be collected at the next class. Therefore, make sure that
you neatly write out complete answers.
|
| 3 |
- review homework
- a program that uses parentheses to override the order of operations
("Please Excuse My Dear Aunt Sally")
- a program that uses the modulus operator ( % )
- a program that uses a compound operator such as +=
- a program that uses the incrementing operator ( ++ )
- a program where integer division occurs and causes a decimal number to be truncated
- a program that uses type casting to avoid integer division
- a program that demonstrates overflow when a value that is too large is stored in an int variable
- a program that demonstrates underflow when a decimal value becomes too small to be stored in a double variable
- a program that rounds a decimal value to the nearest tenth's
place using the C++ cout.precision
- a program that rounds a decimal value to the nearest tenth's
place using my "macho" method of rounding
- Discuss test plans & pseudocode
- (optional) As a class, write out the pseudocode for Assignment #2.
- (optional) As a class, create a test plan for Assignment #2.
- (optional) Do Pseudocode
Activity worksheet with 2 partners to practice & appreciate pseudocode
- (optional) write the program worksheet #1
- (optional) write the program worksheet #2
|
|
| 4 |
- review homework
- use an if statement
- use an if/else statement
- use an if/elseif/elseif statement
- use an if/elseif/elseif/else statement
- use various logical operators such as !,
&&, and ||
- use various relational operators including <, >, <=, >=,
==, !=
- use nested if statement and compare
it to an if statement with an And (&&)
compound expression
- compare two separate if statements
to an if statement with an Or (||)
compound expression
- use an if/else if/else if to organize
a menu
|
|
| 5 |
- review homework
- use a for loop
- use a while loop
- using logical and relational operators in the control expressions
of while loops
- using flag variables with while loops
- using sentinel values with while loops
- use a loop to perform a sequential search to find the greatest value
entered into a program
- use a loop to obtain a running total and then compute the average
- use a continue statement within a
loop to validate user input
- uses a break statement to immediately
exit a loop
- observe the proper use of curly braces and blank lines for good style
and readability
- practice tracing loops
|
|
| 6 |
- trace functions that....
- returns a decimal value rounded to the nearest whole number
- returns sales tax
- returns the area of a rectangle
- returns a random integer
- trace void functions such as displayName and displayMenu
- write function declaration statements
- (optional) save a function in another file and "include it"
in a source file
|
|
| 7 |
Exam #1 |
|
| 8 |
- review homework
- review vocabulary associated with functions
- write the following functions in class:
- add, 2 int parameters, returns the sum of the parameters
- ave, 2 int parameters, returns the average of the parameters
- median, 3 int parameters, returns the middle value
- displayName, no parameters, no return value but displays your first name
|
|
| 9 |
- review homework
- read data from a file
- write data to a file
- append data to the end of a file
|
|
| 10 |
- review homework
- use an array to store a sequence of scores
- use an array to store a sequence of scores and computes the
sum and average of all of the scores
|
|
| 11 |
Exam #2 |
|
| 12 |
- review homework
- use a sequential search for a value in an array
- use parallel arrays
- (optional) pass an array to a function
- (optional) use a binary search algorithm
|
|
| 13 |
- review homework
- declaring and initializing string variables
- display a specific letter within a string variable
- comparing strings with < , >, and ==
- memorize the ASCII values of a, A and blank space
- string concatenation
- using the length function with string variables
|
|
| 14 |
- review homework
- work with arrays
- Optional
- Create a GUI C++ application
- Click File/New/Project menu command
- Select "Windows Form Application" & give it any name
- Click View/Toolbox menu command & select Common Controls
- Double-click the Label tool icon & drag the label to the center of the gray form
- Double-click anywhere on the form
- Hit the Enter key and type label1->Text = "hello world";
- Click Debug/Start Without Debugging to execute your GUI program
|
|