Tuesday, 12 May 2015

SOFTWARE ENGINEERING PRACTICALS


ENGINEERING SOFTWARE


Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software.


The term software engineering first appeared in the 1968 NATO Software Engineering Conference and was meant to provoke thought regarding the current "software crisis" at the time. Since then, it has continued as a profession and field of study dedicated to creating software that is of higher quality, more affordable, maintainable, and quicker to build. Since the field is still relatively young compared to its sister fields of engineering, there is still much debate around what software engineering actually is, and if it conforms to the classical definition of engineering. It has grown organically out of the limitations of viewing software as just computer programming

A software development process is a structure imposed on the development of a software product. Synonyms include software life cycle and software process. There are several models for such processes, each describing approaches to a variety of tasks or activities that take place during the process.

What is a software life cycle model?

A software life cycle model is either a descriptive or prescriptive characterization of how software is or should be developed. A descriptive model describes the history of how a particular software system was developed. Descriptive models may be used as the basis for understanding and improving software development processes or for building empirically grounded prescriptive models.
These two characterizations suggest that there are a variety of purposes for articulating software life cycle models. These characterizations serve as a
  • Guideline to organize, plan, staff, budget, schedule and manage software project work over organizational time, space, and computing environments.
  • Prescriptive outline for what documents to produce for delivery to client.
  • Basis for determining what software engineering tools and methodologies will be most appropriate to support different life cycle activities.
  • Framework for analyzing or estimating patterns of resource allocation and consumption during the software life cycle (Boehm 1981)
  • Basis for conducting empirical studies to determine what affects software productivity, cost, and overall quality.

 Experiment 1-

What is a software process model?

In contrast to software life cycle models, software process models often represent a networked sequence of activities, objects, transformations, and events that embody strategies for accomplishing software evolution. Such models can be used to develop more precise and formalized descriptions of software life cycle activities. Their power emerges from their utilization of a sufficiently rich notation, syntax, or semantics, often suitable for computational processing. Software process networks can be viewed as representing multiple interconnected task chains (Kling 1982, Garg 1989).
 Task chains represent a non-linear sequence of actions that structure and transform available computational objects (resources) into intermediate or finished products. Non-linearity implies that the sequence of actions may be non-deterministic, iterative, accommodate multiple/parallel alternatives, as well as partially ordered to account for incremental progress. Task chains can be employed to characterize either prescriptive or descriptive action sequences. Prescriptive task chains are idealized plans of what actions should be accomplished, and in what order. For example, a task chain for the activity of object-oriented software design might include the following task actions:
  •  Develop an informal narrative specification of the system.
  •  Identify the objects and their attributes.
  •  Identify the operations on the objects.
  •  Identify the interfaces between objects, attributes, or operations.
  •  Implement the operations.
Clearly, this sequence of actions could entail multiple iterations and non-procedural primitive action invocations in the course of incrementally progressing toward an object-oriented software design. Task chains join or split into other task chains resulting in an overall production network or web (Kling 1982). The production web represents the "organizational production system" that transforms raw computational, cognitive, and other organizational resources into assembled, integrated and usable software systems.





Software development activities

Planning

The important task in creating a software product is extracting the requirements or requirements analysis
Once the general requirements are gleaned from the client, an analysis of the scope of the development should be determined and clearly stated. This is often called a scope document.


 

Implementation, testing and documenting

Implementation is the part of the process where software engineers actually program the code for the project. 
Documenting the internal design of software for the purpose of future maintenance and enhancement is done throughout development. This may also include the authoring of an API, be it external or internal.

Deployment and maintenance

Deployment starts after the code is appropriately tested, is approved for release and sold or otherwise distributed into a production environment.
Software Training and Support is important because a large percentage of software projects fail because the developers fail to realize that it doesn't matter how much time and planning a development team puts into creating software if nobody in an organization ends up using it. People are often resistant to change and avoid venturing into an unfamiliar area, so as a part of the deployment phase, it is very important to have training classes for new clients of your software.





