MCS 231: Concepts of Data Structure Class Hour: Section 1: MW 2:15PM - 3:30PM. Hyland 2306.

Slides:



Advertisements
Similar presentations
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Advertisements

1 The Software Challenge People may come and go, but software may remain A software product is often expected to be used for an extended period of time.
Software Design. The Software Challenge In industry, a software product is expected to be used for an extended period of time by someone who did not write.
Ch 3 System Development Environment
CS 106 Introduction to Computer Science I 04 / 11 / 2008 Instructor: Michael Eckmann.
ITEC200 Week01 Introduction to Software Design.
Introduction To System Analysis and Design
Fall 2007CS 225 Introduction to Software Design Chapter 1.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Software Development Software Life Cycle UML Diagrams.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives Intro - Software OOP Inheritance, interfaces,
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
1 Fall 2007ACS-1903 Chapter 6: Classes Classes and Objects Instance Fields and Methods Constructors Overloading of Methods and Constructors Scope of Instance.
Software Engineering Principles and C++ Classes
Chapter 13: Object-Oriented Programming
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Spring 2009CS 225 Introduction to Software Design Chapter 1.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Data Structures and Programming.  John Edgar2.
Introduction To System Analysis and design
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Programming Languages and Paradigms Object-Oriented Programming.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
CS212: Object Oriented Analysis and Design Lecture 1: Introduction.
Chapter 1: Introduction to Systems Analysis and Design
Introduction Ellen Walker CPSC 201 Data Structures Hiram College.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
CS 222: Immediate C++ Class Hour: Section: MWF 2:15PM - 3:05PM. McGraw 115.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Introduction to Software Design Chapter 1. Chapter Objectives  To become familiar with the software challenge and the software life cycle  To understand.
Introduction To System Analysis and Design
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
Systems Analysis and Design in a Changing World, 3rd Edition
Data Structures Using C++1 Chapter 1 -Software Engineering Principles -ADT and Classes.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Object-Oriented Analysis and Design. Lesson 1: Introduction to Software Engineering.
Java development environment and Review of Java. Eclipse TM Intergrated Development Environment (IDE) Running Eclipse: Warning: Never check the “Use this.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Summing Up Object Oriented Design. Four Major Components: Abstraction modeling real-life entities by essential information only Encapsulation clustering.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
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.
EGR 2261 Unit 11 Classes and Data Abstraction  Read Malik, Chapter 10.  Homework #11 and Lab #11 due next week.  Quiz next week.
Software Engineering and Object-Oriented Design Topics: Solutions Modules Key Programming Issues Development Methods Object-Oriented Principles.
1 Unified Modeling Language, Version 2.0 Chapter 2.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 4 Slide 1 Software Processes.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Notices Assn 2 is due tomorrow, 7pm. Moodle quiz next week – written in the lab as before. Everything up to and including today’s lecture: Big Topics are.
Mr H Kandjimi 2016/01/03Mr Kandjimi1 Week 3 –Modularity in C++
Chapter 1: Introduction to Systems Analysis and Design
Systems Analysis and Design With UML 2
About the Presentations
Lecture 2 of Computer Science II
IFS410: Advanced Analysis and Design
Review CSE116 2/21/2019 B.Ramamurthy.
Chapter 1: Introduction to Systems Analysis and Design
Chapter 1: Introduction to Systems Analysis and Design
Presentation transcript:

MCS 231: Concepts of Data Structure Class Hour: Section 1: MW 2:15PM - 3:30PM. Hyland 2306

Instructor contact information (fastest way to contact me) McGraw 106 Office Hours: 9:00am – 11:00am MTW or by appointment

Course Objectives -Given a basic data structure (e.g. queue, stack, list), students will be able to apply the theory to implement applications using those data structures and analyze efficiency of each type. -Given a complex data structure (trees, graph),students will be able to design and implement it, apply theory, and compute its efficiency. -Given a large project that uses basic and complex data structures, students will be able to implement it using advanced Java techniques such as inheritance and polymorphism, interfaces and abstract classes, and the use of classes from the JAVA API.

Course Objectives -Given a basic data structure (e.g. queue, stack, list), students will be able to apply the theory to implement applications using those data structures and analyze efficiency of each type. -Given a complex data structure (trees, graph),students will be able to design and implement it, apply theory, and compute its efficiency. -Given a large project that uses basic and complex data structures, students will be able to implement it using advanced Java techniques such as inheritance and polymorphism, interfaces and abstract classes, and the use of classes from the JAVA API.

