week 1a
Skip this Video
Download Presentation
Week 1A

Loading in 2 Seconds...

play fullscreen
1 / 30

Week 1A - PowerPoint PPT Presentation

  • Uploaded on

Week 1A. Introduction and Module Overview. Contact Details. Announcements. Practical sessions will run in Wk 1. They will cover: Overview of Java. Netbeans Tutorial. Sending an email from WebCT . Module Overview. Data Structures and Algorithms COM328 Lectures

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Week 1A' - adrina

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
week 1a

Week 1A

Introduction and Module Overview

  • Practical sessions willrun in Wk 1.
  • They will cover:
    • Overview of Java.
    • Netbeans Tutorial.
    • Sending an email from WebCT.
module overview
Module Overview
  • Data Structures and Algorithms
    • COM328
  • Lectures
    • Tuesday 10.15 – 11.05pm
    • Thursday 3.15 – 5.05pm
  • Practicals
    • Thursday 9.15 – 11.05pm (Gp A1 and A2)
    • Thursday 13.15 – 3.05pm (Gp B1 and B2)
module goals
Module Goals
  • Learn about commonly used data structures and algorithms.
  • Learn how to analyse and compare their performance.
reading material



  • Recommended Texts
  • Data Structures
    • Java Software Structures, John Lewis and Joseph Chase,2004,Addison Wesley 3rd Ed.
    • Data Structures and Problem Solving Using Java, Mark Allen Weiss, 1998, Addison Wesley
    • Data Structures and Algorithms in Java, Robert Lafore.
    • Data Strucutes and Algorithms Using Java, William McAllister
  • Java
    • Java Software Solutions, Lewis & Loftus, Addison Wesley, 2004, 4th Ed.
    • host of other books on Java!
coursework examination
Coursework & Examination
  • 25% Coursework
    • 2 Class Tests (10% each)
    • Assignment 1 (40%)
    • Assignment 2 (40%)
  • 75% Examination
    • 3hr paper – Choose 4 questions from a possible 6, covering a range of topics taught throughout the module.
  • NOTE: You need to pass both the coursework and examination elements in order to successfully pass the module!
a cautionary note
A Cautionary Note
  • Read UU plagarism guide:
    • http://www.ulster.ac.uk/academicservices/student/plagiarism.pdf
  • Plagiarism within programming is easy to spot!
  • All coursework elements should be individual pieces of work.
    • You are free to discuss problems with your peers and even potential solutions but ultimately the work submitted should be your own.
    • Be careful about using code directly from the web / books – especially if you do not fully understand it!
final administrative note
Final Administrative Note
  • Attempt to attend all classes.
  • Tuesdays will focus on smaller topics, practical reviews, assignment feedback etc.
  • Thursdays will focus on introducing new concepts.
    • Class tests may also take place on Thursdays
  • Learning to program is difficult if you don’t know what you’re doing:
    • So show up and find out!
    • Don’t be afraid to ask Questions!
data structures and algorithms
Data Structures and Algorithms
  • What is a Data Structure?
    • Simply a way to organise information.
      • A group of numbers, a list of names, group of Students, a bag of bingo balls.
  • What is an Algorithm?
    • Abstract way to perform computation tasks
      • Find some important piece / group of stored data, sort some data alphabetically, partition data etc…
module topics overview
Module Topics Overview
  • Java Review
  • Abstract Data Types, data structures and Interfaces
  • Arrays
  • Linked Lists
  • Stacks
  • Queues
  • Lists
  • Sorting
  • Searching
  • Recursion and Iteration
  • Algorithm Analysis


Data Structures




data types
Data Types
  • Data type – group of values and possible operations.
  • An abstraction hides certain details at certain times.
  • What is an Abstract Data Type?
    • Conceptually describes the valid types of data and the ways in which data can be accessed:
      • Type of data stored.
      • Operation supported and types of their parameters.
    • Specifies WHAT not HOW!
      • Consider driving a car
    • In Java ADT’s are supported by Interfaces
    • Interfaces are then implemented by you to specify the HOW!
  • Gathers and organizes other objects.
    • Underlying data structures are used to implement collections
  • Conceptually describes how elements of the collection can be stored, accessed and managed – a set of rules.
    • A collection of cards, a collection of letters, telephone directory
  • Over the last 50 yrs several different types of collection have been defined to solve different problems.
  • Collections are abstractions – hides certain details.
    • Describe What NOT How.
    • In Java, collections are also known as containers.
    • Collections are implemented by data strucutres.


Class that uses the collection

Class that implements the collection

types of data structure 1
Types of Data Structure (1)
  • Arrays Linked Lists


Node 1












Node 2



Node 3



Node 4





Node 5


Node 6

java collections api
Java Collections API
  • Java already provides a very large library of classes, which offer implementations of several types of collection.
  • Why should we bother learning about and implementing collections if Java already provides the solutions for us?
    • Java provides only a subset of the collections that you might want.
    • Java may not have implemented the collection exactly how you wanted it.
    • To become a good programmer, it is important to develop a deep understanding of the steps involved in implementing collections.
the stack collection
The Stack Collection
  • Linear Collection where items

are add to and removed from

the same end.

  • Stack ADT specifies WHAT:
    • Push, Pop, Peek, isEmpty, size…
  • HOW can these be implemented?
    • Using either an Array or Linked List depending on the problem being solved.

Source: Java Software Structures, Chase and Lewis, 1st Edition.

the queue collection
The Queue Collection
  • Item add to rear and removed from front.
  • Enqueue & dequeue
  • HOW can these be implemented?
    • Using either an Array or Linked List!

Source: Java Software Structures, Chase and Lewis, 1st Edition.

the list collection
The List Collection
  • Ordered, Unordered, Indexed.
  • Items can be added to front, end or somewhere in the middle.

Source: Java Software Structures, Chase and Lewis, 1st Edition.

algorithms for use with data structures
Algorithms for use with Data Structures
  • Insert and Delete
  • Sorting algorithms
    • Selection, Bubble, Insertion
    • Mergesort, Quicksort
  • Searching
    • Linear Search
    • Binary Search
fast sorting mergesort
Fast Sorting - Mergesort

2 5 1 9 3 8 7



9 3 8 7

2 5 1



3 7 8 9

1 2 5

1 2 5



1 2 3 5 7 8 9



Sequential / Linear


recursion iteration
Recursion & Iteration

Source: http://www.skylit.com/javamethods/ppt/index.html

algorithm analysis
Algorithm Analysis
  • Practice:
    • benchmarks
  • Theory:
    • asymptotic analysis, big-Oh

O(1)  <  O(logn)  <  O(n)  <  O(nlog n)  <  O(n2)  <  O(n3)  <  O(an)

big oh notation cont
Big-Oh Notation cont…

Basically a method for theoretically comparing different algorithms.

- save us having to physically code different algorithms.

- More next week…