Object Orientated Analysis and Design. Benjamin Kenwright

Similar documents
Examples. Object Orientated Analysis and Design. Benjamin Kenwright

Notation Part 1. Object Orientated Analysis and Design. Benjamin Kenwright

Polymorphism. Object Orientated Programming in Java. Benjamin Kenwright

Chapter 5 Object-Oriented Programming

Java Class Design. Eugeny Berkunsky, Computer Science dept., National University of Shipbuilding

ENCAPSULATION. private, public, scope and visibility rules. packages and package level access.

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

Object Model. Object Orientated Analysis and Design. Benjamin Kenwright

SRM ARTS AND SCIENCE COLLEGE SRM NAGAR, KATTANKULATHUR

Inheritance and Interfaces

SEEM4570 System Design and Implementation. Lecture 11 From Design to Implementation

Object-Oriented Concepts and Principles (Adapted from Dr. Osman Balci)

Java Basics. Object Orientated Programming in Java. Benjamin Kenwright

Object Oriented Programming: Based on slides from Skrien Chapter 2

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING


CHAPTER 5 GENERAL OOP CONCEPTS

CLASSES AND OBJECTS IN JAVA

What are the characteristics of Object Oriented programming language?

Object-Oriented Design

Classes and Objects. Object Orientated Analysis and Design. Benjamin Kenwright

Object-Oriented Design

Exam Duration: 2hrs and 30min Software Design

Inheritance and Polymorphism

Practice for Chapter 11

Introduction. Object Orientated Analysis and Design. Benjamin Kenwright

BASIC CONCEPT OF OOP

What is Inheritance?

Object-Oriented Modeling Using UML. CS151 Chris Pollett Aug. 29, 2005.

Introduction to Programming Using Java (98-388)

OBJECT ORIENTED PROGRAMMING USING C++ CSCI Object Oriented Analysis and Design By Manali Torpe

JAVA MOCK TEST JAVA MOCK TEST II

Compaq Interview Questions And Answers

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

PROGRAMMING LANGUAGE 2


Dr. Md. Humayun Kabir CSE Department, BUET

Objective Questions. BCA Part III Paper XIX (Java Programming) page 1 of 5

OBJECT ORİENTATİON ENCAPSULATİON

Object-Oriented Programming (OOP) Fundamental Principles of OOP

Object-Oriented Design (OOD) and C++

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8.

JavaScript Syntax. Web Authoring and Design. Benjamin Kenwright

Object Oriented Programming. Solved MCQs - Part 2

CS5000: Foundations of Programming. Mingon Kang, PhD Computer Science, Kennesaw State University

VALLIAMMAI ENGINEERING COLLEGE

Object-Oriented Programming Concepts

C++ (Non for C Programmer) (BT307) 40 Hours

G Programming Languages - Fall 2012

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Programming II (CS300)

Data Structures (list, dictionary, tuples, sets, strings)

ITI Introduction to Computing II

Subclass Gist Example: Chess Super Keyword Shadowing Overriding Why? L10 - Polymorphism and Abstract Classes The Four Principles of Object Oriented

CSCU9T4: Managing Information

Oops known as object-oriented programming language system is the main feature of C# which further support the major features of oops including:

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

CREATED BY: Muhammad Bilal Arslan Ahmad Shaad. JAVA Chapter No 5. Instructor: Muhammad Naveed

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Object oriented programming Concepts

Lecture 7: Classes and Objects CS2301

Advanced Programming Using Visual Basic 2008

Object Oriented Programming. C++ 6 th Sem, A Div Ms. Mouna M. Naravani

DHANALAKSHMI SRINIVASAN COLLEGE OF ENGINEERING AND TECHNOLOGY ACADEMIC YEAR (ODD SEM)

Lesson 10B Class Design. By John B. Owen All rights reserved 2011, revised 2014

JAVA: A Primer. By: Amrita Rajagopal

G Programming Languages Spring 2010 Lecture 9. Robert Grimm, New York University

Week. Lecture Topic day (including assignment/test) 1 st 1 st Introduction to Module 1 st. Practical

ENCAPSULATION AND POLYMORPHISM

ITI Introduction to Computing II

Ans 1-j)True, these diagrams show a set of classes, interfaces and collaborations and their relationships.

Complexity. Object Orientated Analysis and Design. Benjamin Kenwright

IT101. Inheritance, Encapsulation, Polymorphism and Constructors

MaanavaN.Com CS1203 OBJECT ORIENTED PROGRAMMING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

Java for Programmers Course (equivalent to SL 275) 36 Contact Hours

Java. Classes 3/3/2014. Summary: Chapters 1 to 10. Java (2)

Get Unique study materials from

Defining Classes and Methods

CompuScholar, Inc. Alignment to Nevada "Computer Science" Course Standards

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

(5-1) Object-Oriented Programming (OOP) and C++ Instructor - Andrew S. O Fallon CptS 122 (February 4, 2019) Washington State University

Inheritance and Encapsulation. Amit Gupta

Classes, Objects, and OOP in Java. June 16, 2017

