




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
All notes lecture handwritten of classes
Typology: Lecture notes
1 / 252
This page cannot be seen from the preview
Don't miss anything!
QUANTUM PAGE PVT. LTD.
Ghaziabad New Delhi
For
B.Tech Students of Third Year
of All Engineering Colleges Affiliated to
Dr. A.P.J. Abdul Kalam Technical University,
Uttar Pradesh, Lucknow (Formerly Uttar Pradesh Technical University)
Object Oriented System Design /
Object Oriented Programming
By
Kanika Dhama
UNIT-1 : INTRODUCTION (1–1 L to 1–22 L) The meaning of Object Orientation, object identity, Encapsulation, information hiding, polymorphism, generosity, importance of modelling, principles of modelling, object oriented modelling, Introduction to UML, conceptual model of the UML, Architecture.
UNIT-2 : BASIC STRUCTURAL MODELING (2–1 L to 2–33 L) Basic Structural Modeling: Classes, Relationships, common Mechanisms, and diagrams. Class & Object Diagrams: Terms, concepts, modelling techniques for Class & Object Diagrams. Collaboration Diagrams: Terms, Concepts, depicting a message, polymorphism in collaboration Diagrams, iterated messages, use of self in messages. Sequence Diagrams: Terms, concepts, depicting asynchronous messages with/without priority, call-back mechanism, broadcast messages. Basic Behavioural Modeling: Use cases, Use case Diagrams, Activity Diagrams, State Machine, Process and thread, Event and signals, Time diagram, interaction diagram, Package diagram. Architectural Modeling: Component, Deployment, Component diagrams and Deployment diagrams.
UNIT-3 : OBJECT ORIENTED ANALYSIS (3–1 L to 3–21 L) Object Oriented Analysis: Object oriented design, Object design, Combining three models, Designing algorithms, design optimization, Implementation of control, Adjustment of inheritance, Object representation, Physical packaging, Documenting design considerations. Structured analysis and structured design (SA/SD), Jackson Structured Development (JSD). Mapping object oriented concepts using non-object oriented language, Translating classes into data structures, Passing arguments to methods, Implementing inheritance, associations encapsulation. Object oriented programming style: reusability, extensibility, robustness, programming in the large. Procedural v/s OOP, Object oriented language features. Abstraction and Encapsulation.
UNIT-4 : C++ BASICS & FUNCTIONS (4–1 L to 4–21 L) C++ Basics : Overview, Program structure, namespace, identifiers, variables, constants, enum, operators, typecasting, control structures. C++ Functions : Simple functions, Call and Return by reference, Inline functions, Macro Vs. Inline functions, Overloading of functions, default arguments, friend functions, virtual functions.
CONTENTS
KCS-054 : OBJECT ORIENTED SYSTEM DESIGN
UNIT-5 : OBJECTS AND CLASSES (5–1 L to 5–19 L) Objects and Classes : Basics of object and class in C++, Private and public members, static data and function members, constructors and their types, destructors, operator overloading, type conversion. Inheritance : Concept of Inheritance, types of inheritance: single, multiple, multilevel, hierarchical, hybrid, protected members, overriding, virtual base class. Polymorphism : Pointers in C++, Pointers and Objects, this pointer, virtual and pure virtual functions, Implementing polymorphism.
SHORT QUESTIONS (SQ–1 L to SQ–15 L)
SOLVED PAPERS (2010-11 TO 2015-16) (SP–1 L to SP–25 L)
Object Oriented System Design (KCS- 054 ) Course Outcome ( CO) Bloom’s Knowledge Level (KL)
At the end of course , the student will be able to:
CO 1
Understand the application development and analyze the insights of object oriented programming to implement application
K 2 , K 4
CO 2 Understand, analyze and apply the role of overall modeling concepts (i.e. System, structural) K 2 , K 3 CO 3 Understand, analyze and apply oops concepts (i.e. abstraction, inheritance) K 2 , K3, K 4
CO 4
Understand the basic concepts of C++ to implement the object oriented concepts K 2 , K 3
CO 5 To understand the object oriented approach to implement real world problem. K 2 , K 3
DETAILED SYLLABUS 3 - 0 - 0
Unit Topic Proposed
Lecture
I
Introduction: The meaning of Object Orientation, object identity, Encapsulation, information hiding, polymorphism, generosity, importance of modelling, principles of modelling, object oriented modelling, Introduction to UML, conceptual model of the UML, Architecture.
08
II
Basic Structural Modeling: Classes, Relationships, common Mechanisms, and diagrams. Class &Object Diagrams: Terms, concepts, modelling techniques for Class & Object Diagrams. Collaboration Diagrams: Terms, Concepts, depicting a message, polymorphism in collaboration Diagrams, iterated messages, use of self in messages. Sequence Diagrams: Terms, concepts, depicting asynchronous messages with/without priority, call-back mechanism, broadcast messages. Basic Behavioural Modeling: Use cases, Use case Diagrams, Activity Diagrams, State Machine , Process and thread, Event and signals, Time diagram, interaction diagram, Package diagram. Architectural Modeling: Component, Deployment, Component diagrams and Deployment diagrams.
08
III
Object Oriented Analysis: Object oriented design, Object design, Combining three models, Designing algorithms, design optimization, Implementation of control, Adjustment of inheritance, Object representation, Physical packaging, Documenting design considerations. Structured analysis and structured design (SA/SD), Jackson Structured Development (JSD).Mapping object oriented concepts using non-object oriented language, Translating classes into data structures, Passing arguments to methods, Implementing inheritance, associations encapsulation. Object oriented programming style: reusability, extensibility, robustness, programming in the large. Procedural v/s OOP, Object oriented language features. Abstraction and Encapsulation.
08
IV
C++ Basics : Overview, Program structure, namespace, identifiers, variables, constants, enum, operators, typecasting, control structures C++ Functions : Simple functions, Call and Return by reference, Inline functions, Macro Vs. Inline functions, Overloading of functions, default arguments, friend functions, virtual functions
08
V
Objects and Classes : Basics of object and class in C++, Private and public members, static data and function members, constructors and their types, destructors, operator overloading, type conversion. Inheritance : Concept of Inheritance, types of inheritance: single, multiple, multilevel, hierarchical, hybrid, protected members, overriding, virtual base class Polymorphism : Pointers in C++, Pointes and Objects, this pointer, virtual and pure virtual functions, Implementing polymorphism
08
Text Books
Curriculum & Evaluation Scheme CS & CSE (V & VI semester) 11
Object Oriented System Design 1–1 L (CS/IT-Sem-5)
CONTENTS
Part-1 : Introduction, The Meaning ..................... 1–2L to 1–11L of Object Orientation, Object Identity, Encapsulation, Information Hiding, Polymorphism, Generosity
Part-2 : Importance of Modelling, ...................... 1–11L to 1–19L Principles of Modelling, Object-oriented Modelling
Part-3 : Introduction of UML, ............................. 1–19L to 1–22L Conceptual Model of UML, Architecture
Introduction
Object Oriented System Design 1–3 L (CS/IT-Sem-5)
2. Attributes : They describe information about the object. 3. Behavior :
a. It specifies what the object can do. b. It defines the operation performed on objects.
4. Class :
a. A class encapsulates the data and its behavior. b. Objects with similar meaning and purpose grouped together as class.
5. Methods :
a. Methods determine the behavior of a class. b. They are nothing more than an action that an object can perform.
6. Message :
a. A message is a function or procedure call from one object to another. b. They are information sent to objects to trigger methods.
Explain the major features of Object-Oriented Programming.
Features of object-oriented language are :
1. Encapsulation :
i. Encapsulation means that data are encapsulated inside an inviolable shell along with the methods required to use it.
Message C
Method 2
Method 1
Data
Method 3
Message B Message A
Method 1
Method 5 Method 6
Data
Object 1 Object 2
Fig. 1.3.1. Message passing between objects with encapsulation, activating methods that can use or modify the data within their object.
Introduction 1–4 L (CS/IT-Sem-5)
ii. The only way to reach the data is through these particular methods (see Fig. 1.3.1). iii. It is the mechanism that binds together code and the data it manipulates. iv. This concept is also used to hide the internal representation, or state, of an object from the outside.
2. Polymorphism :
i. Polymorphism means having many forms. ii. Polymorphism is the ability of a message to be displayed in more than one form. iii. It plays an important role in allowing objects having different internal structure to share the same external interface.
3. Inheritance :
i. Inheritance is the ability to create classes that share the attributes and methods of existing classes, but with more specific features. ii. Inheritance is mainly used for code reusability.
Steps of object-oriented design :
1. System analysis :
i. In this stage a statement of the problem is formulated and a model is build. This phase show the important properties associated with the situation. ii. The analysis model is a concise, precise abstraction and agreement on how the desired system must be developed. iii. The objective is to provide a model that can be understood by any application experts in the area.
2. System design :
i. At this stage, the complete system architecture is designed. ii. In this stage the whole system is divided into subsystems, based on system analysis model and the proposed architecture of the system.
3. Object design :
i. At this stage, a design model is developed based on the analysis model. ii. The object design decides the data structures and algorithms needed to implement each of the classes in the system.
Introduction 1–6 L (CS/IT-Sem-5)
What is the difference between Procedure Based programming language and Object-Oriented programming language?
Write short notes on : Procedural v/s OOP.
S. No. Procedural Oriented Object-Oriented Programming Programming
Discuss the pros and cons of object-oriented technology with
In object-oriented programming, program is divided into small parts called objects.
Object-oriented programming follows bottom up approach.
Object-oriented programming has access specifiers like private, public, protected etc.
Adding new data and function is easy.
Object-oriented programming provides data hiding so it is more secure.
Overloading is possible in object-oriented programming.
In object-oriented programming, data is more important than function.
Object-oriented programming is based on real world.
Examples : C++, Java, Python, C# etc.
Object Oriented System Design 1–7 L (CS/IT-Sem-5)
OR What do you mean by object-oriented techniques? Explain with
a. With OOP, because our coding base has been centralized, it is easier to create a maintainable procedure code. b. That makes it easier to keep our data accessible when it becomes necessary to perform an upgrade. c. This process also improves the security of the programming since high levels of validation are often required. Cons of object-oriented technology are :
1. It is inefficient :
a. Object-oriented programming tends to use more CPU than alternative options. b. That can make it inefficient choice when there are technical limitations involved due to the size.
2. It is scalable :
a. If OOP is out of control, then it can create a massive amount of bloated, unnecessary code. b. When that occurs, the overhead rises and that makes it difficult to keep costs down.
3. It causes duplication :
a. OOP projects tend to be easier to design than implement. b. That is because of the modular classes that are so flexible in their application.
Object Oriented System Design 1–9 L (CS/IT-Sem-5)
For example , if getSalary() is a method of the object ‘Employee’ to get the salary of an employee, then the salary of an employee can be obtained by no other way but by this method.
Methods
Message (^) Attribute Message hidden
Fig. 1.9.1. Encapsulation of an object.
Using message passing to encapsulate the implementation of an object : Other parts of a system only see an object’s interface (services it can perform and operation signatures). Internal details including data are hidden and can only be accessed by a message that contains a valid signature.
Introduction 1–10 L (CS/IT-Sem-5)
What do you mean by polymorphism? Is this concept only applicable to object-oriented systems? Explain.
Define polymorphism. Is this concept only applicable to object-
Introduction 1–12 L (CS/IT-Sem-5)
a. Testing a physical entity before building it :
i. Simulating a model is cheaper. Also, it provides information that is too inaccessible to be measured from physical model. ii. Computer models are usually cheaper than building a complete system and it enable flaws to be corrected early. For example : Scale models of airplane and cars are tested in wind tunnels to improve their aerodynamic.
b. Communication with customers :
i. Software designers build models to show their customers. For example : Demonstration products like mock-ups that imitate some or all of the external behavior of a system.
c. Visualization :
i. Storyboards of movies, television shows, and advertisements allow the writers to see how their idea flows. ii. Using models unnecessary segments can be modified before the final development begins.
d. Reduction of complexity :
i. Modeling helps in understanding the systems that are too complex to understand directly. ii. Model reduces complexity by leaving out the non essential details.
languages? OR Write short note on dynamic modeling and functional modeling.
There are three types of models in object oriented languages are :
1. Object model :
a. The object model identifies the classes in the system and their relationship, as well as their attributes and operations. b. It represents the static structure of the system. The object model is represented graphically by a class diagram.
2. Dynamic model :
a. The dynamic model indicates the dynamics of the objects and their changes in state. b. The dynamic model captures the functional behavior of the system by exploring the behavior of the objects over time and the flow of control and events among the objects.
Object Oriented System Design 1–13 L (CS/IT-Sem-5)
3. Functional model :
a. The functional model is a data flow diagram of the system and describes what the system does, not how it is done. b. A DFD is a network representation of the system to show the functional relationships of the values that are computed by a system. c. Data flow diagrams consist of processes, data flows, actors and data stores.
a. Data store b. Actors
a. Data store :
b. Actors :
c. Control flow :