0% found this document useful (0 votes)
22 views17 pages

CSC 308 Answers

The document discusses key features of Object-Oriented Systems, including encapsulation, abstraction, and relationships among classes. It also defines software complexity, describes classes of system maintenance, and contrasts structured and object-oriented approaches. Additionally, it outlines the benefits of the object model, principles of modeling, types of systems, and factors affecting system complexity.

Uploaded by

enochades7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views17 pages

CSC 308 Answers

The document discusses key features of Object-Oriented Systems, including encapsulation, abstraction, and relationships among classes. It also defines software complexity, describes classes of system maintenance, and contrasts structured and object-oriented approaches. Additionally, it outlines the benefits of the object model, principles of modeling, types of systems, and factors affecting system complexity.

Uploaded by

enochades7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1. Discuss 3 features of Object-Oriented Systems.

Encapsulation
Encapsulation is a process of information hiding. It is simply the combination of process and data into a
single entity. Data of an object is hidden from the rest of the system and available only through the
services of the class. It allows improvement or modification of methods used by objects without
affecting other parts of a system.

Abstraction
It is a process of taking or selecting necessary method and attributes to specify the object. It focuses on
essential characteristics of an object relative to perspective of user.

Relationships
All the classes in the system are related with each other. The objects do not exist in isolation, they exist
in relationship with other objects.
There are three types of object relationships
• Aggregation − It indicates relationship between a whole and its parts.
• Association − In this, two classes are related or connected in some way such as one class works
with another to perform a task or one class acts upon other class.
• Generalization − The child class is based on parent class. It indicates that two classes are similar
but have some differences.

Inheritance
Inheritance is a great feature that allows to create sub-classes from an existing class by inheriting the
attributes and/or operations of existing classes.

Polymorphism and Dynamic Binding


Polymorphism is the ability to take on many different forms. It applies to both objects and operations. A
polymorphic object is one who true type hides within a super or parent class.
In polymorphic operation, the operation may be carried out differently by different classes of objects. It
allows us to manipulate objects of different classes by knowing only their common properties.

2. Define software complexity.


Software complexity refers to the degree of difficulty and elaborateness of a software system,
which may arise from various factors such as the size, structure, design, functionality, and interactions
of its components. It encompasses the intricacies and challenges involved in understanding, designing,
developing, and maintaining software systems
3. Describe 3 classes of system maintenance.

 Corrective Maintenance: This class of system maintenance focuses on fixing issues, defects,
or bugs in the software or hardware system. Corrective maintenance is typically performed in response
to identified problems or errors that may affect the system's performance, functionality, or security. It
involves identifying the root cause of the problem, troubleshooting, and implementing solutions to
resolve the issue. Corrective maintenance aims to restore the system to its normal functioning state and
may involve activities such as patching, debugging, and reconfiguration.
 Preventive Maintenance: This class of system maintenance is performed proactively to prevent
potential issues or failures from occurring in the future. Preventive maintenance activities are typically
scheduled and planned in advance to minimize system downtime and disruptions. This may include
activities such as regular system backups, hardware and software updates, performance monitoring,
security audits, and system health checks. Preventive maintenance helps to identify and address potential
vulnerabilities or weaknesses in the system before they result in critical failures, thus improving the
system's reliability and stability.
 Adaptive Maintenance: This class of system maintenance involves making changes or
modifications to the system to adapt it to changing requirements, technologies, or business needs.
Adaptive maintenance is performed to ensure that the system remains relevant and effective in a
dynamic environment. This may include activities such as adding new features, enhancing system
capabilities, integrating with third-party systems, or updating the system to comply with new regulations
or standards. Adaptive maintenance helps the system to evolve and remain aligned with the changing
needs of the organization or its users

4. Distinguish between structured approach and object-oriented approach.

Structured Approach Object Oriented Approach

 It works with Top-down approach.  It works with Bottom-up approach.


 Program is divided into number of  Program is organized by having number of
submodules or functions. classes and objects.
 Function call is used.  Message passing is used.
 Software reuse is not possible.  Reusability is possible.
 Structured design programming usually left  Object oriented design programming done
