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

Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxElton John Embodo
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxRosabel UA
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsRommel Regala
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 

Recently uploaded (20)

Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
EMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docxEMBODO Lesson Plan Grade 9 Law of Sines.docx
EMBODO Lesson Plan Grade 9 Law of Sines.docx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Presentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptxPresentation Activity 2. Unit 3 transv.pptx
Presentation Activity 2. Unit 3 transv.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
The Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World PoliticsThe Contemporary World: The Globalization of World Politics
The Contemporary World: The Globalization of World Politics
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 

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