Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010.

Slides:



Advertisements
Similar presentations
CS 111: Introduction to Programming Midterm Exam NAME _________________ UIN __________________ 10/30/08 1.Who is our hero? 2.Why is this person our hero?
Advertisements

Programming Types of Testing.
Chapter 1 - An Introduction to Computers and Problem Solving
ITEC113 Algorithms and Programming Techniques
© Janice Regan Problem-Solving Process 1. State the Problem (Problem Specification) 2. Analyze the problem: outline solution requirements and design.
COSC 120 Computer Programming
Fall 2007CS 225 Introduction to Software Design Chapter 1.
Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Chapter 1 Principles of Programming and Software Engineering.
Software Engineering For Beginners. General Information Lecturer, Patricia O’Byrne. – Times: –See noticeboard outside.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Chapter 1 Program Design
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Chapter 3 Planning Your Solution
Chapter 3 Data Structures and Abstract Data Type Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
CS102 Introduction to Computer Programming
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Software.
Comp 245 Data Structures Software Engineering. What is Software Engineering? Most students obtain the problem and immediately start coding the solution.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 2: Developing a Program.
Simple Program Design Third Edition A Step-by-Step Approach
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
COP 3530 PROGRAM, FILE & DATA STRUCTURES Syllabus Syllabus Lab Information Lab Information Overrides Overrides Questions? Questions?
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
S2008Final_part1.ppt CS11 Introduction to Programming Final Exam Part 1 S A computer is a mechanical or electrical device which stores, retrieves,
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Chapter 1 Program design Objectives To describe the steps in the program development process To introduce the current program design methodology To introduce.
Programming Life Cycle Problem analysisunderstand the problem Requirements definition specify what program will do High- and low-level designhow it meets.
A first look an ADTs Solving a problem involves processing data, and an important part of the solution is the careful organization of the data In order.
1 Ch. 1: Software Development (Read) 5 Phases of Software Life Cycle: Problem Analysis and Specification Design Implementation (Coding) Testing, Execution.
Software Engineering Review CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and Computer Science.
The Software Development Process
Lecture 3 Abstract Data Type Sandy Ardianto & Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
Data Structures Using C++ 2E
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
Data Structure and Algorithm: CIT231 Lecture 3: Arrays and ADT DeSiaMore DeSiaMorewww.desiamore.com/ifm1.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 1 Software Development Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Lecture #1: Introduction to Algorithms and Problem Solving Dr. Hmood Al-Dossari King Saud University Department of Computer Science 6 February 2012.
Program Design. Simple Program Design, Fourth Edition Chapter 1 2 Objectives In this chapter you will be able to: Describe the steps in the program development.
INTRODUCTION TO COMPUTER PROGRAMMING(IT-303) Basics.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Computer Systems Architecture Edited by Original lecture by Ian Sunley Areas: Computer users Basic topics What is a computer?
Low-Level Programming Languages, Pseudocode and Testing Chapter 6.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Principles of Programming & Software Engineering
System.
C++ Plus Data Structures
GC211Data Structure Lecture2 Sara Alhajjam.
Principles of Programming and Software Engineering
About the Presentations
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Algorithm and Ambiguity
Unit# 9: Computer Program Development
Algorithm and Ambiguity
Basic Concepts of Algorithm
Software Development Chapter 1.
Presentation transcript:

Data Structure Introduction Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2010

Outline Software Development Abstract Data Type (ADT)

Software Development Hardware: actual physical components (such as CPU, memory, hard drive…) Software: refers to programs used to control the operation of the hardware. Is a complex process that is both art and science Requires a good deal of imagination, creativity and ingenuity

Hardware Progress Trend

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

Software Development Model One of the earliest strategies for development software is known as the Waterfall Model

Waterfall Model

Realistic Waterfall Model

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

Problem Analysis and Specification Problem Analysis and Specification: The problem is analyzed and a specification for the problem is formulated For example: if we obtain a job request looks like:

Task Example Because of new government regulations, we must keep more accurate record of all students currently receiving financial aid and submit regular report to FFAO (Federal Financial Aid Office). Could we get the computer to do this for us???

Task Analysis Purpose Pre-condition (input): describe the state of processing before the program is executed Post-condition (output): describe the state of processing after the program is executed

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