until end phases. concurrently with other phases.
 Structured Design is more suitable for  It is suitable for in-house development.
offshoring.
 It shows clear transition from design to  Not so clear transition from design to
implementation. implementation.
 It is suitable for real time system, embedded  It is suitable for most business applications,
system and projects where objects are not the game development projects, which are
most useful level of abstraction. expected to customize or extended.

 Data Flow Diagram (DFD) & Entity-  Class diagram, sequence diagram, state chart
Relationship (E-R) diagram model the data. diagram, and use cases all contribute.

 In this, projects can be managed easily due  In this approach, projects can be difficult to
to clearly identifiable phases. manage due to uncertain transitions between
phase.

5. Draw a diagram to show the Elements of a System.

6. List the benefits of the Object Model in systems design.


Benefits of the Object Model:
Object model introduces several new elements which are advantageous over traditional method of
structured programming. The significant benefits are:
• Use of object model helps us to exploit the expressive power of object based and object oriented
programming languages. Without the application of elements of object model, more powerful feature of
languages such as C++, object pascal, ada are either ignored or greatly misused.
• Use of object model encourages the reuse of software and entire designs, which results in the
creation of reusable application framework.
• Use of object model produces systems that are built upon stable intermediate forms, which are
more resilient to change.
• Object model appears to the working of human cognition, many people who have no idea how a
computer works find the idea of object oriented systems quite natural.
7. List the elements of the object model.

Elements of Object Model


There are four major elements of object model. They are:
i. Abstraction
ii. Encapsulation
iii. Modularity
iv. Hierarchy

8. Present four major principles of modelling.

Principles of Modeling:
UML is basically a modeling language; hence its principles will also be related to modeling
concepts. Here are few basic principal of UML.

First: "The choice of what models to create has a profound influence on how a problem is attacked
and how a solution is shaped".
In other words , choose your models well. The right models will brilliantly illuminate the most
wicked development problems. The wrong models will mislead you, causing you to focus on irrelevant
issues.

Second: " Every model may be expressed at different levels of precision ".
Best approach to a given problem results in a best model. If the problem is complex mechanized
level of approach & if the problem is simple decent approach is followed.

Third: "The best models are connected to reality."


The model built should have strong resemblance with the system

Fourth: " No single model is sufficient. Every nontrivial system is best approached through a small
set of nearly independent models."
If you constructing a building, there is no single set of blueprints that reveal all its details. At the
very least, you will need floor plans, elevations, electrical plans, heating plans, and plumbing plans.

9. Present in a tabular form how the object-oriented approach differs from the traditional structured
approach.
Structured Approach Object Oriented Approach

 It works with Top-down approach.  It works with Bottom-up approach.


 Program is divided into number of  Program is organized by having number of
submodules or functions. classes and objects.
 Function call is used.  Message passing is used.
 Software reuse is not possible.  Reusability is possible.
 Structured design programming usually left  Object oriented design programming done
until end phases. concurrently with other phases.
 Structured Design is more suitable for  It is suitable for in-house development.
offshoring.
 It shows clear transition from design to  Not so clear transition from design to
implementation. implementation.
 It is suitable for real time system, embedded  It is suitable for most business applications,
system and projects where objects are not the game development projects, which are
most useful level of abstraction. expected to customize or extended.

 Data Flow Diagram (DFD) & Entity-  Class diagram, sequence diagram, state chart
Relationship (E-R) diagram model the data. diagram, and use cases all contribute.

 In this, projects can be managed easily due  In this approach, projects can be difficult to
to clearly identifiable phases. manage due to uncertain transitions between
phase.

10. Some systems are physical or abstract, some others are closed or opened. Without limiting your focus to
these given types, present your understanding of 4 types of systems.

Types of Systems
The systems can be divided into the following types −

Adaptive and Non Adaptive System


• Adaptive System responds to the change in the environment in a way to improve their
performance and to survive. For example, human beings, animals.
• Non Adaptive System is the system which does not respond to the environment. For example,
machines.

