tutor knows what to do. Due February 19.
Assignment 2 – Software Requirements and Modeling
CSE3310-003
Fall 2023
Rev A 9/4/2023
This assignment requires you to write a software specification for an automobile cruise control. The
specification must include the following:
1. An introduction containing a concise description of the problem along with a context diagram.
(two or three paragraphs of text, maximum)
2. A state diagram showing the dynamic behavior of the cruise control system.
The state diagram can contain only the following elements:
•
•
•
•
•
Power On
Power Off (optional)
Transitions (caused by an event or a timer expiration)
On entry actions
On exit actions
No “triggers” or “guard conditions” allowed.
Free programs are available for creating this diagram.
• https://uml.sourceforge.io/
• https://plantuml.com
• Dia, available on most linux distributions. (“sudo apt-get install dia”)
3. Requirements, recorded in English language sentences, that describe the operation of the
system. (A good start would be one requirement for every on_entry and on_exit activity in the
diagram)
4. A static model (class diagram).
5. Assumptions and Ambiguities. List any issues encountered with missing or contradictory
information and how they were resolved.
This specification can be a single document or can be a collection of files suitably named. The state
diagram can be hand drawn or can use one of many freely available drawing tools. The exact modeling
elements do not have to match those shown in the textbook (e.g., ‘Dia’ draws states as boxes, where
they are generally shown as ovals. This is acceptable)
This system has the concept of a comparator that can create events. The desired speed is stored in one
of the inputs to the comparator. This speed is then compared to the vehicle’s actual speed, and if they
do not match, either a SpeedGreaterThanDesired or a SpeedLessThanDesired event is generated.
You can assume that the vehicle responds instantaneously to commands to increase or decrease
speed. This is not true in the real world, but simplification will not detract from the value of the model.
The CruiseControl system interacts with the EngineControl system to request changes to the vehicles’
speed. The “stalk switch” and the “dash indicator” are considered part of the CruiseControl system, as is
the comparator that can create events.
Below is a video explaining the operation of the CruiseControl system.
Toyota Camry – Cruise Control Explanation & Demonstration
Outputs:
•
•
•
IncreaseSpeed. When true, the automobile increases its speed.
HoldSpeed. When true, the automobile holds its speed.
DecreaseSpeed. When true, the automobile decreases its speed.
Note IncreaseSpeed, HoldSpeed, and DecreaseSpeed are mutually exclusive. None can be active, but if
one is active the other 2 must be inactive.
•
•
DesiredSpeed. This is an integer between 30 and 120, representing the system’s desired speed
in Miles Per Hour. DesiredSpeed is one of the inputs to the comparator that creates the
SpeedGreaterThanDesired and SpeedLessThanDesired event. The other input to the comparator
is the vehicle’s actual speed.
Indicator on dash. (consider this as a Boolean value)
Inputs:
•
ONOFF
•
•
•
•
•
+RES
-SET
CANCEL
SpeedGreaterThanDesired
SpeedLessThanDesired
All inputs are considered events.