Sunday, October 12, 2014

Write a note on object oriented paradigm.




Object-Oriented Paradigm is where we focus real life objects while programming any solution. By focusing real life objects we mean that over solutions revolves around different objects, which represent respective objects in real life situation.
The objective of this section is to provide a thorough understanding of the principles of object-oriented paradigm.

Data Abstraction

Data abstraction is the reduction of a particular body of data to a simplified representation of the whole. Abstraction, in general, is the process of taking away or removing characteristics from something in order to reduce it to a set of essential characteristics.

Encapsulation

In object-oriented programming, objects interact with each other by messages. The only thing that an object knows about another object is the object's interface. Each object's data and logic is hidden from other objects. In other words, the interface encapsulates the object's code and data.
This allow the developer to separate an object's implementation from its behaviour. This separation creates a "black-box" affect where the user is isolated from implementation changes. As long as the interface remains the same, any changes to the internal implementation is transparent to the user. For example, if the name message is sent to the Student object, it does not matter to the user how the developer implemented the code to handle this message. All the sending object needs is the correct protocol for interacting with the Student object. The developer can change the implementation at any time, but the name message would still work because the interface is the same.

Polymorphism

Another benefit of separating implementation from behaviour is polymorphism. Polymorphism allows two or more objects respond to the same message. A method called name could also be implemented for an object of the class Course. Even though the implementation of this name message may return a course number and a course title, its protocol is the same as the name message to the Student object. Polymorphism allows a sending object to communicate with different objects in a consistent manner without worrying about how many different implementations of a message.
An analogy of polymorphism to daily life is how students response to a school bell. Every student knows the significant of the bell. When the bell (message) rings, however, it has its own meaning to different students (objects). Some students go home, some go to the library, and some go to other classes. Every student responds to the bell, but how they response to it might be different.
Another example of polymorphism is the function of printing. Every printable object must know how to print itself. The message is the same to all the different objects: print, but the actual implementation of what they must do to print themselves varies.
The sending object does not have to know how the receiving object implement the message. Only the receiving objects worries about that. Assume that there is a print Page method in a Document object that has the responsibility of printing a page. To print the page, the print Page method sends the print message to each object on the page. The Document does not need to know what types of objects are on the page, only that each object supports the behaviour of printing.
     
New objects can be added to the page without affecting the print Page method. This method still sends the print message and the new object provides its own print method in response to that message.
Polymorphism allows the sending object to communicate with receiving objects without having to understand what type of object it is, as long as the receiving objects support the messages.

Inheritance

Another important concept of object-oriented programming is inheritance. Inheritance allows a class to have the same behaviour as another class and extend or tailor that behaviour to provide special action for specific needs.
Let's use the following application as an example. Both Graduate class and Undergraduate class have similar behaviour such as managing a name, an address, a major, and a GPA. Rather than put this behaviour in both of these classes, the behaviour is placed in a new class called Student. Both Graduate and Undergraduate become subclass of the Student class, and both inherit the Student behaviour.
                  
Both Graduate and Undergraduate classes can then add additional behaviour that is unique to them. For example, Graduate can be either Master's program or phD program. On the other hand, Undergraduate class might want to keep track of either the student is Freshman, Sophomores, Junior or Senior.
Classes that inherit from a class are called subclasses. The class a subclass inherits from are called super class. In the example, Student is a super class for Graduate and Undergraduate. Graduate and Undergraduate are subclasses of Student.

What is Domain ? Explain Domain Analysis With Example.




ANSWER: In software engineering, domain analysis, or product line analysis, is the process of analyzing related software systems in a domain to find their common and variable parts. It is a model of wider business context for the system.
In software engineering, domain analysis, or product line analysis, is the process of analyzing related software systems in a domain to find their common and variable parts. It is a model of wider business context for the system. The term was coined in the early 1980s by James Neighbors. Domain analysis is the first phase of domain engineering. It is a key method for realizing systematic software reuse.
Domain analysis produces domain models using methodologies such as domain specific languages, feature tables, facet tables, facet templates, and generic architectures, which describe all of the systems in a domain. Several methodologies for domain analysis have been proposed.
The products, or "artifacts", of a domain analysis are sometimes object-oriented models (e.g. represented with the Unified Modeling Language (UML)) or data models represented with entity-relationship diagrams (ERD). Software developers can use these models as a basis for the implementation of software architectures and applications. This approach to domain analysis is sometimes called model-driven engineering.

Explain System Design Process ?



The Systems Development Life Cycle (SDLC), or Software Development Life Cycle in systems engineering, information systems and software engineering, is the process of creating or altering systems, and the models and methodologies that people use to develop these systems. The concept generally refers to computer or information systems.
In software engineering the SDLC concept underpins many kinds of software development methodologies. These methodologies form the framework for planning and controlling the creation of an information system the software development process.
The System Development Life Cycle framework provides a sequence of activities for system designers and developers to follow. It consists of a set of steps or phases in which each phase of the SDLC uses the results of the previous one.
A Systems Development Life Cycle (SDLC) adheres to important phases that are essential for developers, such as planning, analysis, design, and implementation, and are explained in the section below. A number of system development life cycle (SDLC) models have been created: waterfall, fountain, spiral, build and fix, rapid prototyping, incremental, and synchronize and stabilize. The oldest of these, and the best known, is the waterfall model: a sequence of stages in which the output of each stage becomes the input for the next. These stages can be characterized and divided up in different ways, including the following:
  • Project planning, feasibility study: Establishes a high-level view of the intended project and determines its goals.
  • Systems analysis, requirements definition: Refines project goals into defined functions and operation of the intended application. Analyzes end-user information needs.
  • Systems design: Describes desired features and operations in detail, including screen layouts, business rules, process diagrams, pseudocode and other documentation.
  • Implementation: The real code is written here.
  • Integration and testing: Brings all the pieces together into a special testing environment, then checks for errors, bugs and interoperability.
  • Acceptance, installation, deployment: The final stage of initial development, where the software is put into production and runs actual business.
  • Maintenance: What happens during the rest of the software's life: changes, correction, additions, moves to a different computing platform and more. This, the least glamorous and perhaps most important step of all, goes on seemingly forever.

