myavr.info Religion Fundamentals Of Object-oriented Design In Uml Pdf

FUNDAMENTALS OF OBJECT-ORIENTED DESIGN IN UML PDF

Thursday, May 9, 2019


2. UML Applied - Object Oriented Analysis and Design using the UML This conceptual model will provide us with the foundations of the design. We then. Fundamentals of Object-Oriented Design in UML [Meilir Page-Jones] on Amazon. com. *FREE* shipping on qualifying offers. Object technology is increasingly. Based in Bellevue, Washington,. Meilir Page-Jones is president and senior consulting methodolo- gist at Wayland Systems. He has extensive experience in .


Author:EDWARDO LEVERS
Language:English, Spanish, Japanese
Country:Micronesia
Genre:Business & Career
Pages:213
Published (Last):21.08.2015
ISBN:342-5-80168-715-8
ePub File Size:28.80 MB
PDF File Size:13.37 MB
Distribution:Free* [*Regsitration Required]
Downloads:27883
Uploaded by: VANESSA

OBJECT ORIENTED PROGRAMMING PRINCIPLES. Francis MK. JOMO KENYATTA UNIVERSITY OF AGRICULTURE AND TECHNOLOGY INSTITUTE OF. Object-Oriented Analysis & Design Using UML. Object-Oriented Analysis Fundamentals of Object-Oriented Design in UML. Addison-Wesley,. Reading, MA . Summary. Exercises. 2 Object-Oriented Analysis and Design. Fundamentals of an OOAD. A lightweight process.

Objects expose functionality only through methods, properties, and events, and hide the internal details such as state and variables from other objects. This makes it easier to update or replace objects, as long as their interfaces are compatible, without affecting other objects and code.

An operation may exhibit different behavior in different instances. The behavior depends upon the types of data used in the operation. Objectives of the Topic i Describe the principles of the OOP principles ii Describe the application of the principles. As its name suggests it was used to create simulations. He had a vision of a personal computer that would provide graphics-oriented applications and he felt that a language like SIMULA would provide a good way for non- specialists to create these applications.

He sold his vision to Xerox Parc and in the early s, a team headed by Alan Kay at Xerox Parc created the first personal computer called the Dynabook. Smalltalk was the object-oriented language developed for programming the Dynabook. It was a simulation and graphics-oriented programming language. Smalltalk exists to this day although it is not widely used commercially. The idea of object-oriented programming gained momentum in the s and in the early s Bjorn Stroustrup integrated object-oriented programming into the C language.

This project was going nowhere until the group re-oriented its focus and marketed Java as a language for programming Internet applications. The language has gained widespread popularity as the Internet has boomed, although its market penetration has been limited by its inefficiency.

Discussing the OOP Principles Inheritance In object-oriented programming, Inheritance means the inheritance of another object's interface, and possibly its implementation as well. Inheritance is accomplished by stating that a new class is a subclass of an existing class. The class that is inherited from is called the superclass. The subclass always inherits the superclass's complete interface. It can extend the interface but it cannot delete any operations from the interface. The subclass also inherits the superclass's implementation, or in other words, the functions that implement the superclass's operations.

However, the subclass is free to define new functions for these operations.

The subclass can selectively pick and choose which functions it overrides. Any functions that are not overridden are inherited. There is a great deal of debate about how to use inheritance. In particular, the debate swirls about whether inheritance should be used when you want to inherit an interface or whether it should be used when you want to inherit implementation. For example, suppose that you want to define a search object that stores key, value pairs and allows values to be looked up by providing their keys.

More precisely, let us say that the search object supports the following operations: Adds a key, value pair to the object. Deletes a key, value pair from the object. Given a key retrieves the value associated with that key from the object. Later we decide that we want a new object that allows us to traverse the key, value pairs in sorted order. The new object should support the above operations plus two additional operations, rewind that puts us back to the beginning, and next that returns the next key, value pair.

Since the new object supports all of the operations of the original search object, we can make the new object inherit the original object's interface.

This is an example of interface inheritance. A radio alarm clock has all of the functions of a radio plus additional functions to handle the alarm clock. If we adopt the radio's interface for the radio alarm clock, then someone who knows how to operate a radio will also know how to operate the radio portion of the radio alarm clock. Hence, rather than designing the radio alarm clock from scratch, we can extend or inherit the interface defined by the radio. Of course, we can also use the existing implementation for a radio and extend it to handle the alarm clock functions.

