Share
Explore BrainMass

Computer Architecture

1. Describe in your own words the advantages of specifying pre-conditions, post-conditions, and invariants. How, specifically, do they help to increase the quality of functions?
2. Create a chart or table that compares and contrasts the 4 types of software testing.
3. List the qualities that designs should possess. In your own words, describe the meaning of each.
4. What affect do application servers have on the traditional SDLC? What affect does server virtualization have on application servers?

Solution Preview

1. Describe in your own words the advantages of specifying pre-conditions, post-conditions, and invariants. How, specifically, do they help to increase the quality of functions?

a. Design by Contract is a design process where software designers create precise and verifiable specifications for software components. Basically it is based upon the idea that the different parts of a software system work together as a supplier and client. The supplier and client form a contract for mutual benefit. For example, the website front end supplies the database with information. The information is processed by SQL queries and returned to the front end in some changed form. So the website and the database have a contract with each other to provide raw and processed data.

b. The contract extends down to the procedure level of the software and contains the following information.

i. Acceptable/unacceptable input and its meaning.
ii. Return data and its meaning
iii. Errors and exceptions that can occur and their meaning.
iv. Side effects
v. Preconditions-Some condition that must be true before a section of code can execute.
vi. Postconditions-A condition that must be true after a section of code is executed.
vii. Invariants-Basically this states that to be considered an invariant, a precondition which is true before a function is run, then it must also be true after the function is run. This is used to test programs correctness.
viii. Performance Guarantees-how long a ...

Solution Summary

This solution provides a detailed discussion of the given computer science questions.

$2.19