Basic Concepts Chapter 1 Objectives

Slides:



Advertisements
Similar presentations
Chapter 1: INTRODUCTION TO DATA STRUCTURE
Advertisements

Lists and the Collection Interface Chapter 4. Chapter Objectives To become familiar with the List interface To understand how to write an array-based.
ITEC200 Week04 Lists and the Collection Interface.
Data Structures A data structure is a collection of data organized in some fashion that permits access to individual elements stored in the structure This.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
Data Structures: A Pseudocode Approach with C
Abstract Data Types Data abstraction, or abstract data types, is a programming methodology where one defines not only the data structure to be used, but.
CHAPTER 3 COLLECTIONS Abstract Data Types. 2 A data type consists of a set of values or elements, called its domain, and a set of operators acting on.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Chapter 2 Data Design and Implementation. Homework You should have already read section 2.2 You should have already read section 2.2 Read Section 2.3.
Lists and the Collection Interface Chapter 4. Chapter 4: Lists and the Collection Interface2 Chapter Objectives To become familiar with the List interface.
1 Algorithm Efficiency, Big O Notation, and Role of Data Structures/ADTs Algorithm Efficiency Big O Notation Role of Data Structures Abstract Data Types.
Fall 2007CS 2251 Lists and the Collection Interface Chapter 4.
Basic Definitions Data Structures: Data Structures: A data structure is a systematic way of organizing and accessing data. Or, It’s the logical relationship.
Abstract Data Type (ADT). 2 An Abstract Data Type (ADT) is a data structure with a set of operations –Operations specify how the ADT behaves, but does.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Pointers (Continuation) 1. Data Pointer A pointer is a programming language data type whose value refers directly to ("points to") another value stored.
The Pseudocode Programming Process Chapter 9. Summary of Steps in Building Classes and Routines.
JAVA: An Introduction to Problem Solving & Programming, 5 th Ed. By Walter Savitch and Frank Carrano. ISBN © 2008 Pearson Education, Inc., Upper.
Object Oriented Data Structures
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Chapter 7: Arrays. In this chapter, you will learn about: One-dimensional arrays Array initialization Declaring and processing two-dimensional arrays.
Introduction to Object-oriented programming and software development Lecture 1.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Chapter 3 Introduction to Collections – Stacks Modified
ADTs and C++ Ch 2,3,4 May 12, 2015 Abstract Data Type (ADT) An abstract data type is: 1.A collection of data items (storage structures) 2.Basic operations.
Unit III : Introduction To Data Structures and Analysis Of Algorithm 10/8/ Objective : 1.To understand primitive storage structures and types 2.To.
Computer Science: A Structured Programming Approach Using C1 6-9 Recursion In general, programmers use two approaches to writing repetitive algorithms.
Chapter 19: Searching and Sorting Algorithms
Standard Algorithms –search for an item in an array –count items in an array –find the largest (or smallest) item in an array.
Data Structure Dr. Mohamed Khafagy. Abstraction.Abstraction is a technique in which we construct a model of an entity based upon its essential Characteristics.
Systems Analysis and Design in a Changing World, 3rd Edition
BACS 287 Programming Logic 1. BACS 287 Programming Basics There are 3 general approaches to writing programs – Unstructured – Structured – Object-oriented.
University of Sunderland CIF 102/FIF102 Fundamentals of DatabasesUnit 15 Programming in Microsoft Access using VBA Using VBA to add functionality.
Chapter 1 Data Structures and Algorithms. Primary Goals Present commonly used data structures Present commonly used data structures Introduce the idea.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
5-1 Structured COBOL Programming Nancy Stern Hofstra University Robert A. Stern Nassau Community College James P. Ley University of Wisconsin-Stout John.
CS261 – Data Structures Iterator ADT Dynamic Array and Linked List.
Chapter 12: Collections by Lewis and Loftus (Updated by Dan Fleck) Coming up: Collections.
Computer Science: A Structured Programming Approach Using C Graphs A graph is a collection of nodes, called vertices, and a collection of segments,
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Data Structures: A Pseudocode Approach with C1 Chapter 4 Objectives Upon completion you will be able to: Explain the design, use, and operation of a queue.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Chapter 3 Collections. Objectives  Define the concepts and terminology related to collections  Explore the basic structures of the Java Collections.
ADT data abstraction. Abstraction  representation of concepts by their relevant features only  programming has two major categories of abstraction process.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
COSC 1P03 Data Structures and Abstraction 2.1 Analysis of Algorithms Only Adam had no mother-in-law. That's how we know he lived in paradise.
Chapter 12: Programming in the Large By: Suraya Alias 1-1.
Topic 7 Interfaces I once attended a Java user group meeting where James Gosling (one of Java's creators) was the featured speaker. During the memorable.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 18 List ADT Animated Version.
Ada, Scheme, R Emory Wingard. Ada History Department of Defense in search of high level language around Requirements drafted for the language.
Chapter 5: Looping. Using the while Loop Loop – A structure that allows repeated execution of a block of statements Loop body – A block of statements.
Unit 1 - Introducing Abstract Data Type (ADT) Part 1.
Data Structures: A Pseudocode Approach with C 1 Chapter 5 Objectives Upon completion you will be able to: Explain the design, use, and operation of a linear.
DDC 2423 DATA STRUCTURE Main text:
Fundamentals of Java: AP Computer Science Essentials, 4th Edition
Chapter 3: Using Methods, Classes, and Objects
Algorithm Efficiency Algorithm efficiency
The Object Oriented Approach to Design
Chapter 12: Analysis of Algorithms
Dynamic Data Structures and Generics
Chapter 8: More on the Repetition Structure
A programming language
Dynamic Data Structures and Generics
Analysis of Algorithms
Presentation transcript:

Basic Concepts Chapter 1 Objectives Use pseudocode in the development of algorithms Understand the need for Abstract Data Type (ADT) Understand the implementation of ADTs Use void pointers and pointer to functions Understand the role of Big-O notation Data Structures: A Pseudocode Approach with C, Second Edition

Pseudocode Pseudocode is an English-like representation of the algorithm logic. It consists of an extended version of the basic algorithmic constructs: sequence, selection, and iteration. Algorithm Header Purpose, Condition, and Return Statement Numbers Variables Statment Constructs Algorithm Analysis Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

The Abstract Data Type An ADT consists of a data declaration packaged together with the operations that are meaningful on the data while embodying the structured principles of encapsulation and data hiding. In this section we define the basic parts of an ADT. Atomic and Composite Data Data Type Data Structure Abstract Data Type Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structure Aggregation of atomic and composite data into a set with defined relationships. Structure refers to a set of rules that hold the data together. A combination of elements in which each is either a data type or another data structure. A set of associations of relationship involving combined elements. Example: Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Abstract Data Type ADT users are NOT concerned with how the task is done but rather what it can do. An abstract data type is a data declaration packaged together with the operations that are meaningful for the data type. We encapsulate the data and the operations on the data, and then hide them from the user. All references to and manipulation of the data in a data structure are handled through defined interfaces to the structure. Data Structures: A Pseudocode Approach with C, Second Edition

Model for an Abstract Data Type In this section we provide a conceptual model for an Abstract Data Type (ADT). ADT Operation – passage like ADT Data Structure – controlled entirely Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

ADT Implementations There are two basic structures we can use to implement an ADT list: arrays and linked lists. In this section we discuss the basic linked-list implementation. Array Implementation Linked List Implemenation Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Generic Code for ADT In this section we discuss and provide examples of two C tools that are required to implement an ADT. Pointer to Void Pointer to Function Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

(Continued) Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

(Continued) Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Data Structures: A Pseudocode Approach with C, Second Edition

Algorithm Efficiency Linear Loops Logarithmic Loops Nested Loops To design and implement algorithms, programmers must have a basic understanding of what constitutes good, efficient algorithms. Linear Loops -Efficiency is a function of the number of intstructions. - Loop update either adds or subtracts. Logarithmic Loops -The controlling variable is either multiplied or divided in each iteration. - The number of iteration is a function of the multiplier or divisor. Nested Loops - The number of iterations is the total number which is the product of the number of iterations in the inner loop and number of iterations in the outer loop. Big-O Notation -Not concerned with exact measurement of efficiency but with the magnitude. - A dominant factor determines the magnitute. Data Structures: A Pseudocode Approach with C, Second Edition