LESSON 1 OBJECT ORIENTED CONCEPTS USING C++
1. Computer program operates on a set of known input data items.
2. input and output data items were represented as variables
3. Data types categorize the input data items.
4. Solution of a problem as two separate segments. (data and operations)*
5. C++ was object oriented. *
6. Group of data and operations are termed as objects. *
7. state refers to physical features
8. Behavior refers to kind of functions it can perform.
9. Object is a group of related functions and data that serves functions. *
10. Object is a kind of a self sufficient subprogram with a specific functional area. *
11. object oriented model entities real world *
12. mechanism by which data and functions are bound together is called encapsulation *
13. Objects make it easy to represent real system in software programs.
14. Different response to different inputs is called polymorphism. *
15. Ability of an object to respond differently to different messages is called polymorphism. *
16. derived classes are power packed as they include the functionality of the base class *
17. process of acquiring base class is called inheritance *
18. Inheritance increases the functionality of a derived class.
19. Inheritance promotes reusability of code.
20. Class allows programs to organize as objects. *
21. data hiding or abstraction provides security to data
22. polymorphism reduces software complexity
23. Polymorphism provides multiple definitions to an operator or function.
24. inheritance promote insertion of updated modules
25. Each object has a specific role to play and coordinated working of all modules produces end result.
26. object communicates with one another sending data as inputs
OVERVIEW OF C++
1. C++ was developed by AT & T BELL LABORATORIES.
2. C++ was developed by Bjarne Stroutstrup in 1980.
3. C++ was coined by Rick Mascitti
4. Tokens are the basic elements essential for programming coding.
5. Basic types are collectively called as tokens.
6. Keywords have special meaning to the language compiler.
7. Keywords are reserved words for special purpose.
8. Identifiers are also called as variables.
9. variables are memory boxes that hold values or constants.
10. Constants are data items whose values cannot be changed.
11. Octal constant starts with 0
12. hexadecimal constant starts with Ox
13. floating point constant is a signed real number
14. Character constant is a constant that contains a single character enclosed within single quotes.
15. Escape sequences are non graphic character constants.
16. escape sequences are prefixed with a backslash
17. \t stands for horizontal tab
18. \a for bell and \n for new line
19. String literal is a sequence of characters surrounded by double quotes.
20. String literal are treated as array of characters.
21. ‘\O’ marks the end of string.
22. Operator specifies operation to be performed that yields a value.
23. Operand is an entity on which operator acts.
24. there are 13 types of operators in C++
25. Based on operand requirement there are 3 types of operators.
26. Arithmetic operators are used to perform mathematical operations.
27. logical grouping of operators and operands are called associativity
28. Relational operators are used to compare values.
29. Logical operators combine the result of one or more conditions.
30. Conditional operator (? :) is a ternary operator.
31. = is an assignment operator.
32. There are 10 shorthand assignment operators.
33. Punctuators are characters with specific functions.
34. ; terminates c++ statement
35. // for single line comment
36. /* */ for multi line comment
37. There are 3 categories of data types.
38. Data types are kind of data that variable can hold.
39. User defined data type improves readability of the program.
40. Enumerated data type helps in creating list of identifiers.
41. Enumerated is also called as symbolic numeric constants.
42. There are 4 storage specifiers.
43. Auto variables are not initialized automatically.
44. Auto variables get undefined values known as garbage.
45. auto is default storage class
46. Static variables retain the last assigned value.
47. Built in data types is the other name for fundamental or basic data type.
48. There are 3 fundamental data types.
49. ASCII value of A is 65
50. Void does not have a return value.
51. pointer is a variable that holds a memory address of other variables
52. Every byte in the computer memory holds address.
53. Amount of memory allocated depends on the data type.
54. & is the address of operator
55. * is the value at operator.
56. * is a unary operator.
57. name assigned to a data field that can assume any set of values is called variable
58. variables are user defined named entities of memory locations that store data *
59. Variables are allocated memory to store datas.
60. variable names should be separated by comma
61. Integer values are stored in 16 bit form.
62. 15 bits are used to store data
63. maximum value stored in an integer is +32767 and minimum value is -32768
64. 16th bit is the most significant bit.
65. range to store data is up to 216 and the maximum value is 65535
66. Modifier alters the base data type to yield a new type.
67. Const specifies value of a variable will not change at run time.
68. implicit conversions refers to the data type changes brought about by the compiler
69. size of returns the size or memory requirement in term of bytes
70. process of changing the data type of the value stored in a variable is typecasting
1. There are two methods for assigning data to the variable.
2. cin is a predefined object that corresponds to a standard input stream
3. the declaration for the object cin are available in a header file called istream.h
4. Iostream.h combines the properties of istream and ostream.
5. A headerfile comprises of all standard declarations and definitions for predefined functions.
6. One can include a header file using a preprocessor directive.
7. A preprocessor directive starts with #
9. >> is the extraction or get from operator.
10. << is called the insertion operator or put to operator
11. cascading of Insertion operator facilitates sending of multiple output via a single statement
12. A c++ program has primarily 3 sections.
13. Declaration of a variable introduces a variables name and its associated data type.
14. If a declaration sets aside memory for the variable it is called definition.
15. Pointer variable gets defined by using a new memory operator.
16. = is an assignment operator.
17. program statements that causes flow of control from one part to another part is called control structures.
18. There are 2 categories of control structures.
19. Switch creates branching for multiple alternatives sections of code.
20. if-else statement chooses between two alternatives
21. Loops execute a set of instructions repeatedly for certain number times.
22. A looping block consists of 2 segments
23. there are 3 kinds of loops in C++
24. do while is a exit check loop
25. while is a entry check loop
26. for loop is a entry controlled loop
27. A for loop consists of 3 segments
28. each segment in a for loop is separated by a comma operator
29. Continue statement forces the next iteration of the loop to take place skipping any code following continue.
30. break statement would exit the current loop only
31. break accomplishes jump from the current loop
32. Programs are written in high level language.
33. Program in high level language is called source code.
34. source code is converted into machine readable code called object file
35. Compiler creates object files.
36. compilers are translators
37. compiler checks for the grammar of the language
38. object file is linked with libraries to generate executable file
39. variables used in control structures are called control variables
40. inner loop must be completely nested inside the body of the outer loop
1. Functions are the building blocks of a c++ programs.
2. Functions are also the executable segments in a program.
3. the starting point of the execution of a program is main()
4. Functions reduce the size of the program and induce reusability of code.
5. declaration of a function is made through a function prototype
6. function prototype helps the compiler to check the data
7. Variables in the prototype act as place holders.
8. a function can be called from another using its name
9. parameters are the channels through which data flows the call statement to the function
10. actual parameters are parameters associated with call statement
11. Formal parameters are parameters associated with function header.
12. function creates its own copy of the arguments
13. In a call by value any change in the formal parameter is not reflected back to the actual parameter
14. In a call by reference any change in the formal parameter is reflected back in the actual parameter
15. In “call by value” actual parameters can be passed in the form of constants or variables or expressions.
16. actual parameters can be passéd only as variables to formal parameters of reference type
17. In c++ one can assign default values to the parameters of a function prototype using default arguments.
18. default value is given in the form of variable initialization
19. stacks would save certain special instructions pertaining to a function call
20. inline functions looks like a normal function but inserts the function code directly into the calling program
21. inline function execute faster but require more memory space
22. Scope refers to the accessibility of a variable.
23. there are 4 types of scopes in c++
24. local variable is defined within a block
25. local variable cannot be accessed from outside the block
26. local variable is created uon entry and destroyed upon exit
27. life time of a function scope variable is the life time of the function block
28. variables declared above all blocks above main has file scope
29. scope of file scope variable is the entire program
30. Scope resolution operator:: reveals the hidden scope of a variable.
1. Array is a derived data type.
2. Array can hold several values of the same type.
3. For handling large data elements belonging to the same data type arrays can be used.
4. Array is of 2 types.
5. Single dimensional array is suitable for processing list of items of identical types.
6. Size of the array should always be positive.
7. memory required for 1 integer is 2 bytes
8. array subscript should always commence from zero
9. Process of rearranging data in a given array either in a ascending or descending order is called sorting.
10. Strings are otherwise called as literals.
11. strings are single dimensional array of characters
12. character array or string should be terminated with a ‘\O’ null character
13. Cin treats white space or carriage return as terminator for string.
14. Gets treats spaces as a part of string literal.
15. gets belongs to stdio.h
16. getline belongs to standard input stream(istream)
17. syntax for gets is gets(char array identifier) or gets(char *)
18. syntax for getline is cin.getline(char *, no of characters, delimiter);
19. Write () is a member function of standard output stream.
20. write() has 2 parameters.(identifier, no of characters)
21. Strlen () returns no of characters.
22. Strcpy () copies source string to target string.
23. Strcmp () compares two string.
24. return value is 0 when strings are equal
25. value>0 if string1 is greater than string2
26. value<0 if string1 is less than string2
27. A two dimensional array is an array in which each element itself an array.
28. number of elements in a 2 dimensional array is determined by multiplying the no of rows with number of columns
29. dimensions of an array can be an integer,const identifier,ordinal,
Char constants, enum
30. 2-d array is stored in sequential memory blocks
31. size of the array is no of elements *memory req. for one element
32. arrays can be passed on as arguments to functions
33. actual parameters is passed only by identifier
34. array parameters by default behave like reference parameter
35. a matrix is a rectangular array of m rows and n columns
36. matrix is a 2 dimensional array
37. array is a 2 dimensional character array
38. size of the first index(row) in a string represents number of strings
39. size of the second index(column) in a string represents length of each string
40. if null character is not included in a string compiler will automatically attach it.
CLASSES AND OBJECTS
1. the most important feature of c++ is class
2. a class is a new way creating and implementing a user defined data type
3. Functions are also called as methods.
4. class is a way to bind data and its associated functions together
5. Class body has 3 access specifiers.
6. private members are accessed only from within the class and special functions called friend functions
7. protected members are accessed from within the class and inherited classes
8. public members are accessed outside the class
9. private member and functions are not accessible by members outside the class and it is referred as data hiding
10. data abstraction is achieved through data hiding
11. Instruments allowing only selected access of components to objects and to members of other classes is data abstraction.
12. data hiding is the key feature of OOPS
13. Members are classified into data members and member functions.
14. Data members are data variables that represent features or properties of a class.
15. Member functions are functions that perform specific task in a class.
16. Data members are also called as attributes.
17. Classes include special member functions called constructors and destructors.
18. class variables are known as object
19. members of a class are accessed using dot operator.
20. membership label tells the compiler that the function belongs to a particular class.
21. A member function calling another member fuction directly without using a dot operator is called nesting of member functions.
22. Member functions can be of static type.
23. data member can be qualified as static
24. static member is initialized to zero only when the first object is created
25. Scope of a static variable is within class but its lifetime is the lifetime of the program.
CONSTRUCTORS AND DESTRUCTORS.
1. When an instance of a class comes into scope a special function called constructors gets executed.
2. Constructor initializes class object.
3. when a class object goes out of scope special function called destructor gets executed.
4. Non parameterized constructor is called as default constructor.
5. The constructor add (int s1, int s2) is called as parameterized constructor.
6. The constructor add (add &a) is called as copy constructor.
7. copy constructor is executed when an object is passed as a parameter
8. Copy constructor is executed when a member functions returns an object.
9. Copy constructor is executed when an object is passed by reference to constructor.
10. Name of the constructor must be same as that of the class.
11. Compiler generates constructor in the absence of a user defined constructor.
12. destructor removes memory of an object
13. Destructor is prefixed with tilde.
14. destructors cannot have arguments
15. Destructor is executed automatically when the control reaches the end of the class scope.
1. inheritance is the process of creating new classes called derived classes from the existing class called base class
2. Base class is a class from which other classes are derived.
3. Derived class is a power packed class that inherits the members of the base class.
4. Reusability of code saves a lot of development time.
5. Code sharing is the method of sharing the base class methods by the derived class.
6. Inherited attributes and methods provide a similar interface to calling methods.
7. Accessibility is knowing when a member of a base class can be used by the objects or the members of the derived class.
8. Access specifier is also called as visibility mode.
9. default visibility mode is private
10. when a base class is inherited with private visibility mode, public and protected members of the base class become private members of the derived class
11. when a base class is inherited with protected visibility mode, public and protected members of the base class become protected members of the derived class
12. when a base class is inherited with private visibility mode, public and protected members of the base class become private members of the derived class
13. when a base class is inherited with public visibility mode, protected members of the base class become protected members of the derived class
14. when a base class is inherited with public visibility mode, public members of the base class become public members of the derived class
15. Constructors of base class are not inherited but executed when an instance of the derived class is created.
16. When a derived class inherits only from one base class it is called single inheritance.
17. When a derived class inherits from multiple base classes it is known as multiple inheritance.
18. the transitive nature of inheritance is reflected by multilevel inheritance
19. When a class is derived from a class which is a derived class itself it is called multilevel inheritance.
20. classes used only for deriving other classes are called abstract classes
21. objects for the abstract classes are declared.
22. Constructors are executed in the order of inherited class from base constructor to derive.
23. destructors are executed from derived class to base class
IMPACT OF COMPUTERS ON SOCIETY
1. To reach out the benefits of IT to the common man need 3 technical elements.
2. 85% of computer usage is word processing
3. Archive unit enables data storage and management.
4. Emotion containers are small compartments with screen, speaker and scent to derive emotional comfort.
5. Emotion container prevents people from acquiring bad habits.
6. Personal archive is used to store personal details and enable connectivity to other people.
7. Kara-oke features allow one to sing along with the audio coming from the original source.
8. Robots functions as electronic pets.
9. Easy interaction with other people through touch screen, scanner and microphone facilities is called memo frame.
10. Personal creativity tool is used to draw capture and work with multimedia elements.
11. Banks are the key factor in the national economy.
12. ATM enables withdrawal of money from bank anywhere and anytime.
14. CBT is a computer based tutorials
15. E-banking provides banking from the comfort of the home by using internet facilities.
16. E-learning enables online educational programs leading to degree and certification.
17. Farming and agriculture might seem like a low technology enterprise.
18. revenue estimators help them plan which crops will produce the highest profits
19. Satellite imagery is used to decide on the crops.
LESSON – 11 – ITES
1. The facility that allows the user to speak into a special device called __________ ( Dictaphone’)
2. The expansion for BPO __________( Business Process Outsourcing)
3. _____________ (e governance) help us to look at the government and services provided by them.
4. A ______________ (call center) is a telephone based shared service center for specific customer activities.
5. _______________ (data management) is a category of ITES pertaining to collection, digitization and processing of data coming from various sources.
6. ______________ (data management) is the key for effective and profitable used of IT in organization.
7. Banking , Financial Services and insurance sectors are popularly termed as _____________________(BFSI)
8. __________ (Data Security) and _______________( customer privacy) are two important aspects that must be ensured by the ITES provider.
9. _________(Medical transcription) is a permanent , legal document that formally states the result of a medical investigation.
10. There are ___________ (three) main steps involved in medical transcription.
11. The conversion of non-digital material to digital form is ______( digitization)
Lesson – 12 – computer ethics
1. __________ ( physical security )refers to the protection of hardware, facilities magnetic disks etc.,
2. ___________-(personal security) refers to software setup that permits only authorized access to the system.
3. __________ refers to protecting data and computer system against dishonesty or negligence of employees.
4. ___________ is any illegal activity using computer software data or access as the object, subject or instrument of the crime.
5. Making and using duplicate hardware and software is called ________ (piracy).
6. ____________ (virus) is a self-replicating program that causes damage to data and files stored on our computer.
7. ___________ (virus) is a program written by programmers to cause damage to data and files stored.
8. Some other software runs on an idle computer without the knowledge of the organization is called theft of _________ (computer time).
9. The ‘Ten commandments of Computer Ethics ‘ written by _________(computer ethics institute)
10. India has _________ (cyber laws) to prevent computer crimes.
11. ___________ (cracking) is the illegal access to the network or computer system.
12. _________ (illegal) use of special resources in the system is the key reason for cracking.
LESSON 1 OBJECT ORIENTED CONCEPTS USING C++
More articles: Computer