Course Objectives -Given a basic data structure (e.g. queue, stack, list), students will be able to apply the theory to implement applications using those data structures and analyze efficiency of each type. -Given a complex data structure (trees, graph),students will be able to design and implement it, apply theory, and compute its efficiency. -Given a large project that uses basic and complex data structures, students will be able to implement it using advanced Java techniques such as inheritance and polymorphism, interfaces and abstract classes, and the use of classes from the JAVA API.

Technology Requirement J2SE Software Development Kit (SDK): ): sp (just download SDK 5.0 or later) sp Eclipse:

Course detail - Evaluation GRADABLEPOINTS Labs100 Mid term Exam150 5 Projects500 Final Exam200 Quizzes50 Total1000

Grading (+/-)

Quiz Quiz is used to measure: - class attendance - class preparation Not all material will be covered in a 75-minute class –Book complements the lectures

Must-have for success Reading textbookPracticing (labs+projects)Devote time) ++ =

Philosophy for teaching Data Structure in this course Traditional way: implementing everything + starting from beginning+ focusing on complexity analysis Modern way: taking advantages of built-in methods from Java/C++ Hybrid way: taking advantages of built-in methods for simple data structure + implement everything for complex data structure + emphasize on complexity analysis

Philosophy for teaching Data Structure in this course Traditional way: implementing everything + starting from beginning+ focusing on complexity analysis Modern way: taking advantages of built-in methods from Java/C++ Hybrid way: taking advantages of built-in methods for simple data structure + implement everything for complex data structure + emphasize on complexity analysis

Philosophy for teaching Data Structure in this course Traditional way: implementing everything + starting from beginning+ focusing on complexity analysis Modern way: taking advantages of built-in methods from Java/C++ Hybrid way: taking advantages of built-in methods for simple data structure + implement everything for complex data structure + emphasize on complexity analysis

Getting started… Prerequisite:MCS 220 What do we still remember or know about Java and Software life cycle activity?

Class Focus Balance between theory and implementation Strict deadlines, high standard, ridiculous demands (always)

Assessment Prerequisite:MCS 220 What do we still remember or know about Java and Software life cycle activity?

Assessment 1.1 What does “UML” stand for? a. Understanding Modern Language b. Unified Modeling Language c. Unified Modern Language d. Understanding Modeling Language

Assessment 1.2 This task is not included in a software development process. a. Architectural, component, and detailed designs b. Implementation c. Acceptable tests d. Maintenance e. Marketing

Assessment 1.3 Which of the following symbols can be used in a UML class diagram to represent access ability of a data member or a method a.– b. + c. # d.*

Assessment 1.5 What is the complexity of selection sort a. O(n) b. O(nlog 2 (n)) c. O(n 2 ) d. O(log 2 (n))

Assessment 2.1 Overriding a method differs from overloading a method because: a. For an overloaded constructor, the superclass constructor will always be called first. b. For an overridden constructor, the superclass constructor will always be called first. c. Overloaded methods have the same signature. d. Overridden methods have the same signature

Assessment 2.2 Using the protected keyword gives a member: a.public access (any classes can access it). b.package access (only classes in the same inheritance hierarchy can access it). c.private access (nobody can access it) d.block scope (only the variables inside the same block can access it).

Assessment 2.3 Suppose method1 is declared as void method1 ( int a, float b ) Which of the following methods overloads method1? a. void method2 ( int a, float b ). b. void method2 ( float a, int b ). c. void method1 ( float a, float b ). d. void method1 ( int b, float a ).

Assessment 2.5. Variables should be declared as data members only if a. they are local variables. b. they are used only within a method. c. they are required for use in more than one method or their values must be saved between calls to the class’s methods. d. they are arguments.

Java development environment and Review of Java

Eclipse TM Intergrated Development Environment (IDE) Running Eclipse: Warning: Never check the “Use this as the default and do not ask again” box.

The importance of workspace This is where you will find all your java files. You can switch from one workspace to another. You need to define the workspace first (where you want to put your files) before click on OK

Eclipse TM tutorial Perspective is a set of related Views (windows) that enable a development specialist to perform specific tasks

Create an Eclipse project From the Eclipse menu bar select File, New, Project to start the “New Project” wizard. Select “Java Project” and click “Next”.

Create an Eclipse project

Create a Java package Structure in dot format: for example: com.tm.tutorial.main

Create Java classes Create Application class under com.tm.tutorial.main package

Create Java classes Create Application class under com.tm.tutorial.main package

