Bct2313:Formal Software Specifications Question Paper
Bct2313:Formal Software Specifications
Course:Computer Technology
Institution: Meru University Of Science And Technology question papers
Exam Year:2010
QUESTION ONE – 30 MARKS
(a) Briefly define the following terms: (8Marks)
(i) Software specification
(ii) Formal methods
(iii) Non functional requirements
(iv) Software quality
(b) Briefly outline any 3 reasons for the use of formal methods in Software specification phase.
(3Marks)
(c) Explain the term Design by Contract (DBC) and state any two advantages of using it in software
development. (6Marks)
(d) Discuss any two main elements of VDM specification method and state it applicability in software
development. (4Marks)
(e) Discuss elements of Z specification language. Explain any 3 features which make it suitable for
software specification. (6Marks)
(f) What is a design pattern? State any two qualities associated with a design pattern. (3Marks)
2
QUESTION TWO –20 MARKS
(a) State content of software requirement specification document (SRS) according to any specification
standard. (6Marks)
(b) Give a complete Z specification document of a simple bank database, described as follows:
You may assume that you are given a type CUSTOMER. A customer may have only one account
and the database record only the balance (kn kshs) currently held in that account.
The following operations may be performed on the database:
(i) Open an account for a new customer,
(ii) Make a deposit in a customer’s account,
(iii) Make a withdrawal from a customer’s account
(iv) Output the current balance for a given customer.
This bank is very strict: no customer is allowed to have a negative balance. Your specification
should take account of this restriction. Appropriate use should be made of the structuring facilities
provided by Z. (14Marks)
QUESTION THREE – 20MARKS
(a) Discuss any two limitations of Z specification language. Briefly outline how DBC (Design By
Contract) method addresses the short comings. (6Marks)
(b) A home-heating system consists of a furnace, a thermostat, and a fan for blowing air. Temperature
control is distributed so that every room has a controller to maintain its temperature. The
thermostat registers and monitors the room temperature.
Let tr the desired temperature.
When the temperature in a room goes below tr – 2, the furnace is turned on.
When the temperature in the furnace reached certain limit T, the furnace is shut off and the fan
starts blowing the hot air.
When the room temperature reaches tr + 2, the furnace is shut off. The fan runs until the furnace
temperature falls to T-5.
Assume that tr + 2>=T.
Give a state chart specification for the system. (14Marks)
3
QUESTION FOUR – 20MARKS
(a) State any three myths of specification methods. Clearly critique each from your own understanding
of formal methods. (6Marks)
(b) Develop a complete software requirement specification document for library information system.
(14Marks)
QUESTION FIVE – 20MARKS
(a) Discuss user characteristics that should be considered while gathering requirements. (4Marks)
(b) Discuss pre condition and post condition as used in VDM specification. (4Marks)
(c) What steps can be taken during the implementation of a software system to help ensure its eventual
correctness? (4Marks)
(d) Give reasons why formal methods have not been in massive use in software development. Discuss
what could be done to change the situation. (8Marks)
More Question Papers