Class Topics/Activities Homework
1
2
  • Submit Assignment #1
  • Quiz on the hello world program .
  • Any questions regarding Angel or obtaining & installing the Visual C++ compiler ?
  • Any questions on using the Visual C++ compiler?
  • a program that displays several lines of text with several cout statements
  • a program that displays several lines of text (perhaps the 5 Steps of the Programming Process) with one cout statement
  • a program that displays a long line of text but prints nicely (without being cut-off)
  • 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 prints the value of the variable
  • a program that performs a computation and an assignment with doubles and ints and then prints the new value of the variable
  • a program that prompts the user to input an integer value and then obtains that integer value from the user via the keyboard
  • 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 within a computation.
  • a program that reflects the Coding Standards for this course (practically any online demo program such as this demo)
  • a program that does not reflect the proper Coding Standards for this course
  • Discuss the numerical ranges for int and double data types. Possibly review the use of INT_MAX, INT_MIN from limits.h and DBL_MAX and DBL_MIN from float.h.
  • Practice identifying declaration, assignment & comment statements
  • Discuss Assignment #2 & the Five Steps of the Programming Process.
  • Do Pseudocode Activity worksheet with 2 partners to practice & appreciate pseudocode
  • As a class, write out the pseudocode for Assignment #2.
  • As a class, create a test plan for Assignment #2.
  • Discuss test plans & pseudocode. Also, discuss the use of constants.
  • Demonstrate how any demo program in this web site can be reviewed and executed using copy and paste.
3
  • 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 that gives an example of type coercion (aka promotion)
  • a program that uses type casting
  • a program where integer division occurs
  • a program that attempts to assign a value that is too large to an int variable (this is an example of overflow)
  • a program in which a floating-point value becomes too small (i.e. too close to 0) to be stored in a double variable (this is an example of underflow)
  • a program that rounds a floating-point value to the nearest tenth's place using the C++ cout.precision
  • a program that rounds a floating-point value to the nearest tenth's place using my "macho" method of rounding
4
  • 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
  • use a for loop
  • use a while loop
  • use a do while loop
  • using flag variables in control expressions of indeterminate loops
  • using sentinel values and loops when receiving input
  • 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
  • uses continue statements within a loop to validate user input
  • uses a break statement to immediately terminate a loop
  • using logical and relational operators in the control expressions of indeterminate loops
  • observe the proper use of curly braces and blank lines for good style and readability
  • Practice deskchecking loops including nested ones.
6
  • trace functions that....
    • returns a decimal value rounded to the nearest whole number
    • computes & returns sales tax
    • computes & returns the area of a rectangle
    • returns a random integer
    • displays your name
  • write function declaration statements (aka function prototypes)
  • (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:
    • 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
    • summation, 1 positive int parameter, returns the sum of all numbers 1+2+3+...+ parameter
    • displayName, no parameters, no return value but displays your first name
9
  • a program that reads data from a file
  • a program that writes data to a file
10
  • a program that writes data to the end of a file which is called appending data to the file

  • uses an array to store a sequence of scores
  • uses an array to store a sequence of scores and computes the sum and average of all of the scores

11

Exam #2

 
12
  • use a sequential search for a value in an array
  • use parallel arrays
  • pass an array to a function
  • use a binary search algorithm
13
  • declaring and initializing string variables, must use #include <string>
  • how to display a specific letter within a string variable (using subscript notation)
  • comparing strings with < , >, and ==
  • ASII values of a, A and blank space
  • working with the length function
  • string concatenation
  • using the length function with string variables

14
  • work with arrays

Fill out course evaluation forms

  • 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
  • Other classes