|
Lesson 8OBJECT AND CLASS: EVERYTHING AS AN OBJECT OF A CLASSThe world around us is made of objects and each object has its own characteristics as to what it does and what can be done to it. A group of similar objects can be generated from a model (blueprint) that encompasses essential characteristics such as its data and its functionality, which is known as class. A class bundles the data, its functions, and how these two members interact with each other as well as the outside world. Introduction of class and its objects will shift the focus from Procedural Programming (with function in center) to Object Oriented Programming where security (access), extendibility (expansion), and reusability (cost) are the major concerns. As a matter of fact, you have already dealt with class and object. The simple cin and cout statements are objects of the iostream class. HOW TO MAKE A CLASS
Figure 8.1a – A class with keyword struct. |
This
information was powered by
Prof A, Ebrahimi