Permanent or Temporary System


• Permanent System persists for long time. For example, business policies.
• Temporary System is made for specified time and after that they are demolished. For example, A
DJ system is set up for a program and it is dissembled after the program.

Natural and Manufactured System


• Natural systems are created by the nature. For example, Solar system, seasonal system.
• Manufactured System is the man-made system. For example, Rockets, dams, trains.

Deterministic or Probabilistic System


• Deterministic system operates in a predictable manner and the interaction between system
components is known with certainty. For example, two molecules of hydrogen and one molecule
of oxygen makes water.
• Probabilistic System shows uncertain behavior. The exact output is not known. For example,
Weather forecasting, mail delivery.

Social, Human-Machine, Machine System


• Social System is made up of people. For example, social clubs, societies.
• In Human-Machine System, both human and machines are involved to perform a particular task.
For example, Computer programming.
• Machine System is where human interference is neglected. All the tasks are performed by the
machine. For example, an autonomous robot.

Physical or Abstract Systems


• Physical systems are tangible entities. We can touch and feel them.
• Physical System may be static or dynamic in nature. For example, desks and chairs are the
physical parts of computer center which are static. A programmed computer is a dynamic system
in which programs, data, and applications can change according to the user's needs.
• Abstract systems are non-physical entities or conceptual that may be formulas, representation or
model of a real system.

Open or Closed Systems


• Adaptive System responds to the change in the environment in a way to improve their
performance and to survive. For example, human beings, animals.
• Non Adaptive System is the system which does not respond to the environment. For example,
machines.
11. The complexity of software is an essential property not an accidental one. List the origin of inherent
complexity in software systems.
The inherent complexity derives from four elements. They are:
i. The complexity of the problem domain.
ii. The difficultly of managing the developmental process.
iii. The flexibility possible through software .
iv. The problems of characterizing the behavior of discrete systems.

12. There are many ways to approach Software modelling.” List and describe the 2 most common ways.
In software , there are several ways to approaches a model. The two most common ways are :

i. Algorithmic perspective
ii. Object-Oriented perspective
i. Algorithmic perspective:
In this approach, the main building blocks of all software is the procedure or function. This view leads
developers to focus on issues of control and decomposition of larger algorithms into smaller ones.
ii. Object-Oriented perspective:
In this approach, the main building blocks of all software is the object or class. Simply put, an object is a
thing. A class is a description of a set of common objects. Every object has identity, state and behavior.
For example, consider a simple a three-tier -architecture for a billing system, involving a user interface,
middleware, and a data base. In the user interface, you will find concrete objects, such as buttons,
menus, and dialog boxes. In the database, you will find concrete objects, such as tables. In the middle
layer, you will find objects such as transitions and business rules.

13. What are the benefits of object-oriented approach to system analysis and design?
 Modularity and Reusability: Object-oriented approach promotes modularity, where complex
systems are broken down into smaller, manageable components called objects. These objects encapsulate data
and behavior, and can be reused across different parts of the system or in different projects, leading to improved
code reuse and reduced development time.
 Encapsulation: Object-oriented approach supports encapsulation, which means that data and
methods that operate on that data are encapsulated within an object. This helps in hiding the internal details of
the object and allows for better abstraction, separation of concerns, and improved maintainability of the code.
 Flexibility and Scalability: Object-oriented approach allows for flexibility and scalability in system
design. Objects can be easily extended or modified without affecting the entire system, making it easier to
accommodate changes in requirements or technology upgrades. This makes the system more adaptable and
scalable to handle future changes.
 Modelling Real-world Entities: Object-oriented approach enables the modeling of real-world
entities as objects in the software system. This helps in creating a more intuitive and natural representation of
the problem domain, making it easier for stakeholders to understand, validate, and verify the system
requirements.
 Collaboration and Teamwork: Object-oriented approach promotes collaboration and teamwork
among developers. Objects can be developed independently and can be combined to form a complete system,
allowing multiple developers to work on different objects simultaneously. This helps in improving productivity,
parallel development, and team coordination.
 Code Maintenance and Debugging: Object-oriented approach facilitates code maintenance and
