Thursday, 14 May 2015

Unit-I COMPLEXITY

Object Oriented Analysis and Design
MECS-602

COMPLEXITY OF SOFTWARE
Prior to 1990, simple problems were solved using computers during the initial evolution phases of computing technologies. These days, computers are utilized in solving many mission-critical problems and they are playing a vital role in the fields of space, defense, research, engineering, medicine, industry, business, and even in music and painting.

Large projects involve many highly qualified persons in the software development process. Software industries face a lot of problems in the process of software development. The following factors influence the complexity of software development, as shown in Figure. 1.

1.      Improper understanding of the problem The users of a software system express their needs to the software professionals. The requirement specification is not precisely conveyed by the users in a form understandable by the software professionals. This is known as impedance mismatch between the users and software professionals.

2.      Change of rules during development During the software development process, because of some government policy or any other industrial constraints realized, the users may request the developer to change certain rules of the problem already stated.




Figure 1: Factors influencing software complexity

3.       Preservation of existing so_ ware In reality, the existing software is modified or extended to suit the current requirement. If a system had been partially automated, the remaining automation process is done by considering the existing one. It is expensive to preserve the existing software because of the non availability of experts in that field all the time. Also, it results in complexity while integrating newly developed software with the existing one.

4.      Management of development process Since the size of the software becomes larger and larger in the course of time it is difficult to manage, coordinate, and integrate the modules of the software.

5.      Flexibility due to lack of standards There is no single approach to develop software for solving a problem. Only standards can bring out uniformity. Since only a few standards exist in the software industries, software development is a laborious task resulting in complexity.

6.      Behavior of discrete systems the behavior of a continuous system can be predicted by using the existing laws and theorems. For example, the landing of a satellite can be predicted exactly using some theory even though it is a complex system. But, computers have systems with discrete states during execution of the software. The behavior of the software may not be predicted exactly because of its discrete nature. Even though the software is divided into smaller parts, the phase transition cannot be modeled to predict the output. Sometimes an external event may corrupt the whole system. Such events make the software extremely complex.

7.      Software testing the number of variables, control structures, and functions used in the software are enormous. The discrete nature of the software execution modifies a variable and it may be unnoticed. This may result in unpredictable output. Hence, vigorous testing is essential. It is impossible to test each and every aspect of the software in a complex software system. So only important aspects are subjected to testing and the user must be satisfied with this. The reliability of the software depends on rigorous testing. But testing processes make software development more and more complex.

SOFTWARE CRISIS

The complexity involved in the software development process led to the software crisis. Late completion, exceeding the budget, low quality, software not satisfying the stated demand, and lack of reliability are the symptoms of software crisis. Software crisis has been the result of a missing methodology in software development. The lack of structured and organized approach to software development—not conceived as a process—led to late completion, exceeding the budget in the case of large and complex projects. The OO paradigm arose as a consequence of a software crisis, where the relative cost of software has increased substantially at a rate where software maintenance and software development cost has far outstripped that of hardware costs.


OBJECT-ORIENTED MODEL: EVOLUTION OF A NEW PARADIGM

The complexity of software required a change in the style of programming. It was aimed to:
1.      produce reliable software
2.      reduce production cost
3.      develop reusable software modules
4.      reduce maintenance cost
5.      quicken the completion time of software development
The Object-oriented model was evolved for solving complex problems. It resulted in object-oriented programming paradigms. Object-oriented software development started in the 1980s. Object-oriented programming (OOP) seems to be effective in solving the complex problems faced by software industries.
The end-users as well as the software professionals are benefited by OOP. OOP provides a consistent means of communication among analysts, designers, programmers, and end-users. Object-oriented programming paradigm suggests new ways of thinking for finding a solution to a
Problem. Hence, the programmers should keep their minds tuned in such a manner that they are not to be blocked by their preconceptions experienced in other programming languages, such as structured programming. Proficiency in object-oriented programming requires talent, creativity, intelligence, logical thinking, and the ability to build and use abstractions and experience.

If procedures or functions are considered as verbs and data items are considered as nouns, a procedure oriented program is organized around verbs, while an object-oriented program is organized around nouns.

object-oriented design uses a notation and process for constructing complex software systems and offers a rich set of models with which we may reason about different aspects of the system under consideration.

CLASSES AND OBJECTS
The concepts of object-oriented technology must be represented in object-oriented programming languages. Only then, complex problems can be solved in the same manner as they are solved in real-world situations. OOP languages use classes and objects for representing the concepts of abstraction and encapsulation. The mapping of abstraction to a program is shown in Fig. 1.2.


Fig. 1.2 Mapping real world entity to object oriented programming
The software structure that supports data abstraction is known as class. A class is a data type capturing the essence of an abstraction. It is characterized by a number of features. The class is a prototype or blue print or model that defines different features. A feature may be a data or an operation. Data are represented by instance variables or data variables in a class. The operations are also known as behaviors, or methods, or functions. They are represented by member functions of a class in C++ and methods in Java and C#.
A class is a data type and hence it cannot be directly manipulated. It describes a set of objects. For example,
apple is a fruit
implies that apple is an example of fruit. The term “fruit” is a type of food and apple is an instance of fruit. Likewise, a class is a type of data (data type) and object is an instance of class.

Similarly car represents a class (a model of vehicle) and there are a number of instances of car. Each instance of car is an object and the class car does not physically mean a car. An object is also known as class variable because it is created by the class data type. Actually, each object in an object-oriented system corresponds to a real-world thing, which may be a person, or a product, or an entity. The differences between class and object are given in Table 1.1.


Table 1.1 Comparisons of Class and Object

Class
Object
Class is a data type.
Object is an instance of class data type.
It generates object.
It gives life to a class.
It is the prototype or model.
It is a container for storing its features
Does not occupy memory location.
It occupies memory location.
It cannot be manipulated because it is not available in the memory.
It can be manipulated.

Instantiation of an object is defined as the process of creating an object of a particular class.
An object has:
·         states or properties
·         operations
·         identity
Properties maintain the internal state of an object. Operations provide the appropriate functionality to the object. Identity differentiates one object from the other. Object name is used to identify the object. Hence, object name itself is an identity. Sometimes, the object name is mixed with a property to differentiate two objects. For example, differentiation of two similar types of cars, say MARUTI 800 may be differentiated by colors. If colors are also same, the registration number is used. Unique identity is important and hence the property reflecting unique identity must be used in an object.
The properties of an object are important because the outcome of the functions depends on these

properties. The functions control the properties of an object. They act and react to messages. The message may cause a change in the property of an object. Thus, the behavior of an object depends on the properties. For example, assume a property called brake condition for the class car. If the brake is not in working condition, guess the behavior of car. The outcome may be unexpected. Similarly, in a student mark statement, the result() behavior depends on the data called marks. The property of resultStatus may be modified based on the marks.


No comments:

Post a Comment