SlideShare a Scribd company logo
1 of 29
Download to read offline
Collections and Generics

                                  Dr.Haitham A. El-Ghareeb

                                  Information Systems Department
                           Faculty of Computers and Information Sciences
                                        Mansoura University
                                        helghareeb@gmail.com


                                      September 30, 2012




Dr.Haitham A. El-Ghareeb (CIS)      Data Structures and Algorithms - 2012   September 30, 2012   1 / 13
Good News




                                 Received: 23 September 2012




Dr.Haitham A. El-Ghareeb (CIS)      Data Structures and Algorithms - 2012   September 30, 2012   2 / 13
Good News
                 http://www.helghareeb.me/courses/dsa-2012




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   3 / 13
Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collections
      A collection is a structured data type that stores data and provides
      operations for adding data to the collection.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collections
      A collection is a structured data type that stores data and provides
      operations for adding data to the collection.
      Operations include:




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collections
      A collection is a structured data type that stores data and provides
      operations for adding data to the collection.
      Operations include:
              removing data from the collection




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collections
      A collection is a structured data type that stores data and provides
      operations for adding data to the collection.
      Operations include:
              removing data from the collection
              updating data in the collection




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collections
      A collection is a structured data type that stores data and provides
      operations for adding data to the collection.
      Operations include:
              removing data from the collection
              updating data in the collection
              and operations for setting and returning the values of different
              attributes of the collection.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   4 / 13
Collection Types
Collections can be broken down into two types: linear and nonlinear.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   5 / 13
Collection Types
Collections can be broken down into two types: linear and nonlinear.
      A linear collection is a list of elements where one element follows the
      previous element.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   5 / 13
Collection Types
Collections can be broken down into two types: linear and nonlinear.
      A linear collection is a list of elements where one element follows the
      previous element.
      Elements in a linear collection are normally ordered by position (first,
      second, third, etc.).




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   5 / 13
Collection Types
Collections can be broken down into two types: linear and nonlinear.
      A linear collection is a list of elements where one element follows the
      previous element.
      Elements in a linear collection are normally ordered by position (first,
      second, third, etc.).
      Nonlinear collections hold elements that do not have positional order
      within the collection.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   5 / 13
Collection Types
Collections can be broken down into two types: linear and nonlinear.
      A linear collection is a list of elements where one element follows the
      previous element.
      Elements in a linear collection are normally ordered by position (first,
      second, third, etc.).
      Nonlinear collections hold elements that do not have positional order
      within the collection.
      An organizational chart is an example of a non- linear collection.




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   5 / 13
Collection Properties and Methods




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   6 / 13
Collection Properties and Methods
     Collection Property is the collections Count, which holds the number
     of items in the collection.




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   6 / 13
Collection Properties and Methods
     Collection Property is the collections Count, which holds the number
     of items in the collection.
     Collection operations, called methods, include:
             Add (for adding a new element to a collection)
             Insert (for adding a new element to a collection at a specified index)
             Remove (for removing a specified element from a collection)
             Clear (for removing all the elements from a collection)
             Contains (for determining if a specified element is a member of a
             collection)




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   6 / 13
Linear Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   7 / 13
Linear Collections
      Direct Access Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   7 / 13
Linear Collections
      Direct Access Collections
      Sequential Access Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   7 / 13
Linear Collections
      Direct Access Collections
      Sequential Access Collections
      Generalized Indexed Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   7 / 13
Struct

                                              DEMO




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   8 / 13
Non Linear Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   9 / 13
Non Linear Collections
      Hierarchical Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   9 / 13
Non Linear Collections
      Hierarchical Collections
      Group Collections




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   9 / 13
My Collection Class

                                              DEMO




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   10 / 13
Generic Programming

                                             DEMO




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   11 / 13
Oversimplified Timing Tests

                                             DEMO




Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   12 / 13
Charting in .Net

                                              DEMO




 Dr.Haitham A. El-Ghareeb (CIS)   Data Structures and Algorithms - 2012   September 30, 2012   13 / 13

