California State University, Bakersfield

CMPS 2010

Programming I - Week 4

Contact

Instructor

William Paul Royer

Email

wroyer@csub.edu

Office

Science III 339

Office Hours

Monday
12:00 p.m. – 2:00 p.m.
Wednesday
12:00 p.m. – 2:00 p.m.
Friday
12:00 p.m. – 2:00 p.m.

If you are unable to meet during my regularly scheduled office hours, please contact me by email and I will work with you to schedule another time to meet.

Course Schedule

Topics, assignments, and resources organized by week.

Week 2

Input, Strings & Expressions

Topics

  • Constants
  • Basic input and output
  • Introduction to strings
  • Expressions and math
  • Comments and programming style
  • Math, precedence, and <cmath>
  • Using functions
  • Advanced assignment operators
  • Variable typing and formatting
  • Characters and strings
  • Using functions
  • Random numbers

Assignments

Week 3

Functions, Strings & Math

Topics

  • More Characters and strings
  • String and character functions
  • Advanced assignment operators
  • Relational operators
  • The if statement
  • The if/else statement
  • The if/else if statement
  • Logical operators
  • Switch statements
  • Checking number ranges

Assignments

Week 4

Decisions & Conditional Logic

Topics

  • Flags and menus
  • Increment and decrement operators
  • The while loop
  • The do-while loop
  • The for loop
  • Input validation
  • Counters and accumulators
  • Reading and writing files

Assignments