CS 432 OOAD Spr 8W1 Session 1. Agenda Introductions First night roster Student Rep Course Overview OO Concepts OO SDLC Rational Site Homework I discussion.

Slides:



Advertisements
Similar presentations
Understand and appreciate Object Oriented Programming (OOP) Objects are self-contained modules or subroutines that contain data as well as the functions.
Advertisements

IMS1805 Systems Analysis Topic 3: Doing Analysis (continued from previous weeks)
OBJECT ORIENTED PROGRAMMING M Taimoor Khan
Solutions to Review Questions. 4.1 Define object, class and instance. The UML Glossary gives these definitions: Object: an instance of a class. Class:
CS 106 Introduction to Computer Science I 04 / 11 / 2008 Instructor: Michael Eckmann.
Classes and Object- Oriented... tMyn1 Classes and Object-Oriented Programming The essence of object-oriented programming is that you write programs in.
I NHERITANCE Chapter 10. I NHERITANCE Mechanism for enhancing existing classes You need to implement a new class You have an existing class that represents.
Ch 12: Object-Oriented Analysis
Systems development life cycle & development methodologies
Chapter 1 Object-Oriented System Development
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Object Oriented System Development with VB .NET
Fall 2007ACS-1805 Ron McFadyen1 Programming Concepts Chapter 4 introduces more advanced OO programming techniques. Construction of a programs usually requires:
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Basic OOP Concepts and Terms
CS 106 Introduction to Computer Science I 11 / 15 / 2006 Instructor: Michael Eckmann.
Chapter Chapter 1 Introduction to Object-Oriented Programming and Software Development.
Object-oriented Programming Concepts
Database Design Concepts Info 1408 Lecture 2 An Introduction to Data Storage.
1 Introduction to C++ Programming Concept Basic C++ C++ Extension from C.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Chapter 1 The Systems Development Environment
BACS 287 Basics of Object-Oriented Programming 1.
Introduction To System Analysis and design
(c) University of Washington04-1 CSC 143 Java Inheritance Example (Review)
Programming Languages and Paradigms Object-Oriented Programming.
CSM-Java Programming-I Spring,2005 Introduction to Objects and Classes Lesson - 1.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
CS 106 Introduction to Computer Science I 04 / 13 / 2007 Friday the 13 th Instructor: Michael Eckmann.
Chapter 1 The Systems Development Environment
Object Orientation An Object oriented approach views systems and programs as a collection of interacting objects. An object is a thing in a computer system.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter Chapter 1 Introduction to Object-Oriented Programming and.
BCS 2143 Introduction to Object Oriented and Software Development.
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
Module 7: Object-Oriented Programming in Visual Basic .NET
CONCEPTS OF OBJECT ORIENTED PROGRAMMING. Topics To Be Discussed………………………. Objects Classes Data Abstraction and Encapsulation Inheritance Polymorphism.
Chapter 2: Objects and Primitive Data Classes and Objects String, Random, Math, NumberFormat, DecimalFormat and Wrapper Classes.
Satzinger Chp. 2 Part Part 4 of 4 2 Object-Oriented Analysis and Design with the Unified Process Testing Testing is critical discipline Testing activities.
CSE 501N Fall ‘09 15: Polymorphism October 22, 2009 Nick Leidenfrost.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Requirements Analysis Visual Modeling] Lab 02 Visual Modeling (from Visual Modeling with Rational Rose and UML) A way of thinking about problems using.
1 21 COP 3540 Data Structures with OOP Overview: Chapter 1.
1 Object-Oriented Systems Development Bahrami © Irwin/ McGraw-Hill Chapter 2: Object Basics Object-Oriented Systems Development Using the Unified Modeling.
Copyright 2003 Scott/Jones Publishing Standard Version of Starting Out with C++, 4th Edition Chapter 13 Introduction to Classes.
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Object Oriented Software Development
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Learners Support Publications Object Oriented Programming.
CS451 - Lecture 2 1 CS451 Lecture 2: Introduction to Object Orientation Yugi Lee STB #555 (816) * Acknowledgement:
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Lecture 2: Review of Object Orientation. © Lethbridge/La ganière 2005 Chapter 2: Review of Object Orientation What is Object Orientation? Procedural.
1 CSE Programming in C++. 2 Overview Sign roster list Syllabus and Course Policies Introduction to C++ About Lab 1 Fill Questionnaire.
Lesson 1 1 LESSON 1 l Background information l Introduction to Java Introduction and a Taste of Java.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
COP 4331 – OOD&P Lecture 7 Object Concepts. What is an Object Programming language definition: An instance of a class Design perspective is different.
The Movement To Objects
CHAPTER 5 GENERAL OOP CONCEPTS.
Concepts of Object Orientation
Phil Tayco Slide version 1.0 Created Nov. 26, 2017
CS2011 Introduction to Programming I Objects and Classes
ITEC 3220A Using and Designing Database Systems
Basic OOP Concepts and Terms
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Presentation transcript:

CS 432 OOAD Spr 8W1 Session 1

Agenda Introductions First night roster Student Rep Course Overview OO Concepts OO SDLC Rational Site Homework I discussion Form Groups

