Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.

Slides:



Advertisements
Similar presentations
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Advertisements

Introduction to Java Objects CSIS 3701: Advanced Object Oriented Programming.
CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
©2007 · Georges Merx and Ronald J. NormanSlide 1 Chapter 5 Architecture-Driven Component Development.
Introduction To System Analysis and Design
Object-Oriented PHP (1)
1 Chapter 1 Object-Oriented Programming. 2 OO programming and design Object-oriented programming and design can be contrasted with alternative programming.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object Oriented System Development with VB .NET
Aalborg Media Lab 23-Jun-15 Inheritance Lecture 10 Chapter 8.
Software Lifecycle A series of steps through which a software product progresses Lifetimes vary from days to months to years Consists of –people –overall.
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
Lecture 9 Concepts of Programming Languages
ASP.NET Programming with C# and SQL Server First Edition
Chapter 13: Object-Oriented Programming
C++ fundamentals.
Distribution of Marks Internal Sessional Evaluation Assignments – 10 Quizzes – 10 Class Participation Attendence – 5 Mid – Term Test – 25 External Evaluation.
Inheritance. © 2004 Pearson Addison-Wesley. All rights reserved 8-2 Inheritance Inheritance is a fundamental object-oriented design technique used to.
UNIT-V The MVC architecture and Struts Framework.
UFCEUS-20-2 : Web Programming Lecture 5 : Object Oriented PHP (1)
Introduction to Object Oriented Design. Topics Designing Your Own Classes Attributes and Behaviors Class Diagrams.
Programming Languages and Paradigms Object-Oriented Programming.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Lecture 8 Inheritance Richard Gesick. 2 OBJECTIVES How inheritance promotes software reusability. The concepts of base classes and derived classes. To.
An Object-Oriented Approach to Programming Logic and Design
Java Class Syntax CSIS 3701: Advanced Object Oriented Programming.
CSCI 6962: Server-side Design and Programming Support Classes and Shopping Carts.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
BTS430 Systems Analysis and Design using UML Domain Model Part 1—Finding Conceptual Classes.
Java Classes Using Java Classes Introduction to UML.
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 System Analysis and Design
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Design.ppt1 Top-down designs: 1. Define the Problem IPO 2. Identify tasks, Modularize 3. Use structure chart 4. Pseudocode for Mainline 5. Construct pseudocode.
Object-Oriented Paradigm and UML1 Introduction to the Object- Oriented Paradigm.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Introduction to Design (and Zen) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These.
Learners Support Publications Object Oriented Programming.
Abstraction ADTs, Information Hiding and Encapsulation.
1 Programming for Engineers in Python Autumn Lecture 6: More Object Oriented Programming.
Programming with Java © 2002 The McGraw-Hill Companies, Inc. All rights reserved. 1 McGraw-Hill/Irwin Chapter 5 Creating Classes.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 26 - Java Object-Based Programming Outline 26.1Introduction.
ISBN Chapter 11 Abstract Data Types and Encapsulation Concepts.
Data Design and Implementation. Definitions Atomic or primitive type A data type whose elements are single, non-decomposable data items Composite type.
Chapter 5 Classes and Methods II Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition) by S.N. Kamin, D. Mickunas, E.
(1) ICS 313: Programming Language Theory Chapter 11: Abstract Data Types (Data Abstraction)
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Chapter 18 Object Database Management Systems. Outline Motivation for object database management Object-oriented principles Architectures for object database.
Object Oriented Programming. OOP  The fundamental idea behind object-oriented programming is:  The real world consists of objects. Computer programs.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Chapter 7 Classes and Methods III: Static Methods and Variables Lecture Slides to Accompany An Introduction to Computer Science Using Java (2nd Edition)
Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Chapter 0: Introduction
Abstract Data Types and Encapsulation Concepts
Chapter 3: Using Methods, Classes, and Objects
Object-Orientated Programming
Creating and Using Classes
Lecture 9 Concepts of Programming Languages
Abstract Data Types and Encapsulation Concepts
Lecture 22 Inheritance Richard Gesick.
Chapter 20 Object-Oriented Analysis and Design
Basic OOP Concepts and Terms
Object-Oriented PHP (1)
Lecture 9 Concepts of Programming Languages
Presentation transcript:

Introduction to Object-oriented Programming CSIS 3701: Advanced Object Oriented Programming

The “Software Crisis” Most “real world” programs 10,000 – 10,000,000 lines long Take months or years to develop Created by dozens or hundreds of programmers –Many are added to or leave the project throughout development Modified over time as customer needs change

Abstracton Ability to use tool without having to understand how it works –Example: can drive car without understanding physics of internal combustion, electronics, etc. Functional abstraction: y = sqrt(x); –Do you know how C computes square root? –Do you need to?

Large-Scale Programming Abstraction key to large scale programming –No individual can understand entire system –Just need to understand your subsystem –Need to know how to use methods in other modules it interacts with Your module Other module methods Other module methods Other module methods

Data Access 3-Tier Architecture User InterfaceBusiness Logic Order Database Product Database UI developers just need to know UI design and how to call business logic methods Business logic developers just need to know business model, how will be called by UI, and how to call data access methods Data access developers just need to know SQL and database design and how will be called by business logic

Objects Object-oriented classes are abstractions “Client programmer”: Programmer who uses class in their own code Methods to access state of object Current state of object Object Only has to understand how to call methods, not how they work Does not have to understand internal representation of object state

Abstract Data Types as Objects Example: Stack abstract data type Programmer who uses Stack class void push(int) int pop() boolean isEmpty() Stack Only has to understand how these affect abstract concept of a “stack” Internal representation could be array, linked list, etc. top contents

Examples of Objects GUI components: –Attributes: width, font, text, location, etc. –Methods: setText, getText, show, hide, etc. –Can use without knowing how drawn by OS “Problem domain” classes: –Example: Order class for financial system –Attributes: order#, item, quantity, totalCost, … –Methods: getNewOrderNumber, setItem, setQuantity…

Objects vs. Classes Class defines: –Attribute types ( int top, String[] contents ) –Code for methods ( push, pop, isEmpty ) –Created by developer and added to “library” Object is an instance of a class –Constructed from class by “client programmer” –Each may have different attribute values top: 3 contents: [“Larry”, “Curley”, “Moe”] top: 2 contents: [“Fred”, “Barney”] stoogesStackbedrockStack

Constructors and Abstraction Other programmers should not have to understand internal representation to create an object Constructor: code executed automatically at object startup to define initial state –Default values –Parameters passed to constructors –Values read from file

Reuse Should never have to rewrite code from scratch Reuse in maintenance –Must be able to add abilities to new version without causing faults in existing code –Otherwise, will have to redesign/retest entire program for each modification! Existing code from previous version New code to add new abilities and features New code affects existing code

Reuse Reuse in version design –Multiple products may share common features –If those features changed, must propagate to all products –Ideally do with single change Common features of Office products (file handling, etc.) WordExcelPowerPoint Change to file handling

Java Programming Language specifically designed for object- oriented programming Abstraction: –Everything is an object –Encapsulation of internal state –Polymorphism/interfaces for abstract containers Reuse: –Inheritance of properties between classes

Abstraction in Design UML: Universal Modeling Language –Common representation for design at abstract level –Class types and relationships

Reuse in Design Abstract design ideas reused in different systems Design patterns: –Classes used to solve common problems –Example: Adaptor pattern to map to another protocol

Reuse in Design Class design level: –Typical types of classes –Typical methods within those classes Methods to set values of member variables (with validation) Methods to access (without changing) member variable values Methods to display state of object as a string …