2) Experiment 2--

Algorithms
In mathematics, computing, and related subjects, an algorithm is an effective method for solving a problem using a finite sequence of instructions. Algorithms are used for calculation, data processing, and many other fields.
Each algorithm is a list of well-defined instructions for completing a task. Starting from an initial state, the instructions describe a computation that proceeds through a well-defined series of successive states, eventually terminating in a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate randomness.



3) EXPERIMENT 3--

Flowchart
A flowchart is a diagrammatic representation of a step-by-step solution to a given problem. It is a common type of diagram, that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. Data is represented in these boxes, and arrows connecting them represent flow / direction of flow of data. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields.



A simple flowchart for computing factorial N (N!)
A flowchart for computing factorial N (N!) where N! = (1 * 2 * 3 * ... * N), see image. 

 Symbols
A typical flowchart from older Computer Science textbooks may have the following kinds of symbols:

Start and end symbols
Represented as circles, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase signaling the start or end of a process, such as "submit enquiry" or "receive product".

Arrows
Showing what's called "flow of control" in computer science. An arrow coming from one symbol and ending at another symbol represents that control passes to the symbol the arrow points to.

Processing steps
Represented  as rectangles. Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar.

Input/Output
Represented as  a parallelogram. Examples: Get X from the user; display X.

Types of flowcharts


Sterneckert (2003) suggested that flowcharts can be modelled from the perspective of different user groups (such as managers, system analysts and clerks) and that there are four general types:
  • Document flowcharts, showing controls over a document-flow through a system
  • Data flowcharts, showing controls over a data flows in a system
  • System flowcharts showing controls at a physical or resource level
  • Program flowchart, showing the controls in a program within a system



                   EXPERIMENT 4-


Data Flow Diagram


·         A data-flow diagram (DFD) is a graphical representation of the "flow" of data through an information system. DFDs can also be used for the visualization of data processing (structured design). On a DFD, data items flow from an external data source or an internal data store to an internal data store or an external data sink, via an internal process.
·         A DFD provides no information about the timing or ordering of processes, or about whether processes will operate in sequence or in parallel. 

Developing a data-flow diagram




data-flow diagram example


Top-down approach

  1. The system designer makes "a context level DFD" or Level 0, which shows the "interaction" (data flows) between "the system" (represented by one process) and "the system environment" (represented by terminators).
  2. The system is "decomposed in lower-level DFD (Level 1)" into a set of "processes, data stores, and the data flows between these processes and data stores".
  3. Each process is then decomposed into an "even-lower-level diagram containing its sub processes".
  4. This approach "then continues on the subsequent sub processes", until a necessary and sufficient level of detail is reached which is called the primitive process (aka chewable in one bite).







context level Data flow diagram created using Select SSADM

This level shows the overall context of the system and its operating environment and shows the whole system as just one process. It does not usually show data stores, unless they are "owned" by external systems

Level 1 (high level diagram)




A Level 1 Data flow diagram for the same system.

This level (level 1) shows all processes at the first level of numbering, data stores, external entities and the data flows between them. The purpose of this level is to show the major high-level processes of the system and their interrelation.

 

Level 2 (low level diagram)



A Level 2 Data flow diagram showing the "Process Enquiry" process for the same system.
This level is a decomposition of a process shown in a level-1 diagram, as such there should be a level-2 diagram for each and every process shown in a level-1 diagram.



Experiment 5-

 ER Diagram

In software engineering, an entity-relationship model (ERM) is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements in a top-down fashion. Diagrams created by this process are called entity-relationship diagrams, ER diagrams, or ERDs.

Diagramming conventions

Entity sets are drawn as rectangles, relationship sets as diamonds. If an entity set participates in a relationship set, they are connected with a line. Attributes are drawn as ovals and are connected with a line to exactly one entity or relationship set.
Its components are:
  • rectangles representing entity sets.
  • ellipses representing attributes.
  • diamonds representing relationship sets.
  • lines linking attributes to entity sets and entity sets to relationship sets.

