Fall 2017 - CS 135
- Note: All examples I show in class can be found in the
/home/williams/public directory &
subdirectories on bobby.
You can read them there,
but if you want to edit/compile them, you will need to copy
them to your
own directory. These files may not compile/work without
as I frequently show in class how some code will lead to
If necessary, please make the appropriate adjustments as we
- Course introduction, syllabus review, discussion of course content, expectation, guideline review, and general advice.
- Details of machine code, assembly, higher level languages. Basic SSH usage, Linux commands, editors, and a "hello world" program.
- Completion of "hello world" program.
- Basics of whitespace ignorance, statements, reserved words, identifiers, variables, assignment operator, and compiler errors.
- More vocabulary related to program, code, source code, syntax, semantics, tokens, identifiers.
- Explanation of valid identifiers & naming conventions.
- Explanation of integer data types (int, short, long, bool, char)
- Explanation of floating-point data types (float, double).
- Order of operations.
- Implicit casting.
- static_cast and C-style casting.
- Basics of strings.
- Variables and assignment.
- Declaring multiple variables.
- Initializing variables.
- Using cin for input and cout for output.
- Pre/post increment/decrement operators.
- Compound assignment operators.
- Escape sequences.
- Difference between endl and \n.
- Streams in general.
- Stream insertion & extraction operators.
- cin and cout in more detail.
- Altering cin and cout to take redirected input from files in Linux.
- Please glance over chapters 1 & 2 in the book, and spend some
additional time reading the chapter 2 sections about debugging, program
style, and form.
- Assignment 1 - Due September 25.
- cmath header.
- cin.ignore(int, char)
- Clearing input failures with cin.clear and cin.ignore
- iomanip header and functions for modifying cout output
(setprecision, fixed, scientific, showpoint, setw, setfill, left, and
- getline(cin, string)
- Beginnings of fstream header and reading input from files.
- Lab stuff:
- For contact details & office hours for lab instructors and the lab schedule see this page.
- For all account issues with bobby, see this page or contact the system administrator.
- All issues with using the lab computers or assistance with the exercises should be directed to a lab instructor.
- Note: The only thing the lab instructors grade is the stuff you send them. Although the instructions for the exercises show the use of
you can use whatever editor you want such as
nano (what I use),
vim or other editors. Also, although I use PuTTY as my SSH client, the
lab website/manual uses Secure Shell Client. You can use any SSH client you like.
- Exercise 1 - Due Wednesday, September 6. This exercise is about logging in, use some basic Linux commands, and turning in
exercises to the lab instructor.
- Exercise 2 - Due Friday, September 8. This exercise is about editing a file and using comments.
- Exercise 3 - Due Wednesday, September 13. This exercise is about answering basic questions about the CS lab computers & servers and
- Exercise 4 - Due Friday, September 15. This exercise is about correcting compiler errors.
- Exercise 5 - Due Monday, September 18. This exercise is about writing a basic program that does input/output and some simple
- Exercise 6 - Due Friday, September 22. This exercise is about answering questions about typecasting, arithmetic operations, and library functions.
- Exercise 7 - Due Friday, October 6. This exercise is about writing a program that will find the slope of a line.
- Exercise 8 - Due Friday, October 13. This exercise is about writing a program that uses loops.
- Exercise 9 - Due Sunday, October 15. This exercise is about writing a program that uses loops and uses input redirection.