OOP.

Slides:



Advertisements
Similar presentations
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Advertisements

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
CS487 Software Engineering Omar Aldawud
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Object-Oriented Analysis and Design
Introduction To System Analysis and Design
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Liang,Introduction to Java Programming,revised by Dai-kaiyu 1 Chapter 10 Object-Oriented Modeling.
1 Chapter 1 Introduction to Object-Oriented Programming.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
High-Level Programming Languages
Computers: Tools for an Information Age
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
1 An Introduction to Visual Basic Objectives Explain the history of programming languages Define the terminology used in object-oriented programming.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
An Agile View of Process
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
Chapter 1 The Systems Development Environment
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Introduction To System Analysis and design
Chapter 1 Introduction to Programming and the Java Language.
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
OOSD Using Java Lecture 1 Introduction. 8/19/04introduction2 Introduction  IST 350 – Tools & CSC 485 – OOD?  Software Development vs. Programming 
Chapter 2: Approaches to System Development
CSE:141 Introduction to Programming Faculty of Computer Science, IBA BS-I (Spring 2010) Lecture 3.
Microsoft Visual Basic 2005: Reloaded Second Edition
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Chapter 1: Introduction to Systems Analysis and Design
Introduction to Programming Languages. Problem Solving in Programming.
Unified Modeling Language, Version 2.0
CS101 Introduction to Computing Lecture Programming Languages.
Introduction To System Analysis and Design
Computer Concepts 2014 Chapter 12 Computer Programming.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Software Engineering Saeed Akhtar The University of Lahore Lecture 5 Originally shared for: mashhoood.webs.com.
Object-Oriented Analysis and Design. Lesson 1: Introduction to Software Engineering.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Chapter 1 Introduction to Programming and the Java Language.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Basic Characteristics of Object-Oriented Systems
Introduction to Software Engineering Muhammad Nasir Agile Software Development(2)
CHAP-1 OBJECT ORIENTED SYSTEM DESIGN (IT-703)
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Chapter 5 Agile Development Moonzoo Kim KAIST
Chapter 4 & Chapter 5 Important Concepts
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
Lecture 1 Introduction Richard Gesick.
Key Ideas from day 1 slides
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Chapter 11 Object-Oriented Design
Computer Programming.
Presentation transcript:

OOP

Wed, 06:25-09:05PM Rice Campus - Wheaton Room RI 148 Schedule Wed, 06:25-09:05PM Rice Campus - Wheaton Room RI 148

Java Must Have To write your first program, you need: The JavaTM 5 Platform, Standard Edition. A text editor. Notepad, the simple editor included with the Windows platforms. You can and should use an IDE Eclipse Jbuilder JDeveloper

Class Goals Explain and justify the principles of Object Oriented concepts: (review abstraction & abstract data types, encapsulation, inheritance, polymorphism, aggregation) Analyze and identify the strengths (and weaknesses) of in-depth areas of the Object Oriented paradigm. Analyze, explain, & compare the qualities of Object Oriented languages and how well they support the object model. Explain and analyze the key points of Object Oriented analysis.

Class Goals Explain and analyze the key points of Object Oriented design. Design, implement, test and debug multi-phased Object Oriented application. Explain and utilize contemporary Object Oriented methodologies (data-driven methodology and behavior-driven methodology) Utilize recent notation (Unified Modeling Language) to express the artifacts of Object Oriented Analysis & Design (class design, class relationships, object interaction, object states, etc.)

Class Goals Perform Object Oriented Analysis & Design on a real-world problem. Explain and Utilize Complex Design Patterns. Create an implementation of the resultant Object Oriented design. Examine new & contemporary concepts in Object Orientation. Communicate the deliverables of a software development project.

Laboratory Projects A 2-part large-scale Object Oriented software development project is required by each student in which the student will experience designing, coding, testing and debugging a significant Object Oriented application. The combined parts of the course project are generally range from 5000 - 10000 lines of code. Part 1 (6 weeks): object-oriented analysis and design of the software system. Part 2 (6 weeks): object-oriented detailed design, implementation using object oriented language, and testing of the software system.

Text Book TEXTBOOK (REQUIRED) Object-Oriented Software Development Using Java Xiaoping Jia, Second Edition

Contact Information Class Home Page, http://www.csam.iit.edu/~oaldawud/cs445/ Omar Aldawud aldaoma@iit.edu

Introduction Chapter 1

SE Generic Activities SW Engineering is the: o m u n i c a t Planning M d e l g s r D p y j q h estimating scheduling tracking v f b k SW Engineering is the: Analysis, Design, Construction, Verification and Management of Software.

SE Waterfall Model

Evolutionary Models: The Spiral

Rational Unified Process a “use-case driven, architecture-centric, iterative and incremental” software process closely aligned with the Unified Modeling Language (UML) Tools are used to describe customer views (use cases) Used mainly for OO based methodologies Runs in phases

The Unified Process (UP) inception Phase 1 Communication + Planning Phase 2 Planning + Modeling elaboration inception Phase 3 Coding, unit test & integrate Components Construction Transition result Phase 4 Deployment Production

UP Phases

UP Work Products

Extreme Programming (XP) The most widely used agile process, originally proposed by Kent Beck. It encompasses the following activities: XP Planning Begins with the creation of “user stories” Agile team assesses each story and assigns a cost Stories are grouped to form a deliverable increment A commitment is made on delivery date After the first increment “project velocity” is used to help define subsequent delivery dates for other increments Project Velocity is a measure of the number of stories implemented in the first release