Implementation of Java class

Generating setters and getters for attributes

Implementation of Java class Generating constructors

Implementation of Java class Generating constructors

Compile Java Application

Run the application

Run Application (Shorter way)

Setting up preferences in Eclipse If you did not download the JDK earlier in this tutorial, and your existing JRE does not appear in the “Installed JREs” preference, you must add it yourself.

Setting up preferences in Eclipse

Introduction to Software Design

Chapter 1: Introduction to Software Design 49 The Software Challenge In industry, a software product is expected to be used for an extended period of time by someone who did not write the program and who is not intimately familiar with its internal design Initial specification for a software product may be incomplete Specification is clarified through extensive interaction between users of the software and the system analyst

The Software challenge A requirements specification should be generated at the beginning of any software project Designers and users should both approve the document

Chapter 1: Introduction to Software Design 51 The Software Life Cycle Software Life Cycle: the sequence of stages that software products go through as they mature from initial concept to finished product

Chapter 1: Introduction to Software Design 52 Software Life Cycle Models Waterfall model: simplest way of organizing activities that transform software from one stage to another Activities are performed in sequence and the results of one flows into the next Waterfall model is simple but unworkable –Fundamental flaw is assumption that each stage can and must be completed before the next one occurs

Chapter 1: Introduction to Software Design 53 Waterfall Model

Chapter 1: Introduction to Software Design 54 Waterfall Model (continued)

Chapter 1: Introduction to Software Design 55 Software Life Cycle Models (continued) Unified Model: the cycles are called phases and iterations and the activities are called workflows Four phases –Inception –Elaboration –Construction –Transition

Chapter 1: Introduction to Software Design 56 Software Life Cycle Models (continued)

Chapter 1: Introduction to Software Design 57 Software Life Cycle Activities (continued) Certain activities are essential for software development –Requirements specification –Architectural, component, and detailed designs –Implementation –Unit, integration, and acceptance tests –Installation and maintenance

Chapter 1: Introduction to Software Design 58 Software Life Cycle Activities (continued) Requirements Specification –System analyst works with software users to clarify the detailed system requirements –Questions include format of input data, desired form of any output screens, and data validation Analysis –Make sure you completely understand the problem before starting the design or program a solution –Evaluate different approaches to the design

Chapter 1: Introduction to Software Design 59 Software Life Cycle Activities (continued) Design –Top-down approach: breaking a system into a set of smaller subsystems –Object-oriented approach: identification of a set of objects and specification of their interactions –UML diagrams are a design tool to illustrate the interactions between Classes Classes and external entities

Chapter 1: Introduction to Software Design 60 Software Life Cycle Activities (continued)

Chapter 1: Introduction to Software Design 61 Using Abstraction to Manage Complexity An abstraction is a model of a physical entity or activity Abstraction helps programmers deal with complex issues in a piecemeal fashion Procedural abstraction: distinguish what is to be achieved by a procedure from its implementation Data abstraction: specify the data objects for a problem and the operations to be performed on them without concern for their representation in memory

Chapter 1: Introduction to Software Design 62 Using Abstraction to Manage Complexity (continued) If a higher-level class references a data object only through its methods, the higher-level class will not have to be rewritten, even if the data representation changes Information hiding: Concealing the details of a class implementation from users of the class

Chapter 1: Introduction to Software Design 63 Abstract Data Types A major goal of software engineering is to write reusable code Abstract data type (ADT): The combination of data together with its methods

Interface A Java interface is a way to specify an ADT –The interface specifies the names, parameters, and return values of the ADT methods without specifying how the methods perform their operations and without specifying how the data is internally represented Each class that implements an interface must provide the definitions of all methods declared in the interface

Chapter 1: Introduction to Software Design 65 Abstract Data Types, Interfaces You cannot instantiate an interface You can declare a variable that has an interface type and use it to reference an actual object A Java interface is a contract between the interface designer and the programmer who codes a class that implements the interface

Pre-condition, Post-condition Precondition: a statement of any assumptions or constraints on the method data before the method begins execution Postcondition: a statement that describes the result of executing a method

Chapter 1: Introduction to Software Design 67 Requirements Analysis, Use Cases, and Sequence Diagrams First step in analysis is to study the problem of input and output requirements carefully to make sure they are understood and make sense Use case: list of the user actions and system responses for a particular sub-problem in the order that they are likely to occur Sequence diagram: shows all the objects involved in this use case across the horizontal axis, time is shown along the vertical axis