notes - School of Computer Science Course Notes CS 246...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: School of Computer Science Course Notes CS 246 Software Abstraction and Specification http: //www.student.cs.uwaterloo.ca/ cs246 Fall 2009 September 26, 2009 Outline Introduction to object-oriented programming in C++ and basic UNIX software development- tools to facilitate designing, coding, testing, and documenting of medium-sized C++ programs. Students will become apprentice programmers able to read a specification and design the soft- ware to implement it, use appropriate data structures in a program, write reusable code and reuse existing code when possible, understand performance characteristics of a program and how to debug a program, and adequately test a program. Permission is granted to make copies for personal or educational use. Contents 1 Shell 1 1.1 File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Pattern Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.3 Quoting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.4 Shell Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.5 System Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.6 File Permission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.7 Input/Output Redirection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.8 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.8.1 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.8.2 Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.8.3 Arithmetic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.8.4 Control Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.8.4.1 Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.8.4.2 Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.8.4.3 Looping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2 C++ 21 2.1 Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.1 Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 2.1.2 Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.2 First Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.3 Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.3.1 Identifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3.2 Basic Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3.3 Variable Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.3.4 Type Qualifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.3.5 String . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .....
View Full Document

Page1 / 170

notes - School of Computer Science Course Notes CS 246...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online