Extreme Programming (XP) XP Design Follows the KIS principle – Simple Design Design provide implementation guidelines for a story Encourage the use of CRC cards or class diagram For difficult design problems, suggests the creation of “spike solutions”—a design prototype XP Coding Recommends the construction of a unit test for a story before coding Encourages “pair programming” for stories Integration Team – integrates all stories XP Testing All unit tests are executed daily “Acceptance tests” are defined by the customer and executed to assess customer visible functionality

Extreme Programming (XP)

Modeling the Real World Components of a software system is an interpretation of the real world Model Algorithm Object Orientation is a software development model that makes use of objects as a representation of the real world

Object Orientation OO development processes is similar to those of the waterfall model (What Booch calles Macro Process) Conceptualization – requirements gathering OO Analysis and Modeling Goal to build models of the system’s behavior using UML A model should capture the essential and relevent aspects of the real world OO Design Goal to create an architecture for implementation Implementation Use OO programming language (such as Java) to implement the design Coding, testing and debugging Maintenance Evolution support

Booch [94] Approach Proposed an iterative SW development process for OOSD The approach consist of a number of successive iterations (micro process): Identify the classes Identify the semantics (attributes and behavior) Identify the relationships Define class interfaces Implementing the class Booch’s approach adopted by RUP and XP

High Level Programming Languages Java Introduction

High-Level Languages Compiled Interpreted Compiler converts source code (instructions and data) into machine language, then program is executed Interpreted Interpreter converts instructions into machine language at run time as instructions are executed Usually executes more slowly than compiled program

High-Level Languages Are portable Are translated into machine code by compilers Instructions are written in language similar to natural language Examples -- FORTRAN, COBOL, Pascal, C, C++ Many are standardized by ISO/ANSI to provide an official description of the language

Java Combination of compiler and interpreter Compiler converts source code into byte codes (an instruction set for a virtual, machine-independent processor) At run time, the Java Virtual Machine (JVM) interprets the byte codes and converts them into the machine language on which the program is running.

Programming a Computer: Java The Java Programming Language A high-level language Java compiler translates to Java bytecodes for execution on a Java Virtual Machine (JVM)

Java Portability Windows PC running JVM Java Program Unix box Macintosh Bytecode

Java Achieves portability by using both a compiler and an interpreter Java compiler translates a Java program into an intermediate Bytecode--not machine language An interpreter program called the Java Virtual Machine (JVM) translates each successive instruction in the Bytecode program to machine language and immediately runs it

The Java Language Created by Sun Microsystems in 1995 Syntax based on C++ Object-Oriented Support for Internet applications Extensive library of prewritten classes Portability among platforms Built-in networking

Java Programs Applets Servlets Applications Small programs designed to add interactivity to Web sites Downloaded with the Web page and launched by the Internet browser Servlets Run by Web server on the server Typically generate Web content Applications Programs that run standalone on a client

An Introduction to Programming Programming Basics Program Design with Pseudocode Developing a Java Application

Programming Basics Programming is translating a problem into ordered steps consisting of operations a computer can perform: Input Calculations Comparisons of values Moving data Output The order of execution of instructions is called flow of control

Program Design with Pseudocode Pronounced sue-dough-code English-like language for specifying the design of a program Programmer can concentrate on design of program without worrying about Java language rules (syntax) Then convert pseudocode into Java code

Four Types of Flow of Control Sequential Processing Execute instructions in order Method Call Jump to code in method, then return Selection Choose code to execute based on data value Looping or Iteration Repeat operations for multiple data values

Sequential Processing The pseudocode for calculating the sum of two numbers would look like this: read first number read second number set total to (first number + second number) output total Statement Statement Statement . . .

Method Call Calling the method executes the method Methods can take arguments (data to use) and return values Here is pseudocode for calculating the square root of an integer:   read an integer call the square root method, with integer as argument output the square root

a meaningful collection Methods . . . sqroot method SUBPROGRAM1 a meaningful collection of SEQUENCE, SELECTION, LOOP, SUBPROGRAM

IF Condition THEN Statement1 ELSE Statement2 Selection The pseudocode for determining if a number is positive or negative is: read a number if the number is greater than or equal to 0 write "Number is positive." else write "Number is negative." True Statement Condition . . . Statement Statement False

Looping False . . . True Condition WHILE Condition DO Statement1 The pseudocode for finding the sum of a set of numbers is: set total to 0 read a number while there was a number to read, add number to total read the next number write total Statement . . . False True Condition

ASYNCHRONOUS CONTROL EVENTHANDLER a subprogram executed EVENT when an event occurs

Object-oriented Programming (OOP) Class tool for encapsulating data and operations (methods) into one package defines a template or model for creating and manipulating objects Objects data created using the class and its methods an object is an instance of the class creating an object is instantiation A software components consists of variables and methods. A mechanism for encapsulation. modularity information hiding

Object-oriented Programming (OOP) Message Objects communicate via message passing. A message consists of an object (the recipient), a method, and optional parameters. Inheritance A mechanism to organize classes by commonalities. subclasses, specialization superclass, generalization

Classes and Objects Examples Date class data: month, day, year operations to set and return month, day, year a Date object Aug 28 2007

void move(int dx, int dy) Classes and Objects An object: point1 Attributes or fields: int x, y; A method: void move(int dx, int dy) A message: point1.move(10, 10)

Classes and Objects Inheritance Example: Student GradStudent MSStudent PhDStudent UGStudent

OOP Advantage: Reuse Well-written classes can be reused in new applications Shortens development time because programmers don't need to write new code Programs are more robust because the class code is already tested

An Object of class Time OPERATIONS DATA Set Increment Write . Time Private data: hrs 8 mins 25 secs 42 Increment Write . Time