More Related Content

What's hot

9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
15. STL - Data Structures using C++ by Varsha Patil
15. STL - Data Structures using C++ by Varsha Patil15. STL - Data Structures using C++ by Varsha Patil
15. STL - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
5. Queue - Data Structures using C++ by Varsha Patil
5. Queue - Data Structures using C++ by Varsha Patil5. Queue - Data Structures using C++ by Varsha Patil
5. Queue - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
6. Linked list - Data Structures using C++ by Varsha Patil
6. Linked list - Data Structures using C++ by Varsha Patil6. Linked list - Data Structures using C++ by Varsha Patil
6. Linked list - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
1. Fundamental Concept - Data Structures using C++ by Varsha Patil
1. Fundamental Concept - Data Structures using C++ by Varsha Patil1. Fundamental Concept - Data Structures using C++ by Varsha Patil
1. Fundamental Concept - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
12. Heaps - Data Structures using C++ by Varsha Patil
12. Heaps - Data Structures using C++ by Varsha Patil12. Heaps - Data Structures using C++ by Varsha Patil
12. Heaps - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...Linkages to EHRs and Related Standards. What can we learn from the Parallel U...
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...Koray Atalag
 
7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patilwidespreadpromotion
 
10 Algorithms in data mining
10 Algorithms in data mining10 Algorithms in data mining
10 Algorithms in data miningGeorge Ang
 
Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the wallsHoang Nguyen
 
A simple web-based interface for advanced SNOMED CT queries
A simple web-based interface for advanced SNOMED CT queriesA simple web-based interface for advanced SNOMED CT queries
A simple web-based interface for advanced SNOMED CT queriesSnow Owl
 
Clinical modelling with openEHR Archetypes
Clinical modelling with openEHR ArchetypesClinical modelling with openEHR Archetypes
Clinical modelling with openEHR ArchetypesKoray Atalag
 
Why ICT Fails in Healthcare: Software Maintenance and Maintainability
Why ICT Fails in Healthcare: Software Maintenance and MaintainabilityWhy ICT Fails in Healthcare: Software Maintenance and Maintainability
Why ICT Fails in Healthcare: Software Maintenance and MaintainabilityKoray Atalag
 
J48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance DataJ48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance DataCSCJournals
 

What's hot (18)

9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil
 
15. STL - Data Structures using C++ by Varsha Patil
15. STL - Data Structures using C++ by Varsha Patil15. STL - Data Structures using C++ by Varsha Patil
15. STL - Data Structures using C++ by Varsha Patil
 
5. Queue - Data Structures using C++ by Varsha Patil
5. Queue - Data Structures using C++ by Varsha Patil5. Queue - Data Structures using C++ by Varsha Patil
5. Queue - Data Structures using C++ by Varsha Patil
 
6. Linked list - Data Structures using C++ by Varsha Patil
6. Linked list - Data Structures using C++ by Varsha Patil6. Linked list - Data Structures using C++ by Varsha Patil
6. Linked list - Data Structures using C++ by Varsha Patil
 
3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil3. Stack - Data Structures using C++ by Varsha Patil
3. Stack - Data Structures using C++ by Varsha Patil
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
 
10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil10. Search Tree - Data Structures using C++ by Varsha Patil
10. Search Tree - Data Structures using C++ by Varsha Patil
 
1. Fundamental Concept - Data Structures using C++ by Varsha Patil
1. Fundamental Concept - Data Structures using C++ by Varsha Patil1. Fundamental Concept - Data Structures using C++ by Varsha Patil
1. Fundamental Concept - Data Structures using C++ by Varsha Patil
 
12. Heaps - Data Structures using C++ by Varsha Patil
12. Heaps - Data Structures using C++ by Varsha Patil12. Heaps - Data Structures using C++ by Varsha Patil
12. Heaps - Data Structures using C++ by Varsha Patil
 
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...Linkages to EHRs and Related Standards. What can we learn from the Parallel U...
Linkages to EHRs and Related Standards. What can we learn from the Parallel U...
 