Color -Color: Classes use the concept of abstraction and are defined as a list of abstract attributes such as size, wait, and cost, and function operate on these attributes. When learning UML it is natural to place emphasis on learning the details of the various types of diagram.

Conceptually, however, a diagram should be thought of as simply presenting to the user certain aspects of the underlying system model. If a CASE tool is being used, for example, a diagram provides a convenient way of examining some of the information stored in its database.

Table 1. Graphical notations are rather limited, however, in terms of what they can easily express, so it is common to supplement UML with a textual specification language such as the Object Constraint Language, which is described in Chapter 9. UML design diagrams are also documents which specify a system, but ones which may not be able to be directly translated into executable code.

Source code and design diagrams therefore share the properly of specifying aspects of a desired system, but they differ in expressing this at different levels of abstraction. Almost by definition, a program gives a complete description of a system: the code that executes is simply a translation of what is defined in the source code of the system. Design models, on the other hand, omit much of the detail that is found in code, and in particular much procedural detail.

However, it is not unreasonable to view a source program as being simply a very concrete design model, as the purpose and nature of the two types of artifact are very similar. This point is particularly clear in the case of object-oriented languages, in which much program structure is expressed using exactly the same concepts as appear in object-oriented design languages.

Programs, then, define the run-time properties of executing systems. When writing a program, programmers often try to visualize the behavior of the code they are writing by thinking of the effects that their program will have when it runs.

However, it is unusual for programmers to think in terms of the raw addresses and binary data that is being manipulated by the machine. Instead, they tend to work with an abstract model of what is happening when a program runs. In particular, programmers in object-oriented languages tend to use abstract models of program execution which talk in terms of objects being created and destroyed as a program runs, and objects knowing about other objects and being able to communicate with them.

These subtract models are called object structures in Figure 1. The arrow on the right-hand side of the diagram shows that object structures are abstractions of what really happens when a program runs, in the same sort of way as a design diagram is an abstraction of the information contained in a source program, The significance of all this is that object structures, the abstract models that we use lo understand programs, are also used as a semantic foundation for UML's design models, as indicated by the top arrow in Figure 1.

It also means that UML can largely be understood in terms of concepts which are familiar from programming. Two conclusions can be drawn from this discussion. Firstly, the diagrams defined in a language such as UML are not just pictures, but have a definite meaning in terms of what they specify about the run-time properties of systems. In this respect, diagrams are just like programs, but more abstract.

Blaha, James Rumbaugh / Pearson Prentice Hall, 2005

Secondly, the model that is used for explaining the meaning of UML notations is very similar to the models that object-oriented programmers use to help them visualize the behavior of the programs they are writing. Thus UML and object-oriented languages have the same semantic foundations, which means that it is relatively easy to implement a design, or conversely to document an existing program, with some confidence that the two representations of the system are consistent.

Chapter 2 describes the object model in detail, shows ways of defining object structures in UML, and explains how diagrams can be used to visualize the properties of programs.

Traditionally, a linear or 'waterfall' model of the software development process has been proposed. In such a model, activ ities are carried out in order, and the results of one stage are carried forward to serve as the starting point for work in the following stage.

A small example of this is the characterization of analysis and design 'phases' that was discussed in Section 1. In much of the literature on object-oriented design, however, the assumption of an underlying linear process is contradicted by the recognition that system development very often actually proceeds in an iterative manner. This means that it is acknowledged that earlier steps in the process must be revisited when the work done there needs to be corrected or modified. An iterative model allows a welcome and necessary degree of flexibility to enter the software development process, and is a more accurate reflection of the way much software is in fact developed.

On the other hand, changing a piece of work that was completed at an earlier stage in the process can cause changes to cascade throughout the entire project, and in general the earlier in the process the initial change is made, the greater the knock-on effects will be. Considerations like this might suggest that linear software development processes should be followed wherever possible.

Empirical research suggests, however, that except in very simple or well understood cases, systems are never developed by progressing through a simple sequence of steps such as those outlined above.

One prominent reason for this is that a linear process assumes that a system's requirements are fixed and do not change throughout the development process. This is a very unrealistic assumption. In many cases, system development starts without a clear idea of what the system should do. This can either be because the users do not clearly understand what they want, or because a completely new type of product is being developed.

Worse still, the experience of seeing a system take shape often suggests many other ways in which the system could be used, thus generating new requirements, In this way, the very process of developing a system often causes instability in he requirements.

