0% found this document useful (0 votes)
444 views2 pages

Se Home Assgnment

This document provides instructions for a software engineering home assignment due on May 15, 2013. It includes 12 questions related to software design principles, patterns, and testing techniques. Specifically, it asks about the Liskov substitution principle, implementing a class with states using the State design pattern, architectural design patterns, using OCL for design, mapping a DFD to an architecture, user interface design principles, software quality assurance elements, formal technical reviews, control flow graphs and cyclomatic complexity, integration testing approaches, and differences between regression, load, and stress testing.

Uploaded by

Praneetha Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
444 views2 pages

Se Home Assgnment

This document provides instructions for a software engineering home assignment due on May 15, 2013. It includes 12 questions related to software design principles, patterns, and testing techniques. Specifically, it asks about the Liskov substitution principle, implementing a class with states using the State design pattern, architectural design patterns, using OCL for design, mapping a DFD to an architecture, user interface design principles, software quality assurance elements, formal technical reviews, control flow graphs and cyclomatic complexity, integration testing approaches, and differences between regression, load, and stress testing.

Uploaded by

Praneetha Reddy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Software Engineering Home Assignment-2

Last Date of submission: 15/5/2013

1. A classic Liskov substitution principle example consists of two classes, Square and Rectangle. Since a square is-a rectangle, the relationship between the two can be modeled using inheritance, with square deriving from Rectangle. Suppose that Rectangle has methods to set/get the width, and set/get the length. Explain how this relationship between square and Rectangle violates the Liskov substitution principle. 2. Write the code for a class Account with attribute balance, accessor methods, and method add() . Assume that Account has states Sound, Empty, and Arrears, and that these are implemented using the State design pattern. Write a complete set of unit cases for Account, including state-oriented tests. 3. Some design patterns are particularly relevant at the architectural level. Name two of these and explain their relevance. 4. Explain how OCL is used for describing component level and deployment level design elements. 5. Illustrate the set of design steps that allows a DFD to be mapped into a specific architectural style 6. State the Set of basic principles that can be applied to design user interface. 7. What are the Elements of software quality assurance? 8. State the set of guidelines used for formal technical reviews 9. Draw a control flow graph for the following sample code. Determine the cyclomatic complexity of the graph.
1. 2. 3. 4. 5. 6. sum_of_all_positive_numbers(a, num_of_entries, sum) sum = 0 init = 1 while(init <= num_of_entries) if a[init] > 0 sum = sum + a[init] endif 7. init = init + 1 endwhile 8. end sum_of_all_positive_numbers

10. Discuss the advantages and disadvantages of top-down and bottom-up approaches to integration testing. Consider a point-of-sale system that is under development. Assume that the hardware platform and device drivers that control it are brand new. The rest of the software is being ported from an existing system. What appropriate method of integration might you recommended be used, and why 11. What are the differences between regression testing, load testing and stress testing? 12. Use the following program fragment for questions (a)(e) below.
w = x; // node 1 if (m > 0) { w++; // node 2 } else {

w=2*w; // node 3 } // node 4 (no executable statement) if (y <= 10) { x = 5*y; // node 5 } Else { x = 3*y+5; // node 6 } z = w + x; // node 7

Draw a control flow graph for this program fragment. Use the node numbers given above. a) Which nodes have defs for variable w? b) Which nodes have uses for variable w? c) Are there any du-paths with respect to variable w from node 1 to node 7? d) If not, explain why not. If any exist, show one. e) Enumerate all of the du-paths for variables w and x.

You might also like