CHAPTER 1
CHAPTER 1
REVIEW OF C++
FOREVIEW
POINTS OF FOCUS
SOLVED PROBLEMS
POINTS TO REMEMBER
FOREVIEW
Programming Paradigm: Organizing principle of a program
Procedural Programming: It is a paradigm that emphasis is on doing things rather than the data
being used.
Object Oriented Programming: It is a paradigm where data and procedures both are given equal
importance
Object: It is an identifiable entity with some characteristics and behaviour.
Class: A class represents a group of objects that share common properties.
Abstraction: It is the act representing essential features without including the background details.
Encapsulation: It is the binding up of data and functions into a single unit
Inheritance: Inheritance is the capability of one class of things to inherit capabilities or properties
from another class
Polymorphism: Polymorphism is the ability for a message or data to be processed in more than one
form.
Character set: Character set is a set of valid characters that a language can recognize
Keyword: Keyword is a special word that has a special meaning and purpose. Keywords are
Reserved.
Identifier: Identifiers are the user-defined name given to a part of program.
Variables: Variables represent named storage locations whose values can be manipulated during
program run.
Data types: Data types are the means to identify the type of data and associated operations of
handling it. C++ offers two types of data types: Fundamental data types and Derived
data types.
Modifiers The keywords which appear before a data type, change its meaning, are modifiers.
Operators in C++: C++ provides six types of operators. They are I/O operators, Arithmetic
operators, Increment/Decrement operator, Relational Operator, Logical operator,
Conditional operators.
Flow of Control Statements: The three flow control statements are: sequence, selection ( if ,
switch), iteration(while loop, do while loop, for loop).
Console I/O Operators: It performs input from standard input device and out put to the standard
output device of a system.
POINTS OF FOCUS
1. Programming Paradigm
Organizing principle of a program. It is an approach to programming.
Example: Procedural programming, Modular Programming , Structural Programming
2. Procedural Programming
Procedural programming paradigm aims more at procedures. The emphasis is on doing things rather than the data being used. In procedural programming paradigm, data are shared among all the functions participating thereby risking data safety and security.
3. Object Oriented Programming
Object Oriented Programming paradigm is based on the principles of data hiding, abstraction, inheritance, and polymorphism. It implements programs using classes and objects. In OOP paradigm, data and procedures, both are given equal importance. Data and functions are encapsulated to ensure data safety and security.
4. Object
It is an identifiable entity with some characteristics and behaviour.
e.g: Orange is an object. Its characters are spherical shaped, color is orange etc. Its behaviour is
It is juicy and tastes sweet sour.
5. Class
A class represents a group of objects that share common properties.
“Bird” is a class and “parrot” is an object of the class
6. Abstraction
It is the act representing essential features without including the background details.
e.g.: While driving a car, We only know the essential features to drive a car like handling steering, applying break etc. we do not get into internal details like how the motor working. What is happening inside is hidden from us. This is called abstraction.
7. Encapsulation
It is the binding up of data and functions into a single unit
e.g.: In a company, each department’s employees and their work are encapsulated as a single unit
8. Inheritance
Inheritance is the capability of one class of things to inherit capabilities or properties from another class.
e.g.: We inherit certain properties such as ability to speak, breath, eat, drink etc. from the class “Human”.
9. Polymorphism
Polymorphism is the ability for a message or data to be processed in more than one form.
e.g.: A working lady can behave in different way according to different situation. She can behave as mother at home and she can behave as an employee in office.
10. Character set
Character set is a set of valid characters that a language can recognize
Eg: Letters, Digits, Special characters, White spaces and other characters.
11. Keyword
Keyword is a special word that has a special meaning and purpose. Keywords are reserved.
For example class, switch, else etc., are keywords.
12. Identifier
Identifiers are the user-defined name given to a part of program. E.g. variable, object, function etc. Identifiers are not reserved. These are defined by the user but they can have letters, digits and a symbol underscore. They must begin with either a letter or underscore.
For instance: _chk, chess, trial etc. are identifiers.
13. Variables
Variables represent named storage locations whose values can be manipulated during program run.
e.g: A= 10; here A is a variable which holds the value 10.
14. Data types
Data types are the means to identify the type of data and associated operations of handling it. C++ offers two types of data types:
1. Fundamental data types. These are the data types that are not composed of any other data type. There are five fundamental data type: char, int, float, double and void.
2. Derived data types. These are the data types that are composed of fundamental data types. These are array, function, pointer, reference, constant, class, structure, union and enumeration.
15. Modifiers
The keywords which, when appear before a data type, change its meaning, are modifiers. These are signed, unsigned, short and long.
When the data type modifiers appear before a type, the meaning of the data type is changed in the sense that its size is affected thereby affecting minimal range of values the data type can represent. For instance, as int is by default 2 bytes long and hence can represent values – 32768 to 32767 but when modifier unsigned appears before it, its range become 0 to 65,535.
16. setw() Manipulator
setw() Manipulator is an operator that can be inserted directly into input output statements to give the space. For example.
cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- genesis chapter 1 questions and answers
- biology 101 chapter 1 quiz
- chapter 1 psychology test answers
- strategic management chapter 1 quiz
- psychology chapter 1 questions and answers
- cooper heron heward chapter 1 powerpoint
- chapter 1 psychology quiz
- chapter 1 what is psychology
- chapter 1 cooper heron heward
- medical terminology chapter 1 quiz
- holt physics chapter 1 test
- dod fmr volume 2a chapter 1 definitions