|
1 | | What is the advantage of defining an operation in the form of a contract? |
| | A) | A contract cannot be broken and thus the software will be more reliable in operation. |
| | B) | A contract encourages encapsulation by concentrating on the service that an object will provide to other objects and by ignoring the way that the service is to be achieved. |
| | C) | A contract encourages better design and testing by specifying exactly how an object will achieve a service that it is to provide to other objects. |
|
|
|
2 | | One of the following would NOT normally be included in a contract. Which one? |
| | A) | The operation signature. |
| | B) | Events that the operation will transmit to other objects. |
| | C) | The object identifiers of other objects to which events will be transmitted. |
|
|
|
3 | | How does an algorithmic technique differ from a non-algorithmic technique? |
| | A) | Algorithmic techniques describe the internal logic of an operation, while non-algorithmic techniques do not. |
| | B) | Algorithmic techniques describe only the external interface of an operation, whereas non-algorithmic techniques also describe the internal details. |
| | C) | Algorithmic techniques are used to describe algorithmically complex operations, while non-algorithmic techniques are used to describe only simple operations. |
|
|
|
4 | | Only one of the following is an algorithmic technique. Which one is it? |
| | A) | Decision table. |
| | B) | Activity diagram. |
| | C) | Pre- and post-condition pair. |
|
|
|
5 | | Only one of the following is a non-algorithmic technique. Which one is it? |
| | A) | Activity diagram. |
| | B) | Structured English. |
| | C) | Decision table. |
|
|
|
6 | | One of the following is NOT a control structure in Structured English. Which one? |
| | A) | GoTo. |
| | B) | Iteration. |
| | C) | Selection. |
|
|
|
7 | | How does pseudo-code differ from Structured English? |
| | A) | The syntax and vocabulary of Structured English resemble those of a specific programming language, while pseudo-code is language-neutral. |
| | B) | The syntax and vocabulary of pseudo-code resemble those of a specific programming language, while Structured English is language-neutral. |
| | C) | Pseudo-code is useful only for procedural programming languages, such as C, while Structured English is useful for any programming language, including object-oriented languages. |
|
|
|
8 | |
Which is the best description of the meaning of the following example of Structured English? do while there are more adverts for campaign get next advert get cost for this advert add to cumulative cost for campaign end do set total advert cost = final cumulative cost set total campaign cost = total advert cost x overhead rate get campaign budget if total campaign cost > campaign budget generate warningendif |
| | A) | Get all the advert costs and apply the overhead rate to each in turn, then work out the total cost of the campaign by adding these together, compare to the campaign budget and produce a warning if the budget has been exceeded. |
| | B) | For each advert in turn, get the cost, apply the overhead rate, compare to the budget and produce a warning if the budget has been exceeded, then do the same for the next advert. |
| | C) | Work out the total cost of the campaign by accumulating the cost of each advert in turn, apply the overhead rate to the total, compare this to the campaign budget and produce a warning if the budget has been exceeded. |
|
|
|
9 | | Which of the following best describes the main use of OCL? |
| | A) | OCL is used to describe in more detail the interaction between objects than is shown graphically in an interaction sequence diagram. |
| | B) | OCL is used specifically to document operation specifications. |
| | C) | OCL is used to give precise definition to any constraints in a UML model that cannot be expressed clearly and unambiguously in a graphical notation. |
|
|
|
10 | | What do OCL statements generally contain? |
| | A) | A context, a property of the context and an operation on that property. |
| | B) | Sequence, selection and iteration structures. |
| | C) | Operation intent, operation signature and logic description. |
|
|