Another factor undermining the linear development process is the fact that software design is still a rather experimental activity. Design decisions are often taken without a full understanding of the effect that they will have on subsequent development, and it is inevitable that in some cases decisions will turn out to have been mistaken. In these cases it is necessary to be able to backtrack, and to explore the possibility of alternative approaches, something that is not allowed for in strictly linear models.

In practice, then, systems are rarely developed according to the strict linear process specified by traditional design methodologies. There will always be iteration in the process, where earlier stages in the work, right back to the requirements, are revisited and altered or corrected later in the development. Some writers have taken this further, and suggested that software should be developed In an evolutionary or incremental manner, where certain core functionality is implemented initially, and a complete system is gradually 'grown' by adding more and more functionality to it until a complete implementation is obtained.

It has even been suggested that every project needs a unique development process defined for it. Nevertheless, when a completed system is being documented there are strong reasons for pretending that a linear process has been followed.

Documentation of a system should concentrate on describing the structure of what has been produced in such a way someone new to the system can quickly come to understand its functionality, its design, and the rationale for the various design decisions that were made. In such a description it can be very helpful to present first the requirements, then the system's architecture, and then the details of its implementation in a manner very reminiscent of the traditional stages of the life cycle.

In the case studies and examples presented in this book, this style of presentation will be used, even though it is very far from being an accurate reflection of how the programs were in fact developed. This normally implies the production of models to help understand the structure and design of the system. Methodologies define both a language and a process. The language defines the models to be used and the notation for expressing them.

The process states what order to produce the models in. UML is a language for expressing object-oriented design models, It is not a complete methodology, though its authors consider it to be suitable for use with an iterative and incremental development process, UML defines a number of views of a system, which represent properties of the system from various perspectives and relative to various purposes.

Information contained in a model is communicated in graphical form, using various types of diagram Design models and source code share a common semantic foundation, the object model.

This ensures that it is possible to maintain a close relationship between the design and the code of a system. Does the same answer hold for programming languages? Can you identify any common features of the tasks you have identified as being most suitable for graphical support? Does the activity of software design share these features? The object model is the common computational model shared by UML and object-oriented programming languages.

Practical Object-Oriented Design with UML

Programming and design languages express facts about programs at different levels of abstraction, but our understanding of both types of language is based on the abstract description of running programs provided by this model. This chapter describes the essential features of the object model, introducing them in the context of a simple application.

The notation provided by UML for illustrating these concepts is presented, and the chapter also illustrates how they can be implemented, thus making clear the close connections between design and programming languages. As the name suggests, the object model assess that the best way to understand an executing program is as a collection of objects.

Individual objects are responsible for maintaining part of a system's data and also for implementing aspects of its overall functionality. At the very least, objects will contain functions to access and update the data that they contain. Objects therefore combine two fundamental aspects of computer programs, namely data and processing, that are often kept separate in other approaches to software design. Objects tend to be highly dynamic: as a system evolves and the data stored fry the system changes, objects are frequently created and destroyed to reflect these alterations.

An individual object only implements a small fragment of a system's functionality. The global behavior of the system is generated by the interaction of a number of distinct objects.

The objects in a system must therefore be linked together in such a way as to permit communication between them. By means of this interaction, objects can cooperate to support behavior that transcends the data or processing capabilities of individual objects. In summary, then, the underlying approach to software proposed by the object model is to view an executing object-oriented program as being a dynamic network of intercommunicating objects.

A program is thought of as a graph, or network, whose structure can change from moment to moment. Objects form the nodes in this graph, and the arcs connecting the objects are known as links. The objects are discrete packages comprising a small subset of the program's data, together with the functions which operate on that data. Objects can be created and destroyed at run-time, and the topology of the object network can also be changed at run-time.

The structure of the network is therefore dynamic. The links between objects also serve as communication paths which enable objects to interact by sending messages to other objects. Messages are analogous to function calls: they are requests to the receiving object to carry out some operation, and can be accompanied by data parameterzing the message.

In this way, computation can take place in the network. The role of the object model The object model provides the semantic foundation for UML's design models. The meaning of any design construct or notation in UML can be explained by rephrasing it in terms of assertions about a set of connected and intercommunicating objects.

Static models describe the kinds of connections that can exist between objects and the possible topologies the resulting object network can have. Dynamic models describe the messages that can be passed between objects and the effect that receiving a message has on an object.

At the same time, the object model provides a very natural way of thinking about the run-lime properties of object-oriented programs.

Chapter 10 Object-Oriented Design Principles