7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil
 
Data structures list
Data structures listData structures list
Data structures list
 
10 Algorithms in data mining
10 Algorithms in data mining10 Algorithms in data mining
10 Algorithms in data mining
 
Data abstraction the walls
Data abstraction the wallsData abstraction the walls
Data abstraction the walls
 
A simple web-based interface for advanced SNOMED CT queries
A simple web-based interface for advanced SNOMED CT queriesA simple web-based interface for advanced SNOMED CT queries
A simple web-based interface for advanced SNOMED CT queries
 
Clinical modelling with openEHR Archetypes
Clinical modelling with openEHR ArchetypesClinical modelling with openEHR Archetypes
Clinical modelling with openEHR Archetypes
 
Why ICT Fails in Healthcare: Software Maintenance and Maintainability
Why ICT Fails in Healthcare: Software Maintenance and MaintainabilityWhy ICT Fails in Healthcare: Software Maintenance and Maintainability
Why ICT Fails in Healthcare: Software Maintenance and Maintainability
 
J48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance DataJ48 and JRIP Rules for E-Governance Data
J48 and JRIP Rules for E-Governance Data
 

Viewers also liked

24 Tirthankaras
24 Tirthankaras24 Tirthankaras
24 TirthankarasHeena Modi
 
Evolving Trends and Fashion in Egypt with Jean Fares
Evolving Trends and Fashion in Egypt with Jean FaresEvolving Trends and Fashion in Egypt with Jean Fares
Evolving Trends and Fashion in Egypt with Jean FaresNorma HAYEK
 
Milieu Problematiek
Milieu ProblematiekMilieu Problematiek
Milieu ProblematiekT_COOLS
 
Buffalo Social Media Summit Presentation
Buffalo Social Media Summit PresentationBuffalo Social Media Summit Presentation
Buffalo Social Media Summit PresentationChris Treadaway
 
Poonam and jaimin’s wedding day
Poonam and jaimin’s wedding dayPoonam and jaimin’s wedding day
Poonam and jaimin’s wedding dayHeena Modi
 
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...Twig Lane Group, LLC
 
The story of an egg from start to finish
The story of an egg from start to finishThe story of an egg from start to finish
The story of an egg from start to finishHeena Modi
 
Porting the QALL-ME framework to Romanian
Porting the QALL-ME framework to RomanianPorting the QALL-ME framework to Romanian
Porting the QALL-ME framework to RomanianConstantin Orasan
 
Social Media for Local Businesses
Social Media for Local BusinessesSocial Media for Local Businesses
Social Media for Local BusinessesChris Treadaway
 
Linked In Presentation
Linked In PresentationLinked In Presentation
Linked In PresentationBenaud Jacob
 
Gather - a wide range of vegan dishes that excited and pleased the taste buds!
Gather - a wide range of vegan dishes that excited and pleased the taste buds!Gather - a wide range of vegan dishes that excited and pleased the taste buds!
Gather - a wide range of vegan dishes that excited and pleased the taste buds!Heena Modi
 

Viewers also liked (20)

24 Tirthankaras
24 Tirthankaras24 Tirthankaras
24 Tirthankaras
 
Evolving Trends and Fashion in Egypt with Jean Fares
Evolving Trends and Fashion in Egypt with Jean FaresEvolving Trends and Fashion in Egypt with Jean Fares
Evolving Trends and Fashion in Egypt with Jean Fares
 
Milieu
MilieuMilieu
Milieu
 
Milieu Problematiek
Milieu ProblematiekMilieu Problematiek
Milieu Problematiek
 
Buffalo Social Media Summit Presentation
Buffalo Social Media Summit PresentationBuffalo Social Media Summit Presentation
Buffalo Social Media Summit Presentation
 
Poonam and jaimin’s wedding day
Poonam and jaimin’s wedding dayPoonam and jaimin’s wedding day
Poonam and jaimin’s wedding day
 
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...
ICC/Decision Services...Beyond Customer Service...What Mystery Shopping Can D...
 
