Theme of this semester
• Object Oriented Programming (OOP) or Object Oriented Design (OOD)
• Procedural of Programming and Design
• Web Programming (read chapter 7)
Introduction to a Structure
• Physical grouping of related variables together are called C-structure
• Physical grouping of related variables and functions is called
a class where object is instantiated from. For example an object is an
instance of a class (discussed in chapter 8)
• Difference between C and C++
o Original name of C++ was C with classes. C++ contains classes. It made
C a better C (i.e. cin, cout, new, etc.). File handling is simpler in
C++.
o C does not contain classes
o Difference between a structure in C and in C++, in C you can only group
variables, compared to C++ where you can group variables and functions.
• In true OOP, int is cla ss and x is an object of that class. C++
and Java are not true OOP languages, they are hybrid languages.
• In true OOP functions are called methods and variables are called
data members.
• Classes in C++ are divided into 2 parts, structure and class.
• In a C++ structure, you create your own datatype, in C you create
your own tag (see chapter 7, fig. 7.3a and 7.3b).
• You cannot work with the class; a class is only a blueprint. You
actually work with the object(s) in the class.
• By default all members in a structure are public. By default all
members in a class are private.
• When you think class, think classification.
Homework:
Do 3 programs from the book. Bring in source code and test data where
applicable