Topic outline
General
1. Intro to programming
•What is this course about?
•What should you already know?
•What will you be expected to do?
•What will you know when you finish
•What is programming
•Applications of programming
•A simple program
2. Objects, Types and Values
Strings and string I/O
Integers and integer I/O
Types and objects
Type safety
3. Computation
Computation
- What is computable? How best to compute it?
- Abstractions, algorithms, heuristics, data structures
Language constructs and ideas
- Sequential order of execution
- Expressions and Statements
- Selection
- Iteration
- Functions
- Vectors
4. Errors
Kinds of errors
Argument checking
- Error reporting
- Error detection
- Exceptions
Debugging
Testing
5. Writing a Program
Some thoughts on software development
The idea of a calculator
Using a grammar
Expression evaluation
Program organization
6. Completing a Program
Tokens and token streams
- Classes and structs
Cleaning up the code
- Prompts
- Program organization
-- constants
- Recovering from errors
- Commenting
- Code review
- Testing
A word on complexity and difficulty
7. Functions
Language Technicalities
Declarations
- Definitions
- Headers and the preprocessor
- Scope
Functions
- Declarations and definitions
- Arguments
Call by value, reference, and const reference
Namespaces
- “Using” statements
Recursive functions
8. Classes
Classes
- Implementation and interface
- Constructors
- Member functions
Enumerations
Operator overloading
Useful headers in C++
9. IO Streams
Fundamental I/O concepts
Files
- Opening
- Reading and writing streams
I/O errors
Reading a single integer
10. Customizing IO
Input and output
Numeric output
- Integer
- Reading and writing streams
- Floating point
File modes
- Binary I/O
- Positioning
String streams
Line-oriented input
- Character input
- Character classification
11. A Display Model
Why graphics?
A graphics model
Examples
12. Graphics Classes
Graphing
- Model
- Code organization
Interface classes
- Point
- Line
- Lines
- Grid
- Open Polylines
- Closed Polylines
- Color
- Text
- Unnamed objects
S/W libraries
13. Class design
14. GUI
Perspective
-I/O alternatives
-GUI
-Layers of software
GUI example
GUI code
-callbacks
15. Vector and Free Store
Vector revisited
- How are they implemented?
Pointers and free store
- Allocation (new)
- Access
--- Arrays and subscripting: []
--- Dereferencing: *
- Deallocation (delete)
16. Arrays
Destructors
Copy constructor and copy assignment
Arrays
17. Templates, Exceptions
Changing size
- resize() και push_back()
Templates
Range checking and exceptions
18. STL: Containers
Common tasks and ideals
Generic programming
Containers, algorithms and iterators
The simplest algorithm: find ()
Parameterization of algorithms
- find_if() and function objects
Sequence containers
- vector and list
19. STL: Algorithms
Associative containers
- map, set
Standard algorithms
- copy, sort, ...
- Input iterators and output iterators
List of useful facilities
- Headers, algorithms, containers, function objects
20. Ideals and Languages
Ideals
- Aims, heroes, techniques
Languages and language designers
- Early languages to C++
21. Text and Numerics
Strings
I/O
Precision, overflow, sizes, errors
Matrices
Random numbers
Complex numbers
examples
22. Testing
Correctness, proofs, and testing
Dependencies
System tests
Testing GUIs
Resource management
Unit and system tests
Finding assumptions that do not hold
Design for testing
Performance
23. C from C++
C and C++
Function prototypes
printf()/scanf()
Arrays and strings
Memory management
Macros
const
C/C++ interoperability
24.Final Review