 2008 Pearson Education, Inc. All rights reserved. 1 13.10 (Optional) Software Engineering Case Study: Incorporating Inheritance into the ATM System UML.

Slides:



Advertisements
Similar presentations
2006 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Inheritance.
Advertisements

2006 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
Copyright © 2014, 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Eighth Edition by Tony Gaddis,
7.1 – The Logarithm Defined as an Integral © 2010 Pearson Education, Inc. All rights reserved.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with C++ Early Objects Sixth Edition Chapter 15: Polymorphism,
CSE 1302 Lecture 8 Inheritance Richard Gesick Figures from Deitel, “Visual C#”, Pearson.
Paul Deitel, CEO Deitel & Associates, Inc.. Contact Information  Paul Deitel, CEO  Deitel & Associates, Inc.  Twitter:  Facebook:
Chapter 12 ATM Case Study, Part 1: Object-Oriented Design with the UML
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Object-Oriented.
 2008 Pearson Education, Inc. All rights reserved Control Statements: Part 2.
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Starting to Program the Classes of the ATM System.
 2006 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
 2008 Pearson Education, Inc. All rights reserved Introduction to C++ Programming.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
© Copyright 1992–2005 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Tutorial 17 – Payroll Application: Introducing Inheritance.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 2005 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
 2008 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
Chapter 10: Inheritance 1. Inheritance  Inheritance allows a software developer to derive a new class from an existing one  The existing class is called.
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements.
Object Oriented Programming using Java - Polymorphism
 2009 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Inheritance.
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 3: Requirements Specification, C++ Basics.
(C) 2010 Pearson Education, Inc. All rights reserved. Java How to Program, 8/e.
ATM Case Study Chapter 1-10 Optional Sections
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
Dale Roberts Object Oriented Programming using Java - OOD to OOP: ATM Case Study Dale Roberts, Lecturer Computer Science, IUPUI
Reformatted slides from the textbook, C++ How to Program, 6/e Pearson Education, Inc. All rights reserved Chapter 3. [Lecture 02] Introduction to.
Information Systems Engineering
Designing Classes Prelude © 2015 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. Data Structures and Abstractions with Java, 4e Frank.
 2006 Pearson Education, Inc. All rights reserved Polymorphism, Interfaces & Operator Overloading.
 2006 Pearson Education, Inc. All rights reserved Polymorphism, Interfaces & Operator Overloading.
Chapter 13 ATM Case Study Part 2: Implementing an Object-Oriented Design Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved.
 2006 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
Class diagrams Terézia Mézešová.
 2009 Pearson Education, Inc. All rights reserved Polymorphism, Interfaces & Operator Overloading.
 2000 Prentice Hall, Inc. All rights reserved. Chapter 20 - Virtual Functions Outline 20.1Introduction 20.2Type Fields and switch Statements 20.3Virtual.
 2006 Pearson Education, Inc. All rights reserved Object-Oriented Programming: Polymorphism.
Chapter 11 Inheritance © 2008 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved. Marilyn Bohl/Maria Rynn Tools for Structured and Object-Oriented.
C++ How to Program, 7/e.  There are cases in which it’s useful to define classes from which you never intend to instantiate any objects.  Such classes.
Part -1 © by Pearson Education, Inc. All Rights Reserved.
 2007 Pearson Education, Inc. All rights reserved Introduction to Classes and Objects.
© 2010 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Appendix A: UML Java Software Structures: Designing and Using Data.
Object-Oriented Programming: Polymorphism
Polymorphism, Interfaces & Operator Overloading
Unified Modeling Language (UML)
© 2017 Pearson Education, Hoboken, NJ. All rights reserved
© 2015 Pearson Education, Inc.
Operator Overloading; Class string
Object-Oriented Programming
© 2015 Pearson Education, Inc.
Polymorphism, Interfaces & Operator Overloading
Object-Oriented Programming: Polymorphism
Chapter 13 ATM Case Study Part 2: Implementing an Object-Oriented Design Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved.
Welcome App Android How to Program
Android Market and App Business Issues
Domain Class Diagram Chapter 4 Part 2 pp
Object-Oriented Programming: Polymorphism
Slides by Steve Armstrong LeTourneau University Longview, TX
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
“Under the Hood” of Polymorphism
Definition Copyright © 2013 Pearson Education, Inc.. All rights reserved.
Object-Oriented Programming: Polymorphism
Software Engineering System Modeling Chapter 5 (Part 1) Dr.Doaa Sami
By Rajanikanth B OOP Concepts By Rajanikanth B
Section 10.5 The Dot Product
Chapter 11 Class Inheritance
Presentation transcript:

 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Incorporating Inheritance into the ATM System UML model for inheritance – The generalization relationship The base class is a generalization of the derived classes The derived classes are specializations of the base class – Pure virtual functions are abstract operations in the UML – Generalizations and abstract operations are written in italics Transaction base class – Contains the functions and data members BalanceInquiry, Withdrawal and Deposit have in common execute function accountNumber data member

 2008 Pearson Education, Inc. All rights reserved. 2 Fig | Attributes and operations of classes BalanceInquiry, Withdrawal and Deposit.

 2008 Pearson Education, Inc. All rights reserved. 3 Fig | Class diagram modeling generalization relationship between base class Transaction and derived classes BalanceInquiry, Withdrawal and Deposit.

 2008 Pearson Education, Inc. All rights reserved. 4 Fig | Class diagram of the ATM system (incorporating inheritance). Note that abstract class name Transaction appears in italics.

 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Incorporating Inheritance into the ATM System (Cont.) Incorporating inheritance into the ATM system design – If class A is a generalization of class B, then class B is derived from class A – If class A is an abstract class and class B is a derived class of class A, then class B must implement the pure virtual functions of class A if class B is to be a concrete class

 2008 Pearson Education, Inc. All rights reserved. 6 Fig | Class diagram after incorporating inheritance into the system.

 2008 Pearson Education, Inc. All rights reserved. 7 Outline Withdrawal.h (1 of 1) Class Withdrawal inherits from Transaction

 2008 Pearson Education, Inc. All rights reserved. 8 Outline Withdrawal.h (1 of 1) Class Withdrawal inherits from Transaction

 2008 Pearson Education, Inc. All rights reserved. 9 Outline Transaction.h (1 of 1) Declare pure virtual function execute Transaction is an abstract class, contains a pure virtual function