Object oriented design
In this section of unit 3, we studied about object-oriented design. -Introduction, Features of object oriented design and Design model (Use case, class diagram, Sequence diagram, Activity) .
Summary
In this section of unit 3, we studied about object-oriented design. -Introduction, Features of object oriented design and Design model (Use case, class diagram, Sequence diagram, Activity) .
Things to Remember
- . An object oriented system is made up of interacting objects that maintain their own local state and private operation on that state
- An object is an entity that has a state and a defined set of operations that operates on that state
- Object-oriented design has several stages. They are:System context and modes of use. Define the system architecture., Object identification, Design model and Object interface identification.
- There are mainly two types of design model i.e. static and dynamic. Some of them are: subsystem model, sequence model, use-case model, and state machine model.
MCQs
No MCQs found.
Subjective Questions
Q1:
Define whooping cough?
Type: Very_short Difficulty: Easy
Q2:
What causes the whooping cough and list the symptoms?
Type: Short Difficulty: Easy
<p>Symptoms are:</p>
<p>Once you become infected with whooping cough, it can take one to three weeks for signs and symptoms to appear. They're usually mild at first and resemble those of a common cold:</p>
<p>- Runny nose</p>
<p>- Nasal congestion</p>
<p>- Sneezing</p>
<p>- Red, watery eyes</p>
<p>- A mild fever</p>
<p>- Dry cough</p>
<p> </p>
<p>After a week or two, signs and symptoms worsen.Severe and prolonged coughing attacks may:</p>
<p>- Provoke vomiting</p>
<p>- Result in a red or blue face</p>
<p>- Cause extreme fatigue</p>
<p> </p>
<p> </p>
Q3:
How whooping cough can be diagnosed and treated?
Type: Long Difficulty: Easy
<p>_ Throat culture and test. Your doctor takes a nose or throat swab or suction sample. The sample is then checked for evidence of the presence of whooping cough bacteria.</p>
<p> </p>
<p>_ Blood tests. A blood sample may be drawn and sent to a lab to check for a high white blood cell count. White blood cells help the body fight infections, such as whooping cough.</p>
<p> </p>
<p>- A chest X-ray. Your doctor may order an X-ray to check for the presence of inflammation or fluid in the lungs, which can occur when pneumonia complicates whooping cough and other respiratory infections.</p>
<p> </p>
<p>Treatments and drugs</p>
<p>Infants are typically hospitalized for treatment because whooping cough is more dangerous for that age group. If your child can't keep down liquids or food, intravenous fluids may be necessary.</p>
<p>Treatment for older children and adults usually can be managed at home.</p>
<p>Medications Antibiotics kill the bacteria causing whooping cough and help speed recovery. Family members may be given preventive antibiotics. Unfortunately, not much is available to relieve the cough. Over-the-counter cough medicines, for instance, have little effect on whooping cough and are discouraged.</p>
Videos
No videos found.

