Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Assignment No: - 3

Ques:1. Describe specification of software component.


Ans:1
 A Component Specification is a generic description of a component.
 Behavior is defined as a set of interfaces.
 A component specification is realized as a component implementation.
 This form represents the specification of a unit of software that describes the behavior of a set
of component objects and defines a unit of implementation.
 A software component specification should be detailed, focusing on what the software is to do
rather than how this is to be done.

Need for component specifications 


- For users,
• The specification provides a definition of its interface, viz. its operations and context
dependencies.
• Since it is only the interface that is visible to users, its specification must be precise and
complete.
- For developers,
• The specification of a component also provides an abstract definition of its internal structure.

Component specification levels 

Levels of a component specification:


• Syntax: includes specifications on the programming language level.
• Semantic: functional contracts
• Non-functional: deals with quality of service.

Ques:2. Write difference between component-oriented programming and object-


oriented programming by writing code for every difference.
Ans:2
Component-Oriented Programming Object-Oriented Programming
1.COP is interface-based. 1.OOP is object-based.

public interface IMyInterface function A() {}


{ A.prototype.doStuff =function() {
void Method1(); console.log("hello world");
void Method2(); };
} function B() {}
public class MyClass : IMyInterface B.prototype =Object.create (A.prototype);
{ B.prototype.doStuff = function()
void IMyInterface.Method1(){...} { A.prototype.doStuff.call(this);
void IMyInterface.Method2(){...} console.log("...and goodbye!");
} };
2.COP is a packaging and distribution technology. 2. OOP is an implementation technology.
interface I1 { class GrandParent
double x = 4.444; {
void methodI1(); //public static by     void fun()
default     {
}         System.out.println("Grandparent");
interface I2 extends I1 {     }
double y = 5.555; }
void methodI2(); //public static by // First Parent class
default class Parent1 extends GrandParent
} {
class A1 implements I2 {     void fun()
public int a1 = 555;     {
public void methodI1(){         System.out.println("Parent1");
System.out.println("From I1"+x+y);     }
} }
public void methodI2(){   // Second Parent Class
System.out.println("From I2"+x+y); class Parent2 extends GrandParent
} {
}     void fun()
public class Demonstration_97 {     { System.out.println("Parent2");  }
public static void main(String[] args) { }
A1 a = new A1(); // Error : Test is inheriting from multiple
a.methodI1(); // classes
a.methodI2(); class Test extends Parent1, Parent2
} { public static void main(String args[])
}    { Test t = new Test();
       t.fun();  }
}
3. COP has loosely coupled components. 3. OOP has tightly coupled objects dependent on
each other through inheritance implementation.
B.prototype.doStuff = function()
{ A.prototype.doStuff.call(this); class Volume 
console.log("...and goodbye!"); {
};      public static void main(String args[]) 
     {
         Box b = new Box(5,5,5);
         System.out.println(b.volume);
     }
}
class Box 
{ public int volume;
     Box(int length, int width, int height) 
     {  this.volume = length * width * height; }
}
Ques:3. Explain and calculate the following component metrics on the basis of
following problem:

a) Component Packing Density (CPD)


b) Interaction Density Metrics (IDM)

c) Incoming Interaction Density of a Component (IIDC)

d) Outgoing Interaction Density of a Component (OIDC)

e) Average Interaction Density (AID)

Ans:3 1) Component Packing Density (CPD) = Constituents / Total Components


11
=
4

2) Interaction Density Metrics (IDM) = I / Imax

where I = Total no. of interaction; A = Total no. of interaction available

2
For C1: ; I=2, A=3
3
2
For C2: ; I=2, A=3
3
3
For C3: =1; I=3, A=3
3
2
For C4: =1; I=2, A=2
2

3) Incoming Interaction Density of a Component (IIDC) = I in / I max in


where i = Total no. of incoming interaction; Ai = Total no. of available incoming interaction

1
For C1: = 1; i=1, Ai=1
1
1
For C2: = 1; i=1, Ai=1
1
2
For C3: =1; i=2, Ai=2
2
1
For C4: = 1; i=1, Ai=1
1

4) Outgoing Interaction Density of a Component (OIDC) = I out / I max out

o = Total no. of outgoing interaction; Ao= Total no. of available outgoing interaction

1
For C1: ; i=1, Ao=2
2
1
For C2: ; i=1, Ao=2
2
1
For C3: = 1; i=1, Ao=1
1
1
For C4: = 1; i=1, Ao=1
1
IDM of C 1+ IDM of C 2+ IDM of C 3+ IDM of C 4
5) Average Interaction Density (AID) ¿
Total no . of components

2 2
+ +1+1 10
= 3 3 =
12
4
Ques:4. Define domain engineering and describe all three phases of domain
engineering.
Ans:4 Domain Engineering (DE) is the activity of collecting, organizing, and storing past experience in
building systems or parts of systems in a particular domain in the form of reusable assets, as
well as providing an adequate means for reusing these assets when building new system with
the following: retrieval, qualification, dissemination, adaptation, assembly, and so on.

Steps: -

 Domain Analysis
 Domain Design
 Domain Implementation.
 The intent of domain engineering is to identify, construct, catalogue, and disseminate a set
of software components that have applicability to existing and future software in a
particular application domain.
 The overall goal is to establish mechanisms that enable software engineers to share these
components—to reuse them.

Domain Engineering Components: -

Domain Engineering Process Component Main Purpose


Domain Analysis Domain analysis defining a set of reusables, configurable
requirements for the systems in the domain
Domain Design Developing a common architecture for the system in the
domain and devising a production plan
Implementing the reusable assets, for example, reusable
Domain Implementation components, domain-specific languages, generators, a
reuse infrastructure, and a production plan
Ques:5. Draw a well labeled diagram of maintenance process model 2 and
describe only forward engineering.
Ans:5 Re-engineering process model is nothing but is the step by step procedure to carry out the re-
engineering process for any particular software project. Re engineering is basically a reconstruction and
we can better understand the re-engineering of information system if we consider a parallel activity; the
reconstruction of house.
A software re-engineering process model is explained in the below figure as;

The re-engineering paradigm shown in figure is a cyclic model. This means that the phases of the
Re-engineering model can be re visited according to the need of the re-engineering process model.
The reverse engineering cycle is required for previous versions. During reverse engineering, the old code
is examined (disconnected) to separate the module particulars. The module determinations are at that
point dissected to create the plan. The plan is examined (disconnected) to create the first necessities
determination. The change requests are then applied to this prerequisite particular to land at the new
requirements specification.

Below are some phases that are to be carried out in the whole re-engineering process.
1. Inventory analysis
2. Document restructuring
3. Reverse engineering
4. Code restructuring
5. Data restructuring.
6. Forward engineering

Estimation of Approximate Maintenance Cost: - It is well known that maintenance endeavors require
about 60% of the absolute life cycle cost for a common software item. Be that as it may, maintenance
expenses shift broadly from one application space to another. For inserted frameworks, the support cost
can be as much as 2 to multiple times the advancement cost.

Forward Engineering: -
Forward Engineering also called as renovation or reclamation not only for recovers design information
from existing software but uses this information to alter or reconstitute the existing system in an effort
to improve its overall quality. Forward engineering is required high proficiency skill. It takes more time
to construct or develop an application.
Forward engineering is the process of building from a high-level model or concept to build in
complexities and lower-level details. This type of engineering has different principles in various software
and database processes. forward engineering is important in IT because it represents the 'normal’
development process.

You might also like