Adjective Jingle
Adjective JingleAdjective Jingle
Adjective Jingle
 
Ph.D. Registeration seminar
Ph.D. Registeration seminarPh.D. Registeration seminar
Ph.D. Registeration seminar
 
The story of an egg from start to finish
The story of an egg from start to finishThe story of an egg from start to finish
The story of an egg from start to finish
 
IOS-Basic Configuration
IOS-Basic ConfigurationIOS-Basic Configuration
IOS-Basic Configuration
 
Porting the QALL-ME framework to Romanian
Porting the QALL-ME framework to RomanianPorting the QALL-ME framework to Romanian
Porting the QALL-ME framework to Romanian
 
Social Media for Local Businesses
Social Media for Local BusinessesSocial Media for Local Businesses
Social Media for Local Businesses
 
Dallas SMC Presentation
Dallas SMC PresentationDallas SMC Presentation
Dallas SMC Presentation
 
Linked In Presentation
Linked In PresentationLinked In Presentation
Linked In Presentation
 
Wordprobs3
Wordprobs3Wordprobs3
Wordprobs3
 
Edward hopper
Edward hopperEdward hopper
Edward hopper
 
Gather - a wide range of vegan dishes that excited and pleased the taste buds!
Gather - a wide range of vegan dishes that excited and pleased the taste buds!Gather - a wide range of vegan dishes that excited and pleased the taste buds!
Gather - a wide range of vegan dishes that excited and pleased the taste buds!
 
Painted Hands
Painted HandsPainted Hands
Painted Hands
 
Kansas sights
Kansas sightsKansas sights
Kansas sights
 

More from Haitham El-Ghareeb (20)

مختصر وحدة التعلم الذاتي 2015
مختصر وحدة التعلم الذاتي 2015مختصر وحدة التعلم الذاتي 2015
مختصر وحدة التعلم الذاتي 2015
 
وحدة التعلم الذاتي 2015
وحدة التعلم الذاتي 2015وحدة التعلم الذاتي 2015
وحدة التعلم الذاتي 2015
 
NoSQL Databases, Not just a Buzzword
NoSQL Databases, Not just a Buzzword NoSQL Databases, Not just a Buzzword
NoSQL Databases, Not just a Buzzword
 
EMC Academic Alliance Presentation
EMC Academic Alliance PresentationEMC Academic Alliance Presentation
EMC Academic Alliance Presentation
 
DSA - 2012 - Conclusion
DSA - 2012 - ConclusionDSA - 2012 - Conclusion
DSA - 2012 - Conclusion
 
Data Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study NotesData Structures - Lecture 8 - Study Notes
Data Structures - Lecture 8 - Study Notes
 
LectureNotes-06-DSA
LectureNotes-06-DSALectureNotes-06-DSA
LectureNotes-06-DSA
 
LectureNotes-05-DSA
LectureNotes-05-DSALectureNotes-05-DSA
LectureNotes-05-DSA
 
LectureNotes-04-DSA
LectureNotes-04-DSALectureNotes-04-DSA
LectureNotes-04-DSA
 
LectureNotes-03-DSA
LectureNotes-03-DSALectureNotes-03-DSA
LectureNotes-03-DSA
 
LectureNotes-02-DSA
LectureNotes-02-DSALectureNotes-02-DSA
LectureNotes-02-DSA
 
LectureNotes-01-DSA
LectureNotes-01-DSALectureNotes-01-DSA
LectureNotes-01-DSA
 
Lecture-05-DSA
Lecture-05-DSALecture-05-DSA
Lecture-05-DSA
 
Learn Latex
Learn LatexLearn Latex
Learn Latex
 
Research Methodologies - Lecture 02
Research Methodologies - Lecture 02Research Methodologies - Lecture 02
Research Methodologies - Lecture 02
 
Lecture 01 - Research Methods
Lecture 01 - Research MethodsLecture 01 - Research Methods
Lecture 01 - Research Methods
 