CSE 307: Principles of Programming Languages

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

Java Object Oriented Design. CSC207 Fall 2014

An Introduction to Object Orientation

Experiment no 4 Study of Class Diagram in Rational Rose

A A B U n i v e r s i t y

Software Development. Modular Design and Algorithm Analysis

Overview of OOP. Dr. Zhang COSC 1436 Summer, /18/2017

Object Oriented Programming with Java. Unit-1

Chapter 1: Object-Oriented Programming Using C++

Inheritance, and Polymorphism.

Data Structures using OOP C++ Lecture 3

Chapter 4 Defining Classes I

Object Oriented Programming is a programming method that combines: Advantage of Object Oriented Programming

UML Primer. -Elango Sundaram

CS304 Object Oriented Programming Final Term

Transcription:

Notation Part 2 Object Orientated Analysis and Design Benjamin Kenwright

Outline Review What do we mean by Notation and UML? Types of UML View Continue UML Diagram Types Conclusion and Discussion Summary

Revision Question Write down the UML Class Diagram visibility attributes: Public Private Protected Package

Answer Public (+) Visible to any element that can see the class Protected (#) Visible to other elements within the class and to subclasses Private (-) Visible to other elements within the class Package (~) Visible to elements within the same package

Revision Question Draw the notations for the different types of relationships

Answer

Question Is an Activity Diagram a static or dynamic system model? a) Static (Structural) b) Dynamic (Behavioral)

Answer b) Dynamic (Behavioral)

Revision Question List the various UML Diagram Types

Answer

Question What type of Diagram is this:

Answer Component Diagram A component diagram shows the internal A component diagram shows the internal structure of components and their dependencies with other components

Question Draw a simple Activity Diagram?

Answer Activity diagrams provide visual depictions of the flow of activities, whether in a system, business, workflow, or other process Example

Review Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams Last Week

Sequence Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Sequence Diagram A sequence diagram traces the execution of a scenario in the same context as an object diagram. To a large degree, a sequence diagram is simply another way to represent an object diagram

Example

Interaction Overview Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Interaction Overview Diagram Interaction overview diagrams are a combination of activity diagrams and interaction diagrams Intended to provide an overview of the flow of control between interaction diagram elements

Example

Composite Structure Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Composite Structure Diagram Composite structure diagrams provide a way to depict a structured classifier with the definition of its internal structure. This internal structure is comprised of parts and their interconnections, all within the namespace of the composite structure.

Example

State Machine Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

State Machine Diagram A state machine diagram is used to design and understand time-critical systems A state machine diagram expresses behavior as a progression through a series of states, triggered by events, and the related actions that may occur These are also known as behavioral state machines

Example

Timing Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Timing Diagrams Timing diagrams are a type of interaction diagram Their purpose is to show how the states Their purpose is to show how the states of an element or elements change over time and how events change those states

Example

Object Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Object Diagram An object diagram is used to show the existence of objects and their relationships in the logical design of a system Stated another way, an object diagram represents a snapshot in time of an otherwise transitory stream of events over a certain configuration of objects.

Example

Communication Diagrams Package Diagrams Component Diagrams Deployment Diagrams Use Case Diagrams Activity Diagrams Class Diagrams Sequence Diagrams Interaction Overview Diagrams Composite Structure Diagrams State Machine Diagrams Timing Diagrams Object Diagrams Communication Diagrams

Communication Diagram A communication diagram is a type of interaction diagram that focuses on how objects are linked and what messages they pass as they participate in a specific interaction

Example

Summary Clear idea of Notation in Object Orientated Analysis and Design Visualising System UML Diagrams (Types) UML Diagrams

This Week Review Slides Read Chapter 6 Online Quizzes Version Control (GitHub)

Questions/Discussion Research Task What was the first object oriented language?

Revision Question Name any three object oriented programming languages?

Answer Example, C++, java, small talk and C# are most popular object oriented programming languages.

Question What do we mean by data hiding?

Answer Data hiding or encapsulation, is the mechanism in which implementation details of a class are kept hidden from the user (or external world) For example, data hiding concept is supported using the pubic, protected and private keywords which are placed in the declaration of the class

Question Briefly summarize the importance of using inheritance

Answer Inheritance is one of the most powerful features of object oriented programming. Most important advantages of inheritance are: Reusability Saves times and efforts Closeness with the real world Easy modification Transitive Nature of inheritance

Question What do you mean by overloading of a function? When do you use this concept? Give an example of function overloading?

Answer Function overloading is a technique where several function declarations are specified with a same name that can perform similar tasks, but on different data types (distinguished by their number and type of arguments) Example int add (int a, int b); int add (int a, int b, int c); float add (float a, float b); Hence, overloaded functions perform different activities depending upon the kind of data sent to them

Question List the difference between Polymorphism and Overloading?

Answer Polymorphism Polymorphism is an important concept of OOPS. Polymorphism means ability of one object to take many different forms. Two main types of polymorphism: Runtime polymorphism Compile time polymorphism Overloading Overloading is the mechanism to implement polymorphism. Overloading is the mechanism to use the same thing for different purposes.