debugging. Objects are self-contained units of code with clear interfaces, making it easier to locate and fix bugs.
Additionally, changes to objects have limited impact on the rest of the system, reducing the risk of introducing
new issues during maintenance activities.
 Extensibility and Reusability: Object-oriented approach allows for easy extensibility and reusability
of code. New objects can be added to the system without disrupting the existing functionality, and existing
objects can be reused in different projects or systems, leading to improved development efficiency

14. What factors affect system complexity?


The two important concepts related to the system development that help in determining the complexity
of a system are coupling and cohesion.

Coupling
Coupling is the measure of the independence of components. It defines the degree of dependency of
each module of system development on the other. In practice, this means the stronger the coupling
between the modules in a system, the more difficult it is to implement and maintain the system.
Each module should have simple, clean interface with other modules, and that the minimum number of
data elements should be shared between modules.

• High Coupling
These type of systems have interconnections with program units dependent on each other. Changes to
one subsystem leads to high impact on the other subsystem.

• Low Coupling
These type of systems are made up of components which are independent or almost independent. A
change in one subsystem does not affect any other subsystem.

Cohesion
Cohesion is the measure of closeness of the relationship between its components. It defines the amount
of dependency of the components of a module on one another. In practice, this means the systems
designer must ensure that:
• They do not split essential processes into fragmented modules.
• They do not gather together unrelated processes represented as processes on the DFD into
meaningless modules.
The best modules are those that are functionally cohesive. The worst modules are those that are
coincidentally cohesive.
15. What is a conversion plan?
It contains description of all the activities that must occur during implementation of the new system and
put it into operation. It anticipates possible problems and solutions to deal with them.

16. What is conversion?


It is a process of migrating from the old system to the new one. It provides understandable and
structured approach to improve the communication between management and project team.

17. What is system complexity? Discuss 2 factors that affect system complexity.
System complexity refers to the level of intricacy or sophistication of a system, typically arising
from the interactions and dependencies among its components. A system can be defined as a set of
interconnected parts or elements that work together to achieve a common goal or purpose. System
complexity arises from the interactions, relationships, dependencies, and feedback loops among these
parts or elements, which can result in emergent behavior that is difficult to predict or understand

Factors affecting system complexity

The two important concepts related to the system development that help in determining the
complexity of a system are coupling and cohesion.

Coupling
Coupling is the measure of the independence of components. It defines the degree of dependency of
each module of system development on the other. In practice, this means the stronger the coupling
between the modules in a system, the more difficult it is to implement and maintain the system.
Each module should have simple, clean interface with other modules, and that the minimum number of
data elements should be shared between modules.
• High Coupling
These type of systems have interconnections with program units dependent on each other. Changes to
one subsystem leads to high impact on the other subsystem.

• Low Coupling
These type of systems are made up of components which are independent or almost independent. A
change in one subsystem does not affect any other subsystem.

Cohesion
Cohesion is the measure of closeness of the relationship between its components. It defines the amount
of dependency of the components of a module on one another. In practice, this means the systems
designer must ensure that:
• They do not split essential processes into fragmented modules.
• They do not gather together unrelated processes represented as processes on the DFD into
meaningless modules.
The best modules are those that are functionally cohesive. The worst modules are those that are
coincidentally cohesive.

Fig 1.0 Fig 2.0 Fig 3.0

18. Suggest an appropriate caption for figure 1.0


A Window Class

19. Define what the figure represents


A class is a description of a set of objects that share the same attributes, operations, relationships, and
semantics. A class implements one or more interfaces. Graphically, a class is rendered as a rectangle,
usually including its name, attributes, and operations.
20. Properly identify the essential components shown in figure 1.0.
• Class name
• List of attributes
• Operations or Methods

21. Mention the benefits of the Object Model in systems design

