CE202 software Engineering Course 1
Requirements
Functional requirements
Consider the following set of functional requirements:
No. Requirement
FR1 An intersection consists of a meeting of three or four roads.
Vehicle traffic may or may not be allowed in principle to flow from each road to
FR2
another.
If a flow of vehicle traffic from road A to road B is allowed in principle, a vehicle
FR3
traffic light should control the flow.
FR4 Each road may have up to one pedestrian traffic crossing.
At any point in time each pedestrian traffic light is in either one of the following
FR5
states: green or red.
At any point in time each vehicle traffic light is in either one of the following
FR6
states: green, amber, red or red-amber.
Each traffic light may receive only one of the following signals from the
FR7
intersection: Open or Close.
A vehicle traffic light that is red and received an Open signal should become red-
FR8 amber and a second later green; if green and receives a Close signal then it should change into amber and a second later to Red.
A pedestrian traffic light that is green and received a Close signal from the
FR9 intersection should change into red. If Red and received an Open signal it should change to green.
Non-Functional requirements
Consider the following set of non-functional requirements:
No. Requirement
The system should be implemented in Java. (Please seek permission in advance if you wish to use some other programming language.)
NR1
Questions
Question 1: Requirements specification
Decide on a sample intersection. Extend the above list of requirements to refine the information given above and ensure that the requirements are complete, clear, precise, consistent, and unambiguous. In particular, your revised list of requirements must answer the following questions:
- How many roads intersect?
- Between which roads vehicle traffic is allowed in principle? (Your answer must be realistic)
- Which roads are crossed by pedestrian traffic? (At least one)
Use precise terms adhering to the same vocabulary as the requirements sketched above.
Question 2: Use-case diagram
Perform use-case analysis and draw a use-case diagram that captures the results of a usecase analysis of the requirements in the most accurate and complete way.
Use requirements numbers (FR1, FR2, ...) to indicate which requirements are captured in full by your diagram. If a requirement is only partially captured by your diagram, explain which part of the requirement exactly. If your diagram imposes additional requirements that were not listed earlier, explain what exactly are these requirements, why are they not part of your list of requirements, and why would you like to impose these additional requirements.
Question 3: CRC cards
Use the Class-Responsibility-Collaborations technique to clarify the responsibilites and collaborations between three classes in the object-oriented analysis of the problem above.
Question 4: Type diagram
Perform object-oriented analysis and draw a type diagram that captures to the most accurate and complete way the requirements.
Use requirements numbers (FR1, FR2, ...) to indicate which requirements are captured in full by your diagram. If a requirement is only partially captured by your diagram, explain which part of the requirement exactly. If your diagram imposes additional requirements that were not listed earlier, explain what exactly are these requirements, why are they not part of your list of requirements, and why would you like to impose these additional requirements.
Question 5: Interaction diagram
The word configuration stands for a a list of all the traffic lights and the state of each i.e., red or green or otherwise.
Describes in words (one paragraph) to the most accurate and complete way the sequence of events in a scenario of changing configuration in the sample intersection you chose. Be specific in describing—
- Which traffic lights are green, red or amber before the change
- Which traffic lights are green, red or amber after the change
- In which order lights change and how
Use either a collaboration or a sequence diagram to model the objects and messages involved in this scenario in the most accurate and complete way. Clearly indicate the ordering of the messages exchanged, the name and class of each object, and when each is created or destroyed during this sequence of events (if at all) and when.
Use requirements numbers (FR1, FR2, ...) to indicate which requirements are captured in full by your interaction diagram. If a requirement is only partially captured by your diagram, explain which part of the requirement exactly. If your diagram imposes additional requirements that were not listed earlier, explain what exactly are these requirements, why are they not part of your list of requirements, and why would you like to impose these additional requirements.
Assignment no. 1 Question 1
This intersection allows in principle 6 flow paths governed by 6 traffic lights as follows:
- Traffic light TL21 controls the flow of vehicle traffic from A2 to A1
- Traffic light TL23 controls the flow of vehicle traffic from A2 to A3
- Traffic light TL12 controls the flow of vehicle traffic from A1 to A2