What is the use of matrices ?Explain class oriented matrices .



Increasingly, object-oriented measurements are being used to evaluate and predict the quality of software . A growing body of empirical results supports the theoretical validity of these metrics. The validation of these metrics requires convincingly demonstrating that
(1) the metric measures what it purports to measure (for example, a coupling metric really measures coupling) and
(2) the metric is associated with an important external metric, such as reliability, maintainability and fault-proneness. Often these metrics have been used as an early indicator of these externally visible attributes, because the externally visible attributes could not be measures until too late in the software development process.
CLASS ORIENTED MATRICES
Lines of code and functional point metrics can be used for estimating object-oriented software projects. However, these metrics are not appropriate in the case of incremental software development as they do not provide adequate details for effort and schedule estimation. Thus, for object-oriented projects, different sets of metrics have been proposed. These are listed below.
Number of scenario scripts: Scenario scripts are a sequence of steps, which depict the interaction between the user and the application. A number of scenarios is directly related to application size and number of test cases that are developed to test the software, once it is developed. Note that scenario scripts are analogous to use-cases.
Number of key classes: Key classes are independent components, which are defined in object -oriented analysis. As key classes form the core of the problem domain, they indicate the effort required to develop software and the amount of 'reuse' feature to be applied during the development process.
Number of support classes: Classes, which are required to implement the system but are indirectly related to the problem domain, are known as support classes. For example, user interface classes and computation class are support classes. It is possible to develop a support class for each key class. Like key classes, support classes indicate the effort required to develop software and the amount of 'reuse' feature to be applied during the development process.
Average number of support classes per key class: Key classes are defined early in the software project while support classes are defined throughout the project. The estimation process is simplified if the average number of support classes per key class is already known.
Number of subsystems: A collection of classes that supports a function visible to the user is known as a subsystem. Identifying subsystems makes it easier to prepare a reasonable schedule in which work on subsystems is divided among project members.
The afore-mentioned metrics are collected along with other project metrics like effort used, errors and defects detected, and so on. After an organization completes a number of projects, a database is developed, which shows the relationship between object-oriented measure and project measure. This relationship provides metrics that help in project estimation.

Explain Component Based Software Engineering ?



ANSWER: Software components are units of software designed to interact with other independently developed components, and to be assembled by third parties into applications. Software component engineering focuses on the packaging of software into independent units to allow maximum reusability.
Component-based software development (CBD) is an evolution of object oriented software development (OOD). While both share the goal of software reusability, OOD is an implementation methodology, while CBD is an interface methodology. In CBD the emphasis is on standardizing the interfaces between components, with no restrictions on how the implementation is accomplished. CBD therefore is closely related to module design in separating interface and implementation..
In OOD, code reuse is accomplished through inheritance of implementation code. While OO languages also generally allow separation of implementation and interface, in practice the desire for code reuse often complicates data typing, and inheritance breaks data encapsulation (Snyder86). Partly for these reasons and partly due to the extra level of effort to prevent unnecessary dependencies, class hierarchies tend to be reused only within an application. Of course, class libraries as well as procedural libraries designed to be incorporated into larger applications are successful examples of software reuse.
Components require a deployment environment that Szyperski calls a component world or component environment. The services that a component needs from its environment are called its context dependencies. The mechanisms by which components interact are sometimes called wiring standards, and are one of the most important specifications of a component environment. There are currently three major component environments: The Object Management Group’s (OMG) CORBA, Microsoft’s COM, and Sun’s JavaBeans.
CORBA is an interface standard for distributed objects which may be implemented in different languages and running on different platforms. An object is defined with an Interface Description Language (IDL), and language and platform specific bindings must be created by CORBA vendors.
COM is a binary standard that defines interfaces between components. It grew out of Microsoft’s highly successful Visual Basic controls. A COM component can be implemented in any language, although is most often created in Visual Basic or C++, since Microsoft provides tools for those languages. COM is supported for MS Windows. MacOS, and by third parties for other platforms. COM supports interface inheritance but not implementation inheritance, and allows components to be nested inside of one another. DCOM is an extension of COM to distributed components. COM+ is an object-oriented version of COM for components within a single process.
JavaBeans is a set of conventions for Java to support component-based software development. The support for these conventions is embedded in the Java language and supporting class libraries, so JavaBeans is a Java-only component framework. However, using the Java Native Interface API, Java classes can wrap components built in other languages, can become COM components, and can be CORBA components as well.
A component describes itself through its interface, which can be thought of as a contract with whoever uses it. The contract has two parts: the syntax specifies the data types of the interface method’s arguments, which can be enforced automatically at compile or run time. The contract semantics describe the behaviour of the component, and can only be understood by humans, and so typically is represented by the documentation that the component developer provides. Because semantics are always context specific, the standardization of component behaviour is necessarily specific to an application domain, and are called domain standards. The OMG has created several "domain task forces" to create domain standards for business, manufacturing, electronic commerce, telecommunications, finance, and medicine. Both the Java and OLE communities also have domain specific efforts.
The combination of domain standards and supporting implementation classes and components that facilitate independent component development is called a component application framework, the most familiar example being GUI application builders.
 A component framework must specify both wiring and domain standards for the components it provides, that is, both syntactic and semantic descriptions of its interfaces. In practice, a component framework is an implementation of a domain standard and so both simultaneously evolve out of each other.