Introductions One paragraph on background and interests Contact sheet: Public phone and if available Meet your neighbor

Course Overview Syllabus Project Overview Expectations

OO Concepts

What’s a class? What’s an object? A class is a “template” for a specific type of objects. –Generally classes generally represent real world objects e.g. (bank account), but also may represent transactions (deposit) –An object is an instance of a class– a member of a class that has a unique identity (e.g. my bank account, the deposit I made yesterday) –Classes have attributes (variable values) that distinguish them from other classes and their instances from each other. –Classes have methods, which allow them to perform tasks for themselves Behavior is what a class is capable of doing, based on the methods at its disposal Class Name: Bank Account Attributes: Owner Account Number Balance Date Established Methods: MakeDeposit ( double amt) MakeWithdrawal (double amt)

Can you really inherit class? No, but you can inherit attributes that may or may not be classy! Inheritance: The creation of a new class from an existing superclass The new class is called a subclass or child It “inherits” the attributes and methods from the superclass and can change or add to them CheckingAccount and SavingsAccount are subclasses of BankAccount They inherit all of the attributes and methods from BankAccount (previous slide) They can add their own (next slide) Bank Account Savings Account ? Checking Account ?

Inheritance and Subclasses In our hypothetical bank, all accounts have an Owner, Account Number, Balance, and a Date Established. Savings Accounts: The interest rate paid varies based on the current balance. Statements will show all common attributes and the interest rate. Checking Accounts: A penalty is assessed once the balance drops below a minimum value. Statements will show all common attributes and the penalty assessed. Bank Account Savings Account intRate SetIntRate(double balance) printStatement() Checking Account minimumBal SetMinBalance(double minBal) AssessPenalty(double minBal, double balance) printStatement()

Object Communications— Messages from Beyond… Objects and classes communicate using messages –Messages are of the form object_being_addressed. method(args) –The message signature must be correct for the method being addressed: JayzDismalCheckingAccount minimumBal SetMinBalance(double minBal) AssessPenalty(double minBal, double balance) printStatement() JayzDismalCheckingAccount.SetMinBalance( ) Here we see the message to set the balance for the JayzDismalCheckingAccount object to $

Polymorphism isn’t a science fiction creature Polymorphism is the ability for different objects to respond differently to the same message. Namely, each object responds appropriately printStatement() SavingsAccountCheckingAccount When a SavingsAccount object is sent a message invoking the PrintStatement() method, it prints out the Owner, Account Number, Balance AND the applicable interest rate When a CheckingAccount object is sent a message invoking the PrintStatement() method, it prints out the Owner, Account Number, Balance AND the applicable penalty

Abstraction and Encapsulation NASA Strikes Again???? The general idea here is that to use an object you don’t need to know how it does stuff or anything about its internal variables. –Easier to use. Send it a message that fits the required signature. Why do I care how the SavingsAccount object prints a statement or an Integer object converts a string? –Easier to maintain. If Sun rewrites the conversion routine, it doesn’t affect how I use the conversion routine. Its still Integer.parseInt(arg) to me. Encapsulation: Variables within the object are set using the object’s methods, not accessed directly by outside entities Much more to come…

OO Software Lifecycle Requirements analysis –What does the customer need from his perspective? –The system needs to record whenever a part is received at the warehouse? Analysis –How do we do it? What are the primary real world “abstractions”– classes and objects-- we need to work make and work with? What are the mechanisms used in the real world? –The warehouse people unload each pallet, break open each box, count each part by part number. A barcode on each part is available.

OO Software Lifecycle (con't) Design –Identifying the objects that make up the solution/ technical infrastructure. –Builds on the analysis and results in the detailed specs for the construction phase. –User interface that allows for entry of the number of each item, manually or using a barcode reader. For each shipment, if a part is entered at several different times the numbers will be combined into a single entry in the receiving record.

OO Software Lifecycle (con't) Construction/Implementation –Writing the code using an OO programming language Test –Unit tests– does each piece of code meet its spec? –Integration test- doe the pieces of code work together? –System test- does the system meet the users needs as identified in the spec/model? –Acceptance test- does it really do the job?

OO Software Lifecycle (con't) Verification- Am I building the right product? Validation- Am I building the product right? Prototyping- a version of product developed early on to demonstrate or experiment with a concept (e.g. a user interface) –Generally not complete functionality, throw away –User may view the job "almost done" –Types: Horizonal- I/F no functionality Vertical- Narrow focus to test a specific funciton Analysis- Proof of concept Domain- Incremental part of a final product –RAD –Component Based Development

Extra- OO Concepts Object Basics What is an object? –"…a real-world entity, identifiably separate from its surroundings." –"… a combination of data and logic that represents a real world entity Data = attributes, properties, fields Logic = methods, functions Behavior = "…the collection of methods that abstractly describes what an object is capable of doing." –An object is a uniquely identifiable entity (i.e. you).

Extra-OO Concepts Object Basics con't An Object is an instance of a Class A class –"…is a set of objects that share a common structure and a common behavior" –can be thought of as "an object template" The me object is an instance of the human class –Attributes that are common to humans/ set us apart from other species or things? set us apart from each other? –Methods that are common to humans/ set us apart from other species or things? set us apart from each other?