A 'network of objects' is only a slight abstraction of a computer's memory in which objects occupy memory at certain addresses and can store references to other objects that are also in memory. This dual role of the object model establishes a direct link between UML design notations and actual programs, and explains why UML is a suitable language for designing and documenting the design of object-oriented programs.

A stock control example In manufacturing environments a common requirement is to keep track of the stock of parts held, and the way in which these parts are used. In this chapter we will illustrate the object model with a simple program which models different kinds of parts and the ways in which these parts are used to construct assemblies of arbitrary complexity.

The program will have to manage information describing the different kinds of part known to the system. This son of information might be available in a firm's catalogue, for example. For the purposes of this example, we will assume that we are interested in the following three pieces of information about each part, 1. Its catalogue reference number an integer. Its name a string.

The cost of an individual part a floating point value. Parts can be assembled into more complex structures called assemblies. An assembly can contain any number of parts, and can have a hierarchical structure.

In other words, an assembly can be made up of a number of subassemblies, each of which in turn is composed of parts and possibly further subassemblies of its own. A program which maintained miss information could then be used for a number of purposes, such as maintaining catalogue and inventory information, recording the structure of manufactured assemblies, and supporting various operations on assemblies, such as calculating the total cost of the parts in an assembly, or printing a listing of all the parts in an assembly.

In this chapter we will consider a simple query function which will find out the cost of the materials in an assembly by adding up the costs of all the parts it contains. Each individual object maintains part of the system's data, and provides a range of operations which permit other objects in the system to perform a specified range of manipulations on that data.

One of the hard tasks of object-oriented design is deciding how to split up a system's data into a set of objects which will interact successfully to support the required overall functionality.

A frequently applied rule of thumb for the identification of objects is to represent real-world objects from the application domain by objects in the model.

One of the major tasks of the stock control system is to keep track of all the physical parts held in stock by the manufacturer. A natural starting point, therefore, is to consider representing such of these parts as an object in the system. In general there will be lots of part objects, each describing a different part and so perhaps storing different data, but each having the same structure. The common structure of a set of objects which represent the same kind of entity is described by a class, and each object of that kind is said to be an instance of the class As a first step in the design of the stock management system, then, we are proposing that a 'part' class is defined.

Once a candidate class has been identified, we can consider what data should be held by instances of that class, A natural suggestion in the case of parts is that each object should contain the information that the system must hold about that part: its name, number and cost. This suggestion is reflected in the following implementation. Execution of the following statement results in ihe creation of a new object; an area of memory is allocated for the object and then suitably initialized.

Once the new object is created, a reference to it is stored in the variable 'myScrew'. The object created by the line of code above is illustrated in Figure 2.

The object is represented by a rectangle divided into two compartments. The upper compartment contains the object's name followed by the name of its class, both underlined.

At least one of these names must be present in every object icon.

Class names are normally chosen to start with an upper-case letter and object names with a lower-case letter. An attribute resembles a variable contained inside an object: it has a name, and a data value can be associated with the attribute. This data value can change as the system evolves. The lower compartment of an object icon contains the names and values of the object's attributes. This compartment is optional, and can be omitted if for current purposes it is not necessary to show the values of an object's attributes on a diagram.

These notions are explained in more detail below, together with the related notion of encapsulation. The various terms are also related to those features of a class definition that implement them.

State The first significant feature of objects is that they act as containers for data. In Figure 2. In a pure object-oriented system all the data maintained by the system is stored in objects; there is no notion of global data or of a central data repository as there is in other models. The aggregate of the data values contained in an object's attributes is often referred to as the object's state.

As these data values will change as a system evolves, it follows that an object's state can change too. In object-oriented programming languages, an object's state is specified by a number of fields defined in the object's class.

For example, the three attributes shown in Figure 2. Behavior In addition to storing data, each object provides an interface consisting of a number of operations.

Normally some of these operations will provide access and update functions for the data stored inside the object, but others will be more general and implement some aspect of the system's global functionality.

Operations are not shown on object icons in UML, The reason for this is that an object provides exactly the operations that are defined by its class. As a class can have many instances, each of which provides the same operations, it would be redundant to show the operations for each object.

In this respect, an object's behavior differs from its stale as, in general, different instances of the same class will store different data, and hence have a different state. In programming languages, an object's operations are defined in its class, as a set of methods. The set of operations defined by an object defines that object's interface.

For example, the interface of the part class defined in Section 2. Identity A third aspect of the definition of objects is that every object is distinguishable from every other object. This i s the case even if two objects contain exactly the same data and provide exactly the same set of operations in their interface. For example, the following lines of code create two objects which have the same state.