i. Modularity: The Object Model promotes modular design, where a system is divided into smaller,
self-contained modules known as objects. Each object encapsulates its state and behavior, and can
communicate with other objects using well-defined interfaces. This modularity makes it easier to
understand, maintain, and modify complex systems, as changes in one object's implementation do
not necessarily affect other objects.
ii. Reusability: Objects in the Object Model can be reused in different parts of the system or in
different systems altogether. This promotes code reusability, as objects can be developed once and
used in multiple contexts. This reduces redundancy, minimizes code duplication, and improves
development efficiency.
iii. Encapsulation: Objects in the Object Model encapsulate their state and behavior, which means that
the internal details of an object are hidden from the outside world. This provides a clear separation of
concerns and allows for better abstraction, as the implementation details of an object can be changed
without affecting the external interface. Encapsulation also promotes data integrity and security, as
access to an object's state is controlled through well-defined methods.
iv. Inheritance: The Object Model supports inheritance, which allows objects to inherit attributes and
behavior from parent objects. This promotes code reuse and extensibility, as common attributes and
behavior can be defined in a parent object and inherited by child objects. Inheritance also facilitates
polymorphism, where objects of different classes can be treated interchangeably, providing
flexibility and scalability in system design.
v. Maintainability: The Object Model promotes code organization and separation of concerns, making
it easier to understand, modify, and maintain complex systems. Changes in one part of the system
can be localized to the relevant objects, reducing the risk of unintended consequences. Additionally,
the use of encapsulation and abstraction promotes code stability, as changes to an object's
implementation do not affect its external interface.

vi. Scalability: The Object Model allows for scalability, as objects can be easily added, modified, or
replaced without affecting the overall system structure. This makes it easier to extend a system with
new functionality or adapt it to changing requirements, without requiring major changes to the
existing codebase.

vii. Collaboration: The Object Model promotes collaboration among team members, as it provides a
clear and standardized way to represent the system's components and their interactions. Objects can
be designed, implemented, and tested independently, allowing team members to work concurrently
on different parts of the system. The use of well-defined interfaces also facilitates communication
between team members, as it provides a common language for discussing system components and
their interactions.
22. List the elements of the object model.
There are four major elements of object model. They are:
i. Abstraction
ii. Encapsulation
iii. Modularity
iv. Hierarchy
23. Define Software complexity.
Software complexity refers to the degree of difficulty and elaborateness of a software
system, which may arise from various factors such as the size, structure, design, functionality, and
interactions of its components. It encompasses the intricacies and challenges involved in understanding,
designing, developing, and maintaining software systems

24. Explain the structure of Complex Systems


The structure of personal computer, plants and animals, matter, social institutions are some
examples of complex system.
The structure of a Personal Computer: A personal computer is a device of moderate complexity. Major
elements are CPU, monitor, keyboard and some secondary storage devices. CPU encompasses primary
memory, an ALU, and a bus to which peripheral devices are attached. An ALU may be divided into
registers which are constructed from NAND gates, inverters and so on. All are the hierarchical nature of
a complex system.

25. The complexity of software is an essential property not an accidental one. List the origin of inherent
complexity in software systems.
26. Present four major Principles of Modelling.
27. What mechanism does figure 3.0 represent?

Common Divisions Mechanisms


28. Explain the significance of the tags in figure 3.0
An interface declares a contract, and an implementation represents one concrete realization of
that contract, responsible for faithfully carrying out the interface's complete semantics. In the UML, you
can model both interfaces and their implementations, as shown in the Figure 3.0
In this figure, there is one component named spellingwizard.dll that implements two interfaces,
IUnknown and Ispelling.
29. Suggest a caption for the graphical notation in figure 3.0

Interface and Implementation


