Advanced Object Oriented Programming – Abstract classes and Interfaces Chapter 27.

Slides:



Advertisements
Similar presentations
EDUC4417 Senior Computers Dr. Mumbi Kariuki January 28, 2004 Object-Orientation David Cuillerier.
Advertisements

UML an overview.
Department of Computer Engineering Faculty of Engineering, Prince of Songkla University 1 5 – Abstract Data Types.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Design Patterns for Object Oriented systems CSC 515 Ashwin Dandwate.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Object-Oriented.
Chapter 1 Object-Oriented System Development
Introduction To System Analysis and Design
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
CS1001 Lecture 26. Overview Artificial Intelligence Artificial Intelligence Database Systems Database Systems.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object Oriented System Development with VB .NET
Slides prepared by Rose Williams, Binghamton University Chapter 13 Interfaces and Inner Classes.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
Programming Languages Structure
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
8.1 Classes & Inheritance Inheritance Objects are created to model ‘things’ Sometimes, ‘things’ may be different, but still have many attributes.
Threading in Java – a Tutorial QMUL IEEE SB. Why Threading When we need to run two tasks concurrently So multiple parts (>=2) of a program can run simultaneously.
What is Concurrent Programming? Maram Bani Younes.
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 12 Object-Oriented.
Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and Elizabeth Drake Chapter 8: More About OOP and GUIs.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
(C) 2010 Pearson Education, Inc. All rights reserved. Java™ How to Program, 8/e.
OO (Object Oriented) Programming Chapter 21 IB103 Week 12.
Object-Oriented Modeling Chapter 10 CSCI CSCI 1302 – Object-Oriented Modeling2 Outline The Software Development Process Discovering Relationships.
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
CSC480 Software Engineering Lecture 11 September 30, 2002.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
A Guide to Advanced Java Faculty:Nguyen Ngoc Tu. Concurrent programming in Java How to make all things run-able?
DISTRIBUTED COMPUTING. Computing? Computing is usually defined as the activity of using and improving computer technology, computer hardware and software.
Dale Roberts Object Oriented Programming using Java - Introduction Dale Roberts, Lecturer Computer Science, IUPUI Department.
Characteristics of the Database Approach (Difference between traditional file processing and database approach) Redundancy Self-Describing nature of a.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
Concurrency Control 1 Fall 2014 CS7020: Game Design and Development.
Management Information Systems
Interfaces Chapter 9. 9 Creating Interfaces An interface is a contract. Every class that implements the interface must provide the interface’s defined.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 11 Object-Oriented.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
February 8, 2006copyright Thomas Pole , all rights reserved 1 Lecture 3: Reusable Software Packaging: Source Code and Text Chapter 2: Dealing.
JAVA INTRODUCTION. What is Java? 1. Java is a Pure Object – Oriented language 2. Java is developing by existing languages like C and C++. How Java Differs.
Slide 1 Chapter 1 Desktop Computer © 2012 EMC Publishing, LLC.
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
Slides prepared by Rose Williams, Binghamton University Chapter 20 Java Never Ends.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Computer Programming - Key Concepts and Terms Computer Program – A computer program is a set of instructions for computer, arranged in logical order, using.
1 Section 11.4 Java Interfaces – The Implementation Perspective Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Chapter 11: Abstract Data Types Lecture # 17. Chapter 11 Topics The Concept of Abstraction Advantages of Abstract Data Types Design Issues for Abstract.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Java Interfaces CS 21a: Introduction to Computing I Department of Information Systems and Computer Science Ateneo de Manila University (see Chapter 9 of.
Applications Active Web Documents Active Web Documents.
Advanced Programming in Java
Advanced Programming in Java
Sections Inheritance and Abstract Classes
Object-Oriented Programming Concepts
Chapter 4: Business Process and Functional Modeling, continued
Chapter 8: More About OOP and GUIs
Chapter 11 Object-Oriented Design
PRINCIPALES OF OBJECT ORIENTED PROGRAMMING
The Object-Oriented Thought Process Chapter 08
What is Concurrent Programming?
Advanced Programming in Java
Advanced Programming in Java
What is Concurrent Programming?
Seminar 2 Design of Informatics Systems
Interfaces, Classes & Objects
Basic Probability Chapter Goal:
Presentation transcript:

Advanced Object Oriented Programming – Abstract classes and Interfaces Chapter 27

Purpose: to simplify the design of medium to large sized programs Advanced OOD concern with the identification of class structures and inheritance

Chapter facilities: Interfaces: “neatest” way for programs to deal with events Abstract classes

Abstract classes – set up a class to be reused Example program “Rectangle” See Author’s web site. Rectangle” extends “Shape” which is an abstract class Declaring a class abstract forces programmer who uses it (via inheritance,) to provide missing methods – which “enforces” a particular design

Interfaces Used in “Balloon” Public interface Balloon { … Note NO class An interface describes only the services provided by the class public class Spheroid implements Balloon …

Compiler checks to see if it complies with the interface declaration Examples: Programs that use Buttons implement ActionListeners and Scrollbars AdjustmentListeners

Interface can be used to describe classes in a program Inheritance structure “Is a” relationship Can Not describe: Implementations of methods Classes which use other classes (“has a”) relationship

Multiple Inheritance Some languages (C++) not Java Java allows multiple implementations Example programs: “Entertainment” and program “TV” which extends “Entertainment”

Interfaces versus abstract classes 1. Abstract classes can provide implementation of one or more methods 2. Can implement more than one interface but only extend (inherit) from one abstract class 3. An interface is something that is used at compile time to perform checking 4. Abstract class implies it’s methods will be fleshed out by the class that extends it

Designing multithreaded programs 1. Use methods described in chapter Analyze applications to see activities that need to be carried out in parallel 3. Identify those objects that need to be threads 4. Identify the nature of the interaction between threads (independent, mutual, exclusion, producer-consumer)

Other approaches: Information systems: examples Airline ticket reservation system Real time systems Fly by wire Knowledge based systems AI Parallel or concurrent systems Any computer systems that can carry on two or more tasks simultaneously Mathematical “complex” processing Games especially those with good graphics