Python Tutorial Part 2
Python Tutorial Part 2Python Tutorial Part 2
Python Tutorial Part 2
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Mozilla B2G
Mozilla B2GMozilla B2G
Mozilla B2G
 
Cisco ios-cont
Cisco ios-contCisco ios-cont
Cisco ios-cont
 

Recently uploaded

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 

Recently uploaded (20)

Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 

DSA - Lecture 03

  • 1. Collections and Generics Dr.Haitham A. El-Ghareeb Information Systems Department Faculty of Computers and Information Sciences Mansoura University helghareeb@gmail.com September 30, 2012 Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 1 / 13
  • 2. Good News Received: 23 September 2012 Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 2 / 13
  • 3. Good News http://www.helghareeb.me/courses/dsa-2012 Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 3 / 13
  • 4. Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 5. Collections A collection is a structured data type that stores data and provides operations for adding data to the collection. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 6. Collections A collection is a structured data type that stores data and provides operations for adding data to the collection. Operations include: Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 7. Collections A collection is a structured data type that stores data and provides operations for adding data to the collection. Operations include: removing data from the collection Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 8. Collections A collection is a structured data type that stores data and provides operations for adding data to the collection. Operations include: removing data from the collection updating data in the collection Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 9. Collections A collection is a structured data type that stores data and provides operations for adding data to the collection. Operations include: removing data from the collection updating data in the collection and operations for setting and returning the values of different attributes of the collection. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 4 / 13
  • 10. Collection Types Collections can be broken down into two types: linear and nonlinear. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 5 / 13
  • 11. Collection Types Collections can be broken down into two types: linear and nonlinear. A linear collection is a list of elements where one element follows the previous element. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 5 / 13
  • 12. Collection Types Collections can be broken down into two types: linear and nonlinear. A linear collection is a list of elements where one element follows the previous element. Elements in a linear collection are normally ordered by position (first, second, third, etc.). Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 5 / 13
  • 13. Collection Types Collections can be broken down into two types: linear and nonlinear. A linear collection is a list of elements where one element follows the previous element. Elements in a linear collection are normally ordered by position (first, second, third, etc.). Nonlinear collections hold elements that do not have positional order within the collection. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 5 / 13
  • 14. Collection Types Collections can be broken down into two types: linear and nonlinear. A linear collection is a list of elements where one element follows the previous element. Elements in a linear collection are normally ordered by position (first, second, third, etc.). Nonlinear collections hold elements that do not have positional order within the collection. An organizational chart is an example of a non- linear collection. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 5 / 13
  • 15. Collection Properties and Methods Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 6 / 13
  • 16. Collection Properties and Methods Collection Property is the collections Count, which holds the number of items in the collection. Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 6 / 13
  • 17. Collection Properties and Methods Collection Property is the collections Count, which holds the number of items in the collection. Collection operations, called methods, include: Add (for adding a new element to a collection) Insert (for adding a new element to a collection at a specified index) Remove (for removing a specified element from a collection) Clear (for removing all the elements from a collection) Contains (for determining if a specified element is a member of a collection) Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 6 / 13
  • 18. Linear Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 7 / 13
  • 19. Linear Collections Direct Access Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 7 / 13
  • 20. Linear Collections Direct Access Collections Sequential Access Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 7 / 13
  • 21. Linear Collections Direct Access Collections Sequential Access Collections Generalized Indexed Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 7 / 13
  • 22. Struct DEMO Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 8 / 13
  • 23. Non Linear Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 9 / 13
  • 24. Non Linear Collections Hierarchical Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 9 / 13
  • 25. Non Linear Collections Hierarchical Collections Group Collections Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 9 / 13
  • 26. My Collection Class DEMO Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 10 / 13
  • 27. Generic Programming DEMO Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 11 / 13
  • 28. Oversimplified Timing Tests DEMO Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 12 / 13
  • 29. Charting in .Net DEMO Dr.Haitham A. El-Ghareeb (CIS) Data Structures and Algorithms - 2012 September 30, 2012 13 / 13