COMPUTER 9 by umar (all lessons) Flashcards
is an object-oriented programming language
C++
origin of C++
C
Who created C++?
Bells Lab by Bjorne Stroustrup
In what year was C++ made?
1979
models real world objects
Object-Oriented Program (OOP)
concrete and abstract objects
Objects
template or blueprint from which objects are created
Class
process of combining data and function to form a class or object
(e.g students, teacher.)
Encapsulation
process wherein an object acquires the characteristicss of one or more objects
(e.g mother, son. windows 7, windows 10)
Inheritance
ability of a variable, function, or object to take on multiple forms
(e.g laptop, desktop. phone, android)
Polymorphism
a free open source, cross platform IDE that supports multiple compilers
Code Blocks IDE
IDE stands for?
Integrated Development Environment
4 panels of Code Blocks
Management
Editor
Logs and Others
Status Bar
This panel contains project tab which displays all open project.
Management
this panel is where you type your code.
Editor
This window is used to search the results and message.
Logs and Others
Current state of the file
Management
turns the code that you have written to an executable program
Compiler
Parts of C++ Program
objects, functions, variables, expressions, constants, and a host of other components.
used to output something on the console.
Cout
it indicates the output
«_space;(2 lesser than signs)
always end with this symbol
semicolon
to show whether or not the function was successfully executed.
Return
A value of _ means success
0
string is for?
text
is a program that processes a source file before the main complation takes place
Preprocessory directive
is an c++ feature designed to simplify the writing of large programs.
Namespace
this is the namespace were the classes, functions, and variables that are standard components to compilers.
Std
are lines of code that are not executed during the program.
Comments
2 types of comments
single line & and multi line
this enables the entire statement
single line comment
this enables multiple statements
multi line comments
is an instructional code that commands the computer to do a certain action upon its execution.
Statement
are reserved words in a programming language that have specific use.
Keyboards
__ of a variable determines what kind of values it can store.
Data type
a data type returns either true or false. 1 is true value, while 0 is false
Boolean
are user defined words used to represent a value
Identifiers
are identifiers whose valie may change during execution of the program.
Variables
rules in naming Identifiers
— it start with a letter or underscore.
— no special characters except underscore.
— reserved words are not allowed.
is a variable declared in the main body of the source code, outside all functions.
Global Variable
is a variable declared within the body of function or a block.
Local Variable
2 types of Variables
Global and Local
are identifiers whose value cannot change during program.
ex. const – const in day = 7
Constants
statement output what is within the statement.
Cout
a special c++ notation that causes the screen cursor to move to the beginning of the next line.
Endl