Design Design: A plan for solving the problem is formulated Various design methods have been developed, two of major designs we describe here: top-down design and object-oriented design

Top-down design The original problem is partitioned into simpler sub-problems For example, the problem we just had can be obviously divided into: 1. Get the student records 2. Process the records 3. Prepare the reports

One level partition

Two level partition

Three level partition

OOD: Object-Oriented Design Identify the objects in the problem's specification and their types. Identify the operations or tasks to manipulate the objects

Program=Algorithm + Data Structure Algorithm: “a step by step procedure for solving a problem or accomplishing some end” In computer science, algorithm must be: 1. Definite, unambiguous 2. Simple 3. Finite

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

Coding There’s not much we can talk in coding, you all know what it is. After you select the language, three major principles you need to follow: 1. Programs and Subprograms should be well structured 2. All source code should be documented 3. It should be formatted in a style that enhances its readability

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

Testing, Execution, and Debugging Errors happen all the time!!! There are three different points at which errors can be introduced: 1. Syntax errors 2. Run-time errors 3. Logic errors

The "V" Life Cycle Model

Two major types of testing Black box testing: Outputs produced for various inputs Checked for correctness Do not consider structure of program component itself. (so basically, it just test a lot of different inputs and match with the expected outputs )

Two major types of testing White box testing: examine code’s internal structure (Test for every loop, if statement, functions…) Test data is carefully selected

Software Development Phases Problem Analysis and Specification Design Coding Testing, Execution, and Debugging Maintenance

After the software has been used for several years, they will require modifications Studies show that a higher percentage of computing budgets and programmer time are devoted to software maintenance 1970s35-40% 1980s40-60% 1990s70-80% 2000s80-90%

Program Algorithms + Data Structure = Programs Algorithms: Must be definite and unambiguous Simple enough to carry out by computer Need to be terminated after a finite number of operations

Outline Software Development Abstract Data Type (ADT)

A first look an ADTs Solving a problem involves processing data, and an important part of the solution is the careful organization of the data In order to do that, we need to identify: 1. The collection of data items 2. Basic operation that must be performed on them Abstract Data Type (ADT): a collection of data items together with the operations on the data

Abstract Data Type (ADT) The word “abstract” refers to the fact that the data and the basic operations defined on it are being studied independently of how they are implemented We think about what can be done with the data, not how it is done

Implementation of ADT An implementation of ADT consists of storage structures to store the data items and algorithms for basic operation

Data Structures, Abstract Data Types, and Implementations Consider example of an airplane flight with 10 seats to be assigned Tasks List available seats Reserve a seat How to store, access data?

Data Structures, Abstract Data Types, and Implementations Consider example of an airplane flight with 10 seats to be assigned Tasks List available seats Reserve a seat How to store, access data? 10 individual variables

Use 10 individual variables Algorithm to List available seats 1. If seat1 == ‘ ’: display 1 2. If seat2 == ‘ ’: display If seat10 == ‘ ’: display 10 Algorithm to Reserve a seat 1. Set DONE to false 2. If seat1 ==‘ ’: print “do you want seat #1??” Get answer if answer==‘Y’: set seat1 to ‘X’ set Done to True 3. If seat2 ==‘ ’: print “do you want seat #2??” Get answer if answer==‘Y’: set seat2 to ‘X’ set Done to True.

Data Structures, Abstract Data Types, and Implementations Consider example of an airplane flight with 10 seats to be assigned Tasks List available seats Reserve a seat How to store, access data? 10 individual variables An array of variables

Use Array Algorithm to List available seats For number ranging from 0 to max_seats-1, do: If seat[number] == ‘ ’: Display number Algorithm to Reserve a seat Readin number of seat to be reserved If seat[number] is equal to ‘ ’: set seat[number] to ‘X’ Else Display a message that the seat having this number is occupied

ADTs In this simple example, it does illustrate the concept of an Abstract Data Type ADT consists of 1. The collection of data items 2. Basic operation that must be performed on them In the example, a collection of data is a list of seats The basic operations are (1) Scan the list to determine which seats are occupied (2) change seat’s status

Data Structure and Abstract Data Type The term of Data Structure and Abstract Data Type are often used interchangeably However, we use ADT when data is studied at a logical level The term data structure refers to a construct in programming language that can be used to store data