Homework Assignment #2
Software Engineering 520/620
1. Find 2-3 examples around campus that are similar to
the ÒMust wear shoesÓ and ÒDogs must be carriedÓ specifications of Michael
Jackson.
2. Discuss the following (with examples where
appropriate):
a. ÒdeclarativeÓ vs. imperativeÓ specifications
b. Òoperational (model-oriented)Ó vs. Òdescriptive
(property-oriented)Ó specifications
c. ÒoptativeÓ vs. ÒindicativeÓ mood
d. distinction between function, behavior and
communication
3. You are asked to design a control system for traffic
signal and Òwalk/donÕt-walkÓ signals at a standard 4-way intersection. Assume:
á
the traffic signal
lights don't change unless tripped by a car reaching the intersection in a
direction with a red light (drives by sensor) or by a pedestrian (pushes ÒwalkÓ
button) attempting to cross in a direction with a green traffic signal light
á
the traffic signal
lights won't change in less than 30 seconds following an earlier complete
change
á
when tripped, a traffic
signal light changes from green to yellow, pauses 10 seconds, and changes from
yellow to red
á
the ÒdonÕt-walkÓ
signals change only when a pedestrian pushes the walk button, i.e.,
ÒdonÕt-walkÓ signals remain on in all directions unless a pedestrian pushes the
ÒwalkÓ button, and do not change if an automobile trips the lights
á
if a pedestrian pushes
the button to change the Òwalk/donÕt walkÓ signal when there is already a red
traffic light for that crossing, then the traffic signals remain unchanged..
á
the walk signal remains
on for 30 seconds.
a.
Identify the ÒactorsÓ
and develop a ÒUse-CaseÓ analysis for the traffic lights.
b.
Develop either [520]/both [620] a FSM or/and a Petri net specification for a
traffic light. State any other assumptions you make clearly, e.g. how are you going to handle time (clock,
guards, etc.)
4. For the additional requirements for University
Enrollment [Maciaszek Ð pp151-52] and attached below, extend the use case
model of Figure 4.9 (Example 4.12) to include the extended requirements. [Maciaszek Ð Chapt.4-E5].
5. Extend the Sequence Diagram of Figure 4.14 (Example
4.17) to include the checking of prerequisites Ð a student will only be added
to the course if he/she passed the prerequisite courses. [Maciaszek Ð Chapt.4-E7].
Additional
Requirements for the University Enrollment System
1) The University is
organized into Divisions. The Divisions divide into
Departments.
Academics work for a single Department.
2) Most degrees are
managed by one Division, but some are managed jointly
by two or more divisions.
3) New students
receive their acceptance form and enrolment instructions by
mail. Continuing
students, who are eligible to re-enroll, receive (also by mail)
enrolment
instructions together with the notification of their examination
results.
4) Enrolment
instructions include the class timetable for the course offerings.
5) During the
enrolment, the students may consult an academic adviser in their
Division of
registration on the formulation of a program of study.
6) Students are not
restricted to studying only courses offered by their Division
of registration and
may at any time change their Division of registration (by
completing a change
of program form available from the Student Office).
7) To take certain
courses, a student must first pass the prerequisite courses
with the required
grade (i.e. a straight pass may not be sufficient). A student
who has not passed a
course satisfactorily may attempt to do the same
course again. Special
approvals by the delegate of the Head of the relevant
Division are needed
to enroll in a course for the third time or when
requesting waivers of
prerequisites.
8) Students are
classified as part-time if they are enrolled for the year in course
offerings carrying a
combined total of fewer than 18 credit points.
9) A special
permission needs to be obtained to enroll in a program of course
offerings carrying a
combined total of more than 14 credit points in a given
semester.
10) Each course has
one academic in charge of the course, but additional
academics may be
involved as well. There may be a different academic in
charge of a course
each semester and there may be different academics for
each course each
semester.