Definitions Flashcards
(45 cards)
ENCAPSULATION
> Process of combining data members and functions in a single unit called class.
Prevent the access to the data directly.
Access to member function is provided through the functions of the class.
Helps with data hiding.
char
Size = 1 byte (8 bits)
2^{8} = 256
One ASCII character
EX: ‘f’
unsigned int
Size = 4 bytes (32 bits)
2^{32}
Binary int
*Positive numbers only
float
Size = 4 bytes (32 bits)
2^{32}
Floating point number
EX: 3.141592
double
Size = 8 bytes (64 bits)
2^{64}
Floating point number
EX: 3.141592653589793
signed int
Size = 4 bytes (32 bits) 2^{32} Binary int *Half positive / half negative numbers ** Using two's compliment to negate number
Calculate a simple two’s compliment
- Flip bits
- Add 1
Ex: 5 (0101)
Flip: 1010
Add 1: 1011
%c
Single Character
Bytes = 1
Char / Signed Char = -128 - 127
Unsigned Char = 0 - 255
%d
decimal integer
%u
unsigned decimal integer
%o
octal
%x
unsigned hexidecimal number
%f
decimal floating point
%e
scientific notation
%s
string
%%
prints % symbol
%f
%.nf
%mf
%m.nf
%f = default: show 6 decimal places %.nf = Show nth decimal places %mf = prints with minimum width m %m.nf = n decimal places & minimum width m
Front End Development
Build code for user interaction
EX: GUI, Phone APPS
Back End Development
Code that works behind the scenes away from user interfacing. Low level progamming.
EX: Device drivers, complex algorithims
Middleware
SW that bridges the low level and user high level SW
EX: Send BT CAN data to the GUI or APP
Type Promotion
When the two operands have different types, the compiler attempts to add a type conversion to make the types the same.
Casting
Occasions when you or the compiler may have to temporarily treat the variable as though it were of another type.
Overflow
An operation results in a number that is too large to be represented by the result type of the operation.
Underflow
An operation results in a number that is too small to be represented by the result type of the operation.