3

------CEN 5035 - Software Engineering ------

Quiz 1 -- Spring 2007 –- Solution Notes

1.  “The delivery challenge is the challenge of shortening delivery times

for large and complex systems without compromising system quality.” (p. 13 of text)

2.  The advantage of the waterfall model are that documentation is produced

at each phase (thus enhancing process visibility) and that it fits well

with other engineering process models (which can be useful when the

software project is part of a larger systems engineering project).

3.  Lack of process visibility.

Systems are often poorly structured.

(Also acceptable: special skills (e.g., knowledge of programming languages suitable for rapid development, “people skills”) may be required.)

4.  Process is represented as a spiral rather than a sequence of

activities.

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.

Explicitly incorporates risk assessment and resolution throughout the

process.

Model quadrants are: Objective Setting, Risk Assessment and Reduction,

Development and Validation, and Planning

5.

6. a.

b. start -> T4 -> T6 -> finish

c. T2: 4, T3: 1, T6: 0

7.  Realization in advance; perceiving how a system may affect its

environment before it has been developed.

8.  Domain experts may not communicate such requirements because they are

so obvious (to the experts). Hence, they sometimes remain unspoken as

“implicit” requirements.

9. Several different requirements may be lumped together (amalgamated).

(This can be confusing to readers of a requirements specification.)

10. Ethnography involves (social scientists) observing and analyzing how

people actually work. Focused ethnography combines ethnography with

prototyping. A prototype allows the ethnographic analysis to focus on

issues that may only be relevant when the new system is put into place.

11. Knowing the origin/rationale of a requirement can be very useful in the

context of validating requirements and analyzing change requests. For

example, documenting the process (discussions, arguments, etc.) used to

arrive at a particular requirement can be very useful if such issues

come up in the context of change requests after system delivery.

12. Such methods rely on contracts where the customer pays for the time and

resources required for system development rather than the development

of a system meeting a specific set of requirements. This can result in

problems if disputes arise over who is to blame and who should pay for

the extra time and resources needed to correct problems.

13. a. Refactoring involves updating the code to eliminate structural

degradation brought about by frequent change, improving

understandability, etc. It is undertaken continuously during

development, and results in code that is easier to understand and

maintain.

b. Traditional software design is based on the precept that one should

“design for change” using information hiding techniques. Extreme

programming rejects this on the grounds that designing for change is

often a waste of time since anticipated changes may never

materialize and unanticipated change requests are common.

14. a. Constructor operations: operations which create / modify

entities of the type

Inspection operations: operations which evaluate entities of the

type being specified

b. Define an axiom which sets out what is always true for each

inspection operation over each (primitive) constructor operation.

c. No. Tail is not a primitive operation since it can be defined

using Create and Cons. (This definition is captured in the last

two axioms.) Therefore, axioms are not required for Head and

Length over Tail, as the rule of thumb would normally require.

15. a. Pre-conditions express constraints on program variables before

program execution. An implementer may assume these will hold BEFORE

program execution.

b. Post-conditions express conditions / relationships among program

variables after execution. They capture any obligatory conditions

AFTER program execution.

16. a. pre-condition: N ≥ 1

post-condition:

[(FOUND & There_Exists i, 1 ≤ i ≤ N | J=i & LIST[J]=Key) V

(NOT FOUND & For_Every i, 1 ≤ i ≤ N, LIST[i]≠KEY)] & UNCH(LIST,KEY)

b. FOUND := false

J := 1

While (NOT FOUND and J > N+1) do

If LIST[J]=KEY then

FOUND := true

Else

J := J+1

End_if_else

End_while

c. Suppose the values of LIST are [-3, 2, 5, 17] and the value of KEY

is 5. After execution of the program, the value of FOUND is true

and the value of J is 3; The values of LIST and KEY are [-3, 2, 5,

17] and 5.

17. Inner layers may provide basic facilities, such as file management,

that are required at all levels. Allowing direct access to these

facilities subverts the model. Performance can also be a problem

because of the multiple levels of command interpretation that may be

required.

18. a. Shared data is held in a central database or repository and may be

accessed by all sub-systems. (Data is “global” to all sub-systems.)

b. Advantages:

·  Simple and efficient way to share large amounts of data locally.

·  Sub-systems which use data need not be concerned with how that data is produced, and vice-versa.

·  Management activities such as backup, access control, and recovery are centralized.

·  Sharing model is published as the repository schema so that integration of compatible tools is relatively easy.

Disadvantages:

·  Sub-systems must agree on a single repository data model – this is inevitably a compromise.

·  Data model evolution is difficult and expensive.

·  There is no provision for sub-system-specific data management requirements related to backup, access control, and recovery.

·  It may be difficult to distribute data efficiently over a number of machines due to problems with data redundancy and inconsistency.

19. a. 1 server plus a set of clients

b. Applications are comprised of three layers:

·  Presentation layer – concerned with presenting the results of a computation to system users and with collecting user inputs.

·  Application processing layer – concerned with implementing the logic (functionality) of the application.

·  Data management layer – concerned with all system database operations.

c.

·  Thin-client model – the application logic and data management are implemented on the server; clients only handle the user interface.

·  Fat-client model – the server is only responsible for data management; clients handle the application logic and the user interface.

20. Objects that provide services have IDL skeletons that link their

interface to an implementation. Calling objects have IDL stubs for

every object being called. The calling object binds an IDL stub that

defines the interface of the called object. Calling this stub results

in calls to the ORB which then calls the required object through a

published IDL skeleton that links the interface to the service

implementation.