2. Data structures
We have already learned how groups of sequential data
can be used in C++
But this is somewhat restrictive, since in many occasions
what we want to store are not mere sequences of
elements all of the same data type , but sets
of different elements with different data types.
3. Data structures ( Cont… )
A data structure is a group of data elements grouped
together under one name
These data elements, known as members , can
have different types and different lengths
4. What about data structures
Structure: how data is organized
Place data continue
Place data here and there with “links”
Place data with “formula”
5. What about algorithms
Algorithms: how to access data for a result
Scan data sequentially
Scan data according to the sequence of a structure
Scan data with “formula”
Algorithms: how to provide a smart solution
6. Basic data types – the simplest data structure
Basic data types a language supports:
Integer, float, double, char, Boolean , String
7. Basic Data structures
A single datum in one of the basic types
A structure is a combination of the basic types
16. What the different between :
Program & Algorithm ?
Program
Syntax (Machine Languages)
Algorithm
Semantic (Natural Languages ) or ( Human Languages)
18. الخوارزميات في تتوفر التي المواصفات:
1- Input (less value 0 )
2- Output (less value 1)
3- Instruction
4- End ( Number of Steps )
19. The Relationship between Algorithms & Data
structure :-
الكائنات دمج نتيجة هي البيانات هياكل(Objects )الخوارزميات مع
What is the Object ?
Anything is an Object
Any Object Has :
Attributes خصائص
Functions أفعال