30. List and describe three kinds of relationships in UML.
Relationships are used to connect things. There are four kinds of relationships in the UML:
i. Dependency
ii. Association
iii. Generalization
iv. Realization
• Dependency: A dependency is a semantic relationship between two things in which a change to one
thing (the independent thing) may affect the semantics of the other thing (the dependent thing).
Graphically, a dependency is rendered as a dashed line, possibly directed, and occasionally including
a label.
• Association: An association is a structural relationship that describes a set of links, a link being a
connection among objects. Aggregation is a special kind of association, representing a structural
relationship between a whole and its parts. Graphically, an association is rendered as a solid line,
possibly directed, occasionally including a label, and often containing other adornments, such as
multiplicity and role names.
• Generalization: A Generalization is a specialization/generalization relationship in which objects of
the specialized element (the child) are substitutable for objects of the generalized element (the
parent). In this way, the child shares the structure and the behavior of the parent. Graphically, a
generalization relationship is rendered as a solid line with a hollow arrowhead pointing to the parent.
• Realization: A Realization is a semantic relationship between classifiers, wherein one classifier
specifies a contract that another classifier guarantees to carry out. Graphically, a realization
relationship is rendered as a cross between a generalization and a dependency relationship.

31. Explain key abstraction.


A key abstraction is a class or object that forms part of the vocabulary of the problem domain. The
primary value of identifying such abstractions is that they give boundaries to our problems. They
highlight the things that are in the system and therefore relevant to our design and suppress the things
that are outside of system.