Object oriented design
Introduction
Object –oriented approach for software development have become extremely popular in recent years. An object oriented system is made up of interacting objects that maintain their own local state and private operation on that state.(Sommerville SE_book) The representation of the state is private and cannot be accessed directly from outside the object. Object oriented design processes involve designing object class and the relationship between these classes. Object classes define the object in the system and this interaction. Object oriented design is a part of object-oriented design is a part of object oriented development where an object oriented strategy is used.(coursehero)
throughout the development process. The object-oriented strategies for software development are:
- Object-oriented Analysis:Object-oriented analysis is concerned with developing an object-oriented model of the application domain.(moodle) The object in the model reflects the entities and operation associate with the Problem to be solved.
- Object Oriented Design: It is concerned with developing an object-oriented model of software system to implement the indentified requirement. The objects in the object-oriented design are related to solution of the problem.
- Object Oriented Programming: It is concerned with realizing a software design and using an object oriented programming language which provides construct to define object classes.
Object-oriented system are easier to change than system developed using changing the implementation of an object or adding new services should not affect other system objects. Objects are reusable components because they are independent.
Object and Object classes
An object is an entity that has a state and a defined set of operations that operates on that state.(Sommerville SE_book) The state represented as a set of object attributes. The operation associated with the object provides service to other object that requests these services when some computation is required.(coursehero)
Objects are created according to an object class definition. Object class includes declaration of all the attributes and operations that should be associated with object of that class. In an UML (unified modeling language), an object class is represented as a named rectangle with two section. The object attribute are listed in the top section.(Sommerville SE_book) The operations that are associated with the objects are set out in the bottom section.
.jpg)
Features of Object Oriented Design
Object oriented approach may have several features that make the software development process easier and software product more efficient. Some common features of object oriented are as follows:
- An object-oriented model closely represents the problem domain which makes it easier to produce and understand design.
- Changing requirements can be adopted easily by modifying existing object class or adding new object class.
- Increase reusability of code.
- Data and operations are encapsulated so the external object cannot access. Operations which maintains the software security.
- The encapsulated data is limited to the operations defined on that data. Hence it becomes much easier to ensure that the integrity of data is preserved.
- Inheritance is concept unique to object-oriented. Inheritance promotes reuse by defining common operation of the subclasses is a super class.
- Polymorphism comes in the form that a reference in object oriented program can refer to object of the different type of different times.
Object Oriented Design Process
Object-oriented design has several stages. They are:
- System context and modes of use.
- Define the system architecture.
- Object identification
- Design model
- Object interface identification
A) System context and modes of use
The first stage in any software design process is to develop an understanding of the relationship between the software that is being developed and its external
environment. The understanding of such relationship is necessary to provide the required system functionality and specify system structure to communicate with its environments.
The system context and modes of system use represent two complementary model of the relationship between a system and its environment.
- The system context is static models that describe the other system in that environment.
- The model of the system use is dynamic models that describe how the systems actually interact with its environment.
B) System architecture
Once the interaction between the software system that is being designed and system environment have been defined. We use this information as a basis for
designing the system architecture we should try to decompose a system so that architecture is as simple as possible.
C) Object identification
At this stage objects that are related to problem domain and solution domains are identified. The design is associated in term of these classes. There have been various proposals made about how to identify object classes:-
- Use a grammatical analysis of natural language description of a system. Objects and attributes are noun and operations and services are verb.
- Use entities in the application domain.
- Use of behavioral approach where the first understand the overall behavior of the system.
Object classes, attributes, and operations that are initially identified from the informal system description can be a starting point for the design.
D)Design model
Design model show the objects or object classes in a system and appropriate relationship between these entities. Design models are the bridge between the requirements for the system and the system implementation. An important step in the design process is to be decided when design models that we need and level of details of these models. The type of models and level of details depends on the types of system that is being developed. A sequential data processing system will be
designed in different way and different design models will be used. There are two types of design models that should normally be produced to describe an object oriented design.
- Static model: It describes the static structure of the system using object classes and their relationship. Important relationship may be documented at this stage.
- Dynamic Model: It describes the dynamic structure of the system and so the interaction between the systems objects. Interaction that may be documented includes the sequence of service request made by object and the way in which the state of the system is related to these object interaction.
E)Object Interface Specification
An important part of any design process is specification of the interface between the components in the design. We need to specify interface so that the objects and
component can be designed in parallel. Once an interface has been specified, the developer of other object may assume that interface will be implemented.
The representation should be hidden and object operation provides access and updates the data. If the presentation is hidden, it can be changed without affecting the object that uses these attributes. Object interface design is concerned with specified the details of the interface that are used to communicate between the objects.
Design model
There are mainly two types of design model i.e. static and dynamic. The UML provides various static and dynamic models that may be produced to document the design. Some of them are
described as follows:
a) Subsystem model
The subsystem model shows logical groupings of objects into coherent subsystems. These are represented using a form of class diagram. Where each subsystem is shown as package. These are static model.
Eg: The class diagram or sub-system model for weather station is as follows:
.jpg)
b) Sequence Model
These are the dynamic model that shows the sequence of object interactions. These are represented using a UML sequence or a collaboration diagram. In a sequence model,
- Objects involved in the interaction are arranged horizontally with a vertical line linked to each object.
- Time is represented vertically.
- Labeled arrows linking the vertical lines represent the interaction between objects.
- The thin rectangle on the object lifeline represents the time when the object is “controlling object” in the system.
Eg: the sequence diagram for weather system is as follows:
.jpg)
Sequence diagrams are used to model the combined behavior of a group of objects but to summarize the behavior of a single object in response to the message it can process, state machine model is used. State machine model shows how individual objects change their state in response to events and are dynamic models and are represented using state chart diagram.
c)Use-Case model (Diagram)
This represents an object interaction with the system. In this model, each possible interaction is named in an ellipse and external entity involved in the interaction is represented by a stick figure. Each use-case description helps designers to identify objects and operations in the system. Eg: The use-case model for weather station system is as shown below. In this example, the external entity is not a human but is data processing system for the weather data. This example shows that weather station interacts with external entities fro startup, shutdown, reporting weather data that has been controlled, instrument testing and calibration.
.jpg)
d)State machine models
It shows how individual objects change their state in response to events..(Sommerville SE_book) These are represented in the UML using statechart diagrams. State machine models are dynamic models.
Reference:
- Sommerville, Ian. Software engineering. eight edition. Newyork: pearson, 2007.
- coursehero. <https://www.coursehero.com/file/12724457/SE-45-7-8-Units/>.
- csitnepal. .
- csitprogram. <https://books.google.com.np/books?id=CDWRq0B9e5kC&pg=PA5&lpg=PA5&dq=+Software+Software+is+computer+programs+and+associated+documentation.&source=bl&ots=fuFOT7wYOS&sig=0tkbWoER8gf7RxbScRjIQc7W_d0&hl=en&sa=X&redir_esc=y#v=onepage&q=Software Software is%>.
- csitprogram. .
Lesson
Object Oriented Design
Subject
Software Engineering
Grade
IT
Recent Notes
No recent notes.
Related Notes
No related notes.