An object's identity is an intrinsic pan of the object model and is distinct from any of the data hems stored in the object. Designers do not need to define a special data value to distinguish individual instances of a class.

Sometimes, however, an application domain will contain real data items which are unique to individual objects, such as identification numbers of various kinds, and these data items will often be modelled as attributes.

In cases where there is no such data item, however, it is not necessary to introduce one simply for the purpose of distinguishing objects. In object-oriented programming languages, the identity of an object is usually represented by its address in memory. As it is impossible for two objects to be stored at the same location, all objects are guaranteed to have a unique address, and hence the identities of any two objects will be distinct.

Object names UML allows objects to be given names, which are distinct from the name of the class the object is an instance of. These names are internal to the model, and allow an object to be referred to elsewhere in a model. They do not correspond to any data item that is stored in the object; rather, a name should be thought of as providing a convenient alias for an object's identity. In particular, an object's name is distinct from the name of a variable that happens to hold a reference to the object.

When illustrating objects it is often convenient, as in Figure 2. However, more than one variable can hold references to the same object, and a single variable can refer to different objects at different times, so it would be easy for this convention, if widely applied, to lead to confusion. Encapsulation Objects are normally understood to encapsulate their data. This means that data stored inside an, object can only be manipulated by the operations belonging to that object, and consequently that an object's operations cannot directly access the data stored in a different object.

In many object-oriented languages, a form of encapsulation is provided by the access control mechanisms of the language. For example, the fact that the data members of the part class in Section 2. Notice chat this class-based form of encapsulation is weaker than the object-based form which allows no object to have access to the data of any other object, not even that belonging to objects of the same class.

Its major disadvantage is that the data describing parts of a given type is replicated: it is held in part objects, and if there are two or more parts of the same kind it will be repeated in each relevant part object. There are at least three significant problems with this.

Firstly, it involves a high degree of redundancy, There may be thousands of parts of a particular type recorded by the system, all sharing the samereference number, description and cost. If this data was stored for each individual pan, a significant amount of storage would be used up unnecessarily. Secondly, the replication of the cost data in particular can be expected to lead to maintenance problems, If the cost of a part changed, the cost attribute would need to be updated in every affected object.

As well as being inefficient, it is difficult to ensure in such cases that every relevant object has been updated, and that no objects representing parts of a different kind have been updated by mistake.

Thirdly, the catalogue information about parts needs to be stored permanently. In some situations, however, no part objects of a particular type may exist.

What follows is a description of the class-based subset of object-oriented design, which does not include object prototype-based approaches where objects are not typically obtained by instantiating classes but by cloning other prototype objects. Object-oriented design is a method of design encompassing the process of object-oriented decomposition and a notation for depicting both logical and physical as well as state and dynamic models of the system under design.

Object-oriented design topics[ edit ] Input sources for object-oriented design[ edit ] The input for object-oriented design is provided by the output of object-oriented analysis. Realize that an output artifact does not need to be completely developed to serve as input of object-oriented design; analysis and design may occur in parallel, and in practice the results of one activity can feed the other in a short feedback cycle through an iterative process.

Both analysis and design can be performed incrementally, and the artifacts can be continuously grown instead of completely developed in one shot. Some typical input artifacts for object-oriented design are: Conceptual model : The result of object-oriented analysis, it captures concepts in the problem domain. The conceptual model is explicitly chosen to be independent of implementation details, such as concurrency or data storage.

Use case : A description of sequences of events that, taken together, lead to a system doing something useful. Each use case provides one or more scenarios that convey how the system should interact with the users called actors to achieve a specific business goal or function. Use case actors may be end users or other systems.

In many circumstances use cases are further elaborated into use case diagrams.Vincent Cobb. In many cases, system development starts without a clear idea of what the system should do. Sep 27, May 1, Designers do not need to define a special data value to distinguish individual instances of a class.

The specific problem is: remove duplications, shorten the waterfall descriptions, and make the statements more concise Please help improve this section if you can. Provides patterns and instructions for sewing pants, vests, t-shirts, jackets, skirts, and dresses..

Chapter 2 introduces the basic concepts of object modelling in the context of a simple programming example. The data held in objects is represented in Figure 2.

The most significant omissions are any coverage of concurrency, activity diagrams, and anything other than a brief mention of component and deployment diagrams.

ABBEY from Minnesota
I do like sharing PDF docs weakly . Look through my other posts. I am highly influenced by color guard.