data structures - github pages · 2017-03-01 · module description q ... q data structures...

27
Data Structures David Drohan | [email protected] 00 – Introduction

Upload: others

Post on 06-Apr-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Data Structures

David Drohan | [email protected]

00 – Introduction

Page 2: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

00. Introduction

Outline

q Module Description q Learning Objectives q Structure q Assessment

Page 3: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Module Description

q “This module will instruct the student in object oriented programming techniques. It will illustrate object oriented programming concepts and equip the student with the knowledge to use objects in programming with confidence.”

00. Introduction

Page 4: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Learning Objectives q Identify the core packages in the Java API. q Create interfaces in Java. q Define and use exception classes q Distinguish between one dimensional arrays and multi

dimensional arrays. q Describe the basic file handling technique used in the

Java language. q Create user objects and use them in conjunction with

Java's collection classes. q Be aware of the different Searching and Sorting

techniques available for processing collection classes.

00. Introduction

Page 5: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Structure

q Week 01 : Inheritance & Polymoriphsm (Recap)

q 02 – 03 : Custom Exception Handling q 04 – 05 : File Input/Output in Java q 06 – 08 : The Collections Framework q 09 – 11 : The Collections Algorithms

q Week 12 : Project Demos

00. Introduction

Page 6: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Assessment

q  100% Continuous Assessment n  1 Individual Assignment – Due week 6 (50%) n  1 Team Project – Due week 11/Demos Week 12 (20%) n  1 In Class Exam – Due week 11 (30%)

q  Project Ideas MUST be unique AND all your own original work (mostly!) n  1st come 1st served approach to Project Titles n  Note : Assignment CAN overlap with Project

20% REDUCTION PER DAY FOR EVERY DAY LATE

00. Introduction

Page 7: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Contact

q David Drohan n  [email protected]

n  051 302683

n  @daithid73

00. Introduction

Page 8: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Resources

Moodle Page

00. Introduction

Page 9: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Module Overview q 100% Continuous Assessment

n  One individual project, one group project, and one in class assessment (provisionally).

n  Lab exercises (non-CA) will also be assigned to help prepare you for the project work.

q Shared module with IT. n  We will share slides, CA, etc.

q Eclipse IDE will be used for this module. n  Install a recent version of Eclipse. n  We will use Eclipse for any in-class worked examples

and case studies.

Introduction to Data Structures 9

Page 10: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

What are Data Structures? q Data structures describe how data are organised in a

computer. q This organisation allows for the efficient processing

(storage, retrieval, etc.) of the data in order to make it useful.

q Different types of data require different types of data structures for different types of applications. n  “Horses for courses.” No one data structure is always best

or suitable. n  The choice of data structures is one of the most

fundamental decisions in an application’s development.

Introduction to Data Structures 10

Page 11: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Continued... q Different data structures:

n  Have different space requirements for any given data. n  Have different levels of algorithmic efficiency for given

operations applied to the data (sorting, searching, retrieval, insertion, etc.).

q We always want to save (memory) space and/or (processing) time by choosing appropriate data structures. n  Sometimes we have to trade space for time, and vice

versa.

Introduction to Data Structures 11

Page 12: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

What is a “Structure”? q A structure is something that, essentially, has an

ostensible shape and form. q We humans see and use structure everywhere!

n  Its how we make sense of the complexity and chaos in the world.

n  The structure we perceive helps us to organise things in order to process them. w What this processing involves depends on the nature of the

structure and its actual use or application. n  Examples: adding, removing, inserting, reading/observing,

aggregating, searching, etc.

Introduction to Data Structures 12

Page 13: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

What Do You See?

q Consider the following photographs / images. q Can you see any structures or patterns?

n  Name the structures and any components / concepts you see.

n  The key point is that structures emerge that explain, describe and simplify the situation.

Introduction to Data Structures 13

Page 14: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 14

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g.

Count) •  Organise

further?

Continued…

Page 15: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 15

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g.

Count) •  Organise

further?

Continued…

Page 16: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Continued…

Introduction to Data Structures 16

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g. Count) •  Organise further?

Page 17: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 17

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g.

Count) •  Organise

further?

Continued…

Page 18: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 18

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g.

Count) •  Organise

further?

Continued…

Page 19: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 19

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g. Count) •  Organise further?

Page 20: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 20

Q. How would we? •  Add (or Insert) •  Remove •  Search •  Aggregate (e.g.

Count) •  Organise

further?

Page 21: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 21

Page 22: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 22

Page 23: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 23

Page 24: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Introduction to Data Structures 24

Page 25: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Continued…

q For data structures the same principle applies: identify a structure/form/shape that logically organises a “bunch of data” in a useful and efficient way. n  So it is easy to read, delete, add to, search, etc. the data as

appropriate.

q Data structures include: lists, queues, stacks, rings, sets, bags, maps, trees, graphs, etc.

q Abstract data types (ADTs) can also be used to describe basically anything! n  Examples: Skydiver, Person, Box, Book, Tin, Flock,

FlockFormation, Drawer, EatingUtensil, Basket, ClothingItem, Wardrobe, WardrobeRail, Family, Alien, Spaceship, Engine, City, Building, TubeStation, etc. etc.

Introduction to Data Structures 25

Page 26: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Who Knew I Knew? q You have already been using some data structures, and

related concepts, in your Year 1 programming modules, including: n  Arrays n  Classes / ADTs

q Although you will have only seen these in pretty rudimentary form, they are widely used to form the basis of more complex data structures too.

q It is therefore important to reconsider these concepts from a data structures perspective to understand their relevant characteristics, and also their strengths and weaknesses in this regard. We will start here!

End of Notes Introduction to Data Structures 26

Page 27: Data Structures - GitHub Pages · 2017-03-01 · Module Description q ... q Data structures describe how data are organised in a computer. q This organisation allows for the efficient

Questions?

00. Introduction