1
UTAS KIT 506 software design and development
Tutor: Mia + NAME : Mia
Class: 14/08/2020
Student:
Week4-week5
Assignment 1
OO Design Model
Page 0 of 21
Assignment 1
作业要求
关于 database, package
CRA
Page 1 of 21
Page 2 of 21
Package
相当于文件夹,包没有父子级关系
包 类
对 class 进行分类
方便管理
方便后期的维护
Class
一组相似对象的统称
Concert,musician,work
类与类之间的关系,泛化,聚合···
Musician, jazz, string
Page 3 of 21
Sequence diagram
A Sequence diagram is a form of Interaction diagram, is used to display the interaction
between users, screens, objects and entities within the system. It provides a sequential map
of messages passing between objects over time. These diagrams are placed under Use Cases
in the model to illustrate the Use Case scenario – how a user will interact with the system
and what happens internally to get the work done.
The user may not do much but the system will do many things to retrieve
and present the necessary information.
发动汽车, user-插入钥匙,打火。其他的动作都是汽车做的
Page 4 of 21
Assignment
Use Case #: UC8_User_views_StaffList
Requirement:
The user shall be able to view an interactive list of staff employed by the School.
Overview:
The users can get access to the Stafflist by selecting a tab labelled ‘staff’,which is
visible when application first loads. This list should display names in the format ‘Family Name,
Given Name (Title)’, as in ‘Einstein, Albert (Dr)’, ordered alphabetically by family name and
then given name.This list should be ideally visually compact.The Staff List view should be able
to filter the listed staff based on their category.The user should be able to list all staff,
academic, technical, administrative, and casual.If implementing partial name matching then
the list contents would be restricted to show only those staff whose given name or family
name contains the text entered by the user.
Preconditions:
1.HRIS database exists and is populated with data
Scenario:
Page 5 of 21
Action Software Reaction
1. User starts application 1.1 MainView created and system create
StaffListView
1.2 Initial Staff Data
1.3 Request the staff information from Database
include Name,campus,phone number,room
location,email address,photo,consultation hours,
involved unit
1.4 System retrieves the staff information from
database and the staff list are sorted
alphabetically by family name then given name
1.5 update the StaffListView
2. Users select an category from a dropdown list
of categories
2.1 System updates current set of filters with the
Selected category, and System creates temporary
list of staff based on current set of filter
2.2.System refreshes the StaffListView with
the filtered list
3. User modifies text in filter-by-name text field
and press the enter key
3.1.System updates current set of filter to
include given text or, if search text is
blank,removes any existing text from sets of
filters.Then creates temporary list of staff based
on current set of filters (name).
3.2.System refreshes the StafflistView with the
filtered list
4.Users selects staff in list 4.1 See UC16_User_selects_StaffDetails
Scenario Notes:
Actions 1 is a precondition for all others. The other actions may occur in any
order, the Action 3 requires the user pressing enter to trigger name-based filtering. The
reaction to Actions 2 and 3 produces the intersection of the two filters.
Post Conditions
StaffListView displays all or a subset (particular category or with matching names) of staff
names
Required Views: (GUIs)
Page 6 of 21
MainView,StaffListView
Exceptions:
1. If the database is inaccessible or another unexpected error occurs then the system should
respond with a message to this effect, requesting that the user close and restart the
software. (In a later release the system should be made robust to such exceptions and be
able to reload the database without being restarted.)
Use Cases utilised
UC16_User_selects_StaffDetails
Use Case #16: User_selects_StaffDetails
Requirement:
When the users selects a name in the list the system will show more details about the staff
member (referred to as the Staff Details view), which should include: Name; Campus; Phone
Number; Room Location; Email Address; Photo; Consultation hours; Table of units he or she
is involved with in the current semester.
Overview:
if selecting a unit code in the table of units takes the user to the timetable view , in which
each staff member’s current availability to be displayed: ‘teaching’ (with details of the unit
code and room) if they are in a timetabled class; ‘consulting’ if it is during their consultation
times; ‘free’ otherwise.
Preconditions:
1. HRIS database exists and is populated with data
2. StaffListView is visible
Scenario:
Action Software Reaction
1. User selects staff name in StafflistView 1.1 System create a StaffDetailView
1.2 System request the staff detail information
1.3 System retrieves from the database any
additional details about the staff, including
Campus;Phone Number;Room Location;Email
Address;Photo;Consultation hours; Table of units
involved unit
1.4 system create a temporary collection
information of the selected staff
1.5 Refresh StaffDetailView
Page 7 of 21
2. Users select a unit code 2.1.System create TimeTableview and See
UC24_User_selects_Unit
3.Users click on ‘ActivityGrid’ button 3.1.See UC19_User_shows_ActivityGrid
Scenario Notes:
Action 1 must occur before Actions 2 &3
Post Conditions
StaffDetailView displays details of selected staff and displays the current availability of the
selected staff
Required Views: (GUIs)
MainView
StafflistView
StaffDetailView
Exceptions:
1.If the database is inaccessible or another unexpected error occurs then the system
should respond with a message to this effect, requesting that the user close and restart
the software. (In a later release the system should be made robust to such exceptions
and be able to reload the database without being restarted.)
Use Cases utilised
UC8_User_views_StaffList (precondition)
UC24_User_selects_Unit
UC19_User_shows_ActivityGrid
Use Case19 :User_shows_ActivityGrid
Requirement:
The user shall be able to load the activity grid, in which staff member’s activity (classes and
consultation times) across a week could be displayed in a colour-coded grid.
Overview:
The use loads a color-coded grid through a button on the Staff Detail view. This grid should be
toggled (displayed or hidden) via a button on the Staff Detail view. The grid should have days of the
week (Monday through Friday) as columns and hours of the day (9am until 4pm) as rows, with each
cell’s colour indicating the kind of activity at that time, but no other details shown. Free time should
be shown in white, while teaching and consultation times should be shaded in distinct colours that
are distinguishable by those with common forms of colour blindness.
Page 8 of 21
Preconditions:
1. HRIS database exists and is populated with data
2. StaffListView is visible
3.StaffDetailsView is visible
Scenario:
Action Software Reaction
1.User selects the ‘’AcitivityGrid’’ button and
click(displayed)
1.1 The ‘’AcitivityGrid’’ button toggled and system
create AcitvityGridView, split lines into separate
cell contents and load into spreadsheet model.
1.2 System request the activity information from
the temporary collection activity information of
selected staff
1.3.Retrieve in database about the activities
information including classes and consultation
times
1.4 system put the activities information in
temporary collection of activity information
1.5. update the ActivityGridView
2. User selects the “AcitivityGrid’’ button and
click(hidden)
2.1. Systems makes ActivityGrid invisible.
Scenario Notes:
Action1 based on preconditions, AcitivityGrid View must be hidden. In Action2, user clicks
AcitivityGrid View on staffDetailView, so StaffDetailView must be ready.
Post Conditions
Activity Grid View present all classes and consultations of current staff who were showed in
Staff Detail View currently. Activities of classes in week table which for staff classes time present in
shaded black colour cell; activities of consultation present in shaded purple colour cell; others will be
present in white.
Required Views: (GUIs)
StafflistView (precondition)
StaffDetailView (precondition)
AcitivityGridView
Page 9 of 21
Exceptions:
1. If the database is inaccessible or another unexpected error occurs then the system
should respond with a message to this effect, requesting that the user close and restart
the software. (In a later release the system should be made robust to such exceptions
and be able to reload the database without being restarted.)
2. If no information about the activities, the AcitivityGrid will show as blank
Use Cases utilised
UC16_User_selects_StaffDetails
UC8_User_views_StaffList
Use Case #23: User_views_UnitList
Requirement:
The system should be able to generate a list of the units under the control of the School,
ordered alphanumerically.
Overview:
In the MainView of start up frame, the users should able to view a list of unit
Preconditions:
1.HRIS database exists and is populated with data
Scenario:
Action Software Reaction
1. Users start up the application and select a unit 1.1 MainView created and system create
UnitListView
1.2 System request the Unit information from
temporary collection of Units
1.3.retrieves information about list of unit from
database
1.4 system store the unit information in a
temporary collection.
1.5.update the list of unit and display in ordered
alphanumerically.
2.User select a unit and click 2.1.See UC24_User_select_Unit
Scenario Notes:
Action 2 can only be access by done by Action1
Post Conditions
Display the list of unit
Required Views: (GUIs)
Page 10 of 21
MainView ,
UnitListView
Exceptions:
1. If the database is inaccessible or another unexpected error occurs then the system should
respond with a message to this effect, requesting that the user close and restart the
software. (In a later release the system should be made robust to such exceptions and be
able to reload the database without being restarted.)
2. roll to the end of the list, there will cause no more reaction from program
Use Cases utilised
UC24_User_select_Unit
Use Case #24: User_selects_Unit
Requirement:
Selecting a unit from this list should bring up a list of classes for that unit, ordered
chronologically.
Overview:
After a unit selected, a list of classes would present and in chronological order.Its view
should be tabular, showing the following information about the selected unit in each
column: day; start and end time in 24-hour format, such as‘12:00–14:00’ or‘12:00
–13:50’; type (Lecture, Tutorial, Practical, Workshop); room location; campus; staff
member.The user will be able to filter the timetable so that it displays information for a
single campus.It is possible to go from a timetable entry to the Staff Detail view for the
relevant staff member, just as if selecting that person in the Staff List.
Preconditions:
UnitListView is open
Scenario:
Action Software Reaction
1. User select a unit and click 1.1 System create a TimetableView in
tabular,spread the day, type,room
location ,campus,staff member in column
1.2 System request the class information from
temporary collection of class information.
1.3 System retrieves information about class in
this unit from database
1.4 System put class information in temporary
collection of class information
1.5 update the TimeTableView
Page 11 of 21
2. User select a staff and click 2.1.See UC16_user_selects_StaffDetails
3.Users select an campus from a dropdown list
of filter
1.Filter the unit information for select campus
2.update TimetableView
Scenario Notes:
Action 2 and Action 3 only can be done after completion of Action1, Action 2 and Action 3
could be done interactively
Post Conditions
The Unislist is displayed
Required Views: (GUIs)
MainView
UnitListView
TimetableView
StaffDetailview
Exceptions:
1. If the database is inaccessible or another unexpected error occurs then the system should
respond with a message to this effect, requesting that the user close and restart the
software. (In a later release the system should be made robust to such exceptions and be
able to reload the database without being restarted.)
2. No unit timetable information would show blank
3.No staff detail when chose a staff member would show no information
Use Cases utilised
UC23_User_view_UnitList(precondition)
UC16_user_selects_StaffDetails
Use Case #28:User_generates_HeatMap
Requirement:
The application could generate ‘heat maps’ of activity across the week.
Overview:
It could generate two different heat maps, one for unit classes and another for
consultation times. It should possible to generate the all ICT discipline classes and those only
occurring Hobart or Launceston.All this maps can be accessed via a menu or buttons on a
dedicated tab.Each heat map will be displayed as a grid of coloured cells, with columns for
each day of the work week (Monday through Friday) and rows for the starting hours 9am
through 4pm.Each cell in which zero activities occur should be blank, while cells representing
one or more activities should contain the number of co-occurring activities.The shading of
each cell should indicate the number of events occurring at that time, with white indicating
no events and a solid colour indicating the greatest number of events within the set of events
Page 12 of 21
being displayed.Intermediate values should be assigned a colour intermediate between white
and the selected solid colour.Primary colour of the heat map can be chose by Users.
Preconditions:
1.HRIS database exists and is populated with data
Scenario:
Action Software Reaction
1. User click the button “Show HeatMap” 1.1 HeatmapView created,with columns for each
day of the work week (Monday through Friday)
and rows for the starting hours 9am through 4pm.
1.2 request for the information in collection of
class
1.3 System retrieve all class and consultation
information in database
1.4 System create a temporary collection of class
information
1.5.update HeatmapView
2.Users select an type of heatmap from a
dropdown list of unit class or consultation
2.1 System filter out the selected type of classes
.Get the maximum number of co-occurring
activities, using this value as a parameter to
setting the color to each period,others’ color
value between while and this value.Also display
the numbers of co-occurring and class information
in each time period
2.2.refresh the HeatMapView
3.Users select an campus from a dropdown list
of campuses
3.1.System filter out all the classes in the selected
campus,if not choose, no reaction.Get the
maximum number of co-occurring activities, using
this value as a parameter to setting the color to
each period,others’ color value between while
and this value.Also display the numbers of
co-occurring and class information in each time
period
3.2.refresh the HeatMapView
4.User click on the dropdown menu to choose a
color as primary colour
4.1 System get the color as the solid color,apply
this color into period of max number of
co-occurring activities,the color of other period of
Page 13 of 21
numbers of co-occurring activities using the
number as parameter , which in the certain ration
between white and solid color.Then refresh the
HeatMapView
Scenario Notes:
Action 1 is the step need to be done with other actions, and the other
actions could be done interactively.
Post Conditions
Heat maps view created and certain condition could be apply to filter, the primary color
can also be identify by users.
Required Views: (GUIs)
Mainview,HeatMapsview
Exceptions:
1. If the database is inaccessible or another unexpected error occurs then the system should
respond with a message to this effect, requesting that the user close and restart the
software. (In a later release the system should be made robust to such exceptions and be
able to reload the database without being restarted.)
Use Cases utilised
UC#23_User_View_UnitList
Use Case #37: User_generates_ClashMap
Requirement:
It could generate a variant of the heat map that shows clashes between a unit’s classes
and the consultation time of staff involved in teaching that unit.
Overview:
This user case could be accessed via a button on the Unit Timetable view, and
use
data for the currently displayed classes and staff who teach them (that is, both campuses,
Hobart only or Launceston only).The cells in the grid should use the following colour
scheme: white if no class or staff consultation occurs on that hour and day; bright green if
that time contains either a class or consultation, but not both; and red if it contains both
consultation and a class.Cells representing clashes should also include the text ‘clash’.
Preconditions:
1. UnitList is open
2. A unit is selected
3. A TimeTableView is visible
Page 14 of 21
Scenario:
Action Software Reaction
1. User click on “ClashMaps” button 1.1 ClashMaps Created,button toggled
1.2 get the collection of class information relating
to current unit staff and class information.
1.3 System retrieve the current unit staff and
class information.
1.4 system create a temporary collection of class
information relating to current unit staff and
class information.
1.5.Display the class information ,staff
information(location information). Using white as
no class or staff consultation occurs on that hour
and day.If time only contain one type of class,
using bright green.If contain both of them , using
red and display the “clash”,update this
information to in ClashMapsView
Scenario Notes:
The repeat of Action 1 would cause the open and close of clash map
Post Conditions
Generate a clash maps with no more than three color, with class ,staff information
Required Views: (GUIs)
UnitlistView(precondition)
TimetableView(precondition)
ClashMapView
Exceptions:
2. If the database is inaccessible or another unexpected error occurs then the system
should respond with a message to this effect, requesting that the user close and restart
the software. (In a later release the system should be made robust to such exceptions and
be able to reload the database without being restarted.)
Use Cases utilised
UC23_User_view_UnitList
UC24_User_select_Unit
Page 15 of 21
Page 16 of 21
Page 17 of 21
Page 18 of 21
Package
Class diagram
Model
View
Page 19 of 21
Controller
Database
Page 20 of 21
Sequence diagram
Page 21 of 21