Data structure

443 views
413 views

Published on

This only for Beginners made
my university teacher Monirul Hasan (Tomal)

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
443
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Data structure

  1. 1. 1Lecture 1Abstract Data Type andObject Oriented Programming
  2. 2. 2Data and Information Data are plain facts Abul 172 85 Processed, organized, presented data thatconvey some meaning are information Abul is 172 cm tall and his weight is 85 KG Data Structure The way/technique of storing/organizing data sothat it can be processed efficiently
  3. 3. 3Data types and variables Variables are like boxes We can store items in them Add more, take off items as needed Different items need different type of boxes tostore them Tea stall analogy Data types define the type of the data, range ofvalues that can be stored in them andoperations that are allowed on them
  4. 4. 4Primitive Data Types Built in data types – basic building blocks C/C++ has the following primitive data types: char short int long long long float double long double
  5. 5. 5Abstract Data Types (ADT) Mathematical model of a datatype, not necessarily tied toany particular programminglanguage Defines the abstract datastructure for content Defines the operations that arepermitted on them Examples: Student Queue
  6. 6. 6Programming Techniques orParadigms Unstructured Programming Main program working directly on global data Procedural Programming Related, meaningful and repeatable statementsgrouped into procedures and called as needed Modular Programming Procedures of common purposes grouped togetherinto modules Object Oriented Programming Centered around the objects that interact with eachother
  7. 7. 7Key OOP Concepts Class An idea An actual representation of an ADT Object A real existence An instance of a class Example: Class is a blueprint that architects produce Objects are the buildings that builders build
  8. 8. 8OOP Concepts … continued Abstraction Hiding details that you need not be aware of Encapsulation Access to data is only permitted through definedmethods Relations Is-a Part-of Has-a
  9. 9. 9Inheritance Base class or Superclass Derived class or Subclass Data members(attributes) andmethods can beinherited Access modifiers canbe used to controlinheritance
  10. 10. 10Access modifiers Private Protected Public Mailbox, Television and Safe analogy Usual practice is to keep data members privateand methods public
  11. 11. 11Polymorphism Base classes pointer can be used to refer tosub classes object Why is it useful?

×