1 / 21

16.35 Midterm Debrief

16.35 Midterm Debrief. October 30, 2002 Malia Kilpinen. Question 1. What are process models? Compare and contrast the spiral model of development with another model of your choice. (1+5p). Solution 1 - Process Model.

zamir
Download Presentation

16.35 Midterm Debrief

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 16.35 Midterm Debrief October 30, 2002 Malia Kilpinen

  2. Question 1 • What are process models? Compare and contrast the spiral model of development with another model of your choice. (1+5p)

  3. Solution 1 - Process Model • A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective.

  4. Solution 1 - Spiral Model • Process is represented as a spiral rather than as a sequence of activities with backtracking. • Each loop in the spiral represents a phase in the process. • No fixed phases such as specification or design -loops in the spiral are chosen depending on what is required. • Risks are explicitly assessed and resolved throughout the process.

  5. Solution 1 - Spiral Model • Objective Setting • Risk assessment and reduction • Development and validation • Planning • <<There is a picture in Van Vliet pg 62.>>

  6. Question 2 • Who are the expected readers of a requirement specification and what properties do they want the specification to have? (5p)

  7. Solution 2 • Users and the customer (in case of custom-made product) • want readability, completeness, consistency, correctness, may serve as a contract (testability) • Designers • readability, consistency, non-ambiguity, traceability • Testers • testability • Maintenance staff • completeness, traceability

  8. Question 3 • Consider the following piece of program, which assumes a large integer C and an array A(0..C). It is intended to assign the maximum of A to the variable max. max := A(0); i := 1; while i < C loop i := i+1; if A(i) > max then max := A(i); end if; -- max is the maximum of A(0..i); end loop;

  9. Question 3 (cont.) • a) Show what steps must be taken to find test cases for coverage testing, using this program as an example. Show the distinction between node-coverage and branch-coverage. (5p) • b) What method(s) of verification are both practical and would likely reveal the error? Note that C is large. Motivate your answer. (3p)

  10. Solution 3 - Part a • 1) draw flow-chart, identify nodes and branches • 2) find a collection of paths that visits all nodes/branches • 3) find input data that makes the program follow each path (if it turns out that there is no such data, the path is infeasible, go back to 2 and replace it by other paths) • in this case, the difference is that branch coverage requires that the test A(i)>max is true sometimes, and false sometimes. For node coverage, it may always be true. In any case, only one test is necessary. Say C=3, and A=[5,2,3,6]

  11. Solution 3 - Part b • The error is that A(1) is never checked. A statistical test has probability 1/C to detect this. • From a) we can see that it is easy to achieve branch coverage and yet miss the error. • A boundary value test might detect it, if you have a rather broad definition of “boundary”. Such a definition will soon be unworkable. Inspection has a good chance. • (Formal verification, that can be done mostly automatically when loop invariants are provided, is another candidate.)]

  12. Question 4 • Describe the architectures repository model and client-server. Compare their pros and cons. (6p)

  13. Solution 4 - Repository • Advantages • Efficient way to share large amounts of data • Sub-systems need not be concerned with how data is produced • Centralized management e.g. backup, security, etc. • Disadvantages • Sub-systems must agree on a repository data model. Inevitably a compromise • Data evolution is difficult and expensive • No scope for specific management policies • Difficult to distribute efficiently

  14. Solution 4 - Client Server • Advantages • Distribution of data is straightforward • Makes effective use of networked systems. May require cheaper hardware • Easy to add new servers or upgrade existing servers • Disadvantages • No shared data model so sub-systems use different data organisation. data interchange may be inefficient • Redundant management in each server • No central register of names and services - it may be hard to find out what servers and services are available

  15. Question 20 • Cow-moon Ada code trace problem. (2p)

  16. Solution 20 • Output is: • 3 14 • Moo! Moo! Moo! Moo! • 7 6

  17. Question 21 • What does it mean to declare a variable as private? When would you declare a variable as private? (1p)

  18. Question 22 • Write a program to calculate the cube of a user-inputted integer. Your program should include error checking. (6p)

  19. Solution 22 • Should use Skip_Line function in error checking. • Simplified version of problem set 2.

  20. Question 23 • Assume that a record type Beep has been defined. The following pointers are then declared: (1p) type BeepPointer is access Beep; Audi, BMW: BeepPointer; Audi : new Beep; BMW : new Beep; • What is the difference between the following commands? BMW := Audi; BMW.all := Audi.all;

  21. Solution 23 • Discussed in Ada Compendium. • BMW := Audi; • BMW points to Audi’s memory location • BMW.all := Audi.all; • BMW holds same values as Audi

More Related