32. Briefly explain the roles of Abstraction, Hierarchy and Decomposition in bringing order to chaos in
systems
1. The Role of Abstraction: Abstraction is an exceptionally powerful technique for dealing with
complexity. Unable to master the entirely of a complex object, we choose to ignore its inessential
details, dealing instead with the generalized, idealized model of the object. For example, when
studying about how photosynthesis works in a plant, we can focus upon the chemical reactions in
certain cells in a leaf and ignore all other parts such as roots and stems. Objects are abstractions
of entities in the real world.
In general abstraction assists people's understanding by grouping, generalizing and chunking
information. Object- orientation attempts to deploy abstraction. The common properties of
similar objects are defined in an abstract way in terms of a class. Properties that different classes
have in common are identified in more abstract classes and then an ‘is-a’ relationship defines the
inheritance between these classes.
2. The role of Hierarchy: Identifying the hierarchies within a complex software system makes
understanding of the system very simple. The object structure is important because it illustrates
how different objects collaborate with one another through pattern of interaction (called
mechanisms). By classifying objects into groups of related abstractions (for example, kinds of
plant cells versus animal cells, we come to explicitly distinguish the common and distinct
properties of different objects, which helps to master their inherent complexity.
Different hierarchies support the recognition of higher and lower orders. A class high in the ‘is-a’
hierarchy is a rather abstract concept and a class that is a leaf represents a fairly concrete
concept. The ‘is-a’ hierarchy also identifies concepts, such as attributes or operations, that are
common to a number of classes and instances thereof. Similarly, an object that is up in the part-
of hierarchy represents a rather coarse-grained and complex objects, assembled from a number of
objects, while objects that are leafs are rather fine grained. But note that there are many other
forms of patterns which are nonhierarchical: interactions, ‘relationships’.
3. The role of Decomposition: Decomposition is important techniques for copying with
complexity based on the idea of divide and conquer. In dividing a problem into a sub problem
the problem becomes less complex and easier to overlook and to deal with. Repeatedly dividing
a problem will eventually lead to sub problems that are small enough so that they can be
conquered. After all the sub problems have been conquered and solutions to them have been
found, the solutions need to be composed in order to obtain the solution of the whole problem.
The history of computing has seen two forms of decomposition, process-oriented (Algorithmic)
and object-oriented decomposition.

33. Illustrate the design of complex system.


34. Explain the application of an object model.

The Application Object Model (AOM) in the context of Air Traffic Control (ATC) refers to a software
architecture or framework that provides a standardized way to model, simulate, and manage the different
components and entities involved in air traffic control operations. It serves as a common interface for various
ATC applications to interact and exchange information, enabling seamless communication and coordination
among different systems and stakeholders in the ATC domain.

The AOM in ATC typically includes a set of predefined objects or entities, such as aircraft, controllers,
airspace, airports, routes, and weather, which are represented as software objects with attributes and methods
that encapsulate their behavior and characteristics. These objects can be manipulated and updated by different
ATC applications, such as radar systems, flight data processing systems, and air traffic management systems, to
facilitate the coordination and management of air traffic.

The AOM provides a standardized way for different ATC applications to interact with these objects, allowing
them to share and update information in real-time, ensuring a consistent and up-to-date view of the airspace and
aircraft movements. It also facilitates the integration of new applications or systems into the ATC environment,
as they can leverage the AOM to interface with existing applications and share information seamlessly.

The AOM in ATC is typically implemented using modern software engineering principles, such as object-
oriented programming (OOP) and service-oriented architecture (SOA), and may use industry standards such as
the Aeronautical Information Exchange Model (AIXM) or the Common Object Request Broker Architecture
(CORBA) for communication and interoperability.

Overall, the Application Object Model in Air Traffic Control plays a crucial role in enabling efficient, safe, and
coordinated management of air traffic by providing a common framework for different ATC applications to
interact, share information, and make decisions in a collaborative manner

35. What mechanism does figure 2.0 represent?


Adornments Mechanisms
36. Explain the significance of the tags in figure 2.0.
Figure 2.0 shows a class, adorned to indicate that it is an abstract class with two public, one protected,
and one private operation. Every element in the UML's notation starts with a basic symbol, to which can
be added a variety of adornments specific to that symbol.

37. Suggest a caption for the graphical notation in figure 2.0


Transaction class
38. Distinguish between object-oriented and object-based languages.

Object-oriented languages, such as Java, C++, and Python, are programming languages that support the key
principles of object-oriented programming (OOP). OOP is a programming paradigm that revolves around the
concept of objects, which are instances of classes. Objects encapsulate data (attributes) and behavior (methods),
and interact with each other through messages (method calls). OOP languages provide features such as
inheritance, polymorphism, and encapsulation, which allow for code reuse, modularity, and abstraction.
On the other hand, object-based languages, such as JavaScript, do not fully support all the features of OOP, but
still exhibit some characteristics of OOP. In object-based languages, objects can be created, but they lack some
of the advanced features of OOP, such as support for classes, inheritance, and polymorphism. Instead, object-
based languages typically provide a collection of predefined objects and their associated methods, which can be
used to create new objects and manipulate them. Object-based languages often rely on prototypes, which are
objects that serve as templates for creating new objects with similar properties.

In summary, the main differences between object-oriented and object-based languages are:

1. Support for classes and inheritance: Object-oriented languages support classes and inheritance, which allow for
creating hierarchical relationships between objects and code reuse. Object-based languages may not support
classes and inheritance or provide limited support for them.
2. Polymorphism: Object-oriented languages support polymorphism, which allows objects of different classes to
be treated as if they belong to a common interface or superclass. Object-based languages may not support
polymorphism or provide limited support for it.
3. Encapsulation: Object-oriented languages emphasize encapsulation, which is the ability to hide the internal
details of objects and expose only the necessary interfaces. Object-based languages may not provide full
encapsulation or have limited support for it.
4. Predefined objects vs. classes: Object-based languages often provide a collection of predefined objects, whereas
object-oriented languages typically rely on classes to define objects.

In general, object-oriented languages provide a more comprehensive and robust approach to OOP, while object-
based languages offer a simpler, more limited version of OOP with fewer features and capabilities

39. Discuss about possible relationships formed among objects with example.
The relationship between any two objects encompasses the assumptions that each makes about the other
including what operations can be performed. There are two kinds of objects relationships they are links
and aggregation.
• Links
 A link denotes the specific association through which one object (the client) applies the services
of another object (the supplier) or through which are object may navigate to another.
 A line between two object icons represents the existence of pass along this path.
 Messages are shown as directed lines representing the direction of message passing between two
objects is typically unidirectional, may be bidirectional data flow in either direction across a link.

• Aggregation
It indicates relationship between a whole and its parts with the ability to navigate from the whole (also
called the aggregate) to its parts. Aggregation is a specialized kind of association. Aggregation may or
may not denote physical containment. E.g. airplane is composed of wings, landing gear, and so on. This
is a case of physical containment. The relationship between a shareholder and her shares is an
aggregation relationship that doesn't require physical containment.

You might also like