right_bottom_roundcornerEntity Relationship Models
         Mandatory Relationships
         Optional Relationships
         Many-to-Many Relationships
         One-to-Many Relationships
         One-to-One Relationships



EXPERIMENT 6--


Software Requirement Specification

           A Software Requirements Specification (SRS) is a complete description of the behavior of the system to be developed. It includes a set of use cases that describe all the interactions the users will have with the software. Use cases are also known as functional requirements. In addition to use cases, the SRS also contains non-functional (or supplementary) requirements. Non-functional requirements are requirements which impose constraints on the design or implementation (such as performance engineering requirements, quality standards, or design constraints).
Requirements analysis in systems engineering and software engineering, encompasses those tasks that go into determining the needs or conditions to meet for a new or altered product, taking account of the possibly conflicting requirements of the various stakeholders, such as beneficiaries or users.




EXPERIMENT 7--


- Introduction about VB.net and use of Tool Box Window and Properties Window in project









EXPERIMENT 8-


Write a program inVB.net Language to demonstrate the    working of the arithmetic operation

ALGORITHM:
Step1: make the four button for arithmetic operation

Step2: Declare command the necessary variables

Step3: Read the input of integer

Step4: Add the textbox1 and textbox2 and store the result in textbox 3

Step5: Display the result in textbox 3



Coding for Program:


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim sum As Integer
        sum = Val(TextBox1.Text) + Val(TextBox2.Text)
        TextBox3.Text = sum

    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim sum As Integer
        sum = Val(TextBox1.Text) - Val(TextBox2.Text)
        TextBox3.Text = sum
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim sum As Integer
        sum = Val(TextBox1.Text) * Val(TextBox2.Text)
        TextBox3.Text = sum
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim sum As Integer
        sum = Val(TextBox1.Text) / Val(TextBox2.Text)
        TextBox3.Text = sum
    End Sub

    Private Sub Button3_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button3.DoubleClick

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

    End Sub

    Private Sub TextBox3_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox3.TextChanged

    End Sub
End Class



Output:


RESULT:

Thus the VB.net program the arithmetic operation is executed and the output is verified


EXPERIMENT 9-

Program 9:
Write a program inVB.net Language to demonstrate the    working of the For Loop operation print number in incrementing and decrementing order in text box1.
ALGORITHM:
Step1: Add the one from in VB.net
Step1: Add the label to display name of program

Step1: Add two command button for display the number

Step2: Declare command the necessary variables
Step3: Add message box to display the current number
Step4: Add the textbox1 to store the result.
Step5: Display the result in textbox1

Coding for Program:

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        For i = 0 To 20 Step 1

            TextBox1.Text = TextBox1.Text + CStr(i) + vbNewLine
            MessageBox.Show("The value of i is:  " & i)
        Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        For i = 20 To 0 Step -1

            TextBox1.Text = TextBox1.Text + CStr(i) + vbNewLine
            MessageBox.Show("The value of i is:  " & i)
        Next
    End Sub
End Class

Output:




RESULT:

Thus the VB.net program the For Loop operation is executed and the output is verified





EXPERIMENT 10-


Program 10
 Write a program inVB.net Language to demonstrate the    working of the For Loop operation print even and odd number in text box.
ALGORITHM:
Step1: Add the one from in VB.net
Step1: Add the label to display work of program

Step1: Add two command button for display the number

Step2: Declare command the necessary variables
Step3: Read the input of integer
Step4: Add the textbox1 to store the result.
Step5: Display the result in textbox1

Coding for Program

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click


        For i = 2 To 20 Step 2

            TextBox1.Text = TextBox1.Text + CStr(i) + vbNewLine
        Next
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        For i = 1 To 20 Step 2

            TextBox1.Text = TextBox1.Text + CStr(i) + vbNewLine
        Next
    End Sub
End Class

Output:




RESULT:

Thus the VB.net program the For Loop operation is executed and the output is verified.