Upload
hathuy
View
217
Download
2
Embed Size (px)
Citation preview
1
CMPSC 487W – Software Engineering and Design Group Assignment #4
Fall 2017
Due Date: Wednesday, December 6, 2017
Total Points: 100
Description:
The first three steps of developing a software product in ICONIX process are creating the domain model, use cases, and robustness diagrams. The next step is building sequence diagrams from use cases and robustness diagrams.
Assignment:
Draw sequence and class diagrams from robustness diagrams in last 6 pages. This assignment is the extension of the assignment 3. You should submit sequence diagrams and class diagrams in this assignment. You can find a sample sequence and class diagrams in pages 4-10 that show some of the requirements for this assignment, which are captured from the Rosenberg’s book. Aware that the sample diagrams are not perfect. (The book intentionally provides diagrams having error(s), to fix them later.)
In this assignment, reference the flow of sequence highlighted in light blue color (to help to draw sequence diagram), but you do not need to fully follow that sequence. You should copy the entity/domain and boundary objects in the robustness diagrams and paste them into your class and sequence diagrams. You do not need to show all domain and boundary objects. If you need, add extra classes into the class and sequence diagrams.
The following shows the basic rubrics for sequence and class diagrams. Additional rubrics can be added when grading. It does not include the points that sum up 100 since it is hard to build complete rubrics to catch your mistakes before looking at your assignments. Reference the text book for more detailed patterns for drawing the sequence diagram in ICONIX style.
• Add the use case text at the left side of the sequence diagram; • Use all actors, entity/domain objects, and boundary objects in robustness diagrams if possible; • Map use case text to the message on the sequence diagram (see power-point slide 16); • Do not use Focus of control (see power-point slide 17); • Draw messages on sequence diagram (use a form of calling functions, not use plane text),
add operations to classes in class diagram, cross check sequence diagrams and class diagram, and make sure that all messages in sequence diagrams appear in class diagrams;
• Assign operations to the right classes; o For example, in power-point slide 20, operation checkPriceIsInRange() should be in the
ExternalBook class, not in the AddExternalBookPage class, since the domain object has the responsibility to check it and you should focus on operations on domain objects, rather than boundary objects.
2
o Additionally, in power-point slide 10, operation display() below isUserLoggedIn should be assigned to the WriteReviewPage boundary class not to the CustomerReview domain/entity class.
• Convert controllers into messages/operations; however, if you have to convert controllers into classes, add the controller class into class diagram and use controller symbols in sequence diagram (see the right image);
• Use comment to invoke a use case (see the right image); • Use red (or similar) color for handling exception or alternate cases; • Add multiplicity to the class diagram (see power-point slide 14); • Add member variables and member functions to the classes in class diagram (see page 213
in book, or power-point slide 12); • Cover all use case texts in the sequence diagram, including both base and alternate cases.
Update use case text to make it consistent with your sequence diagram.
Note that your sequence diagram should have enough details to write a code without ambiguity. In this assignment, I will check how the sequence/logic of calling functions achieves the goal of each use case. When calling functions, use parameter passing and return values as if you write a code. Draw the OO version and abstract version of sequence diagram; do not include details that requires technical architectures such as ASP, JSP, Http Session classes, Servlet classes, Dao classes, etc.
You can update use case texts. Follow the below rules when updating use case texts:
• Write your use cases in active voice; • Write your use case using an event/response flow; • Write your use case in the context of the object model; • Write your use case using a noun-verb-noun sentence structure; • Make sure you have all the alternate courses; • Check that the use case text isn’t too abstract.
What to hand in:
Submit hardcopies of cover sheet, discussion, class diagrams, and sequence diagrams in a folder at the beginning of class of the due date.
• Cover sheet: The cover sheet should show group member names. • Discussion page: The group leader should write a discussion page that especially includes who
did what. • Class diagram: In this assignment, group leader has a task to draw class diagram. Note that the
class diagram should be composed of all classes that appear in sequence diagrams, and each class should have member variable and all operations used in sequence diagrams. Additionally, in the class diagram, the relationships between classes should show multiplicity.
• Sequence diagram: Each group member except group leader selects one of the robustness diagrams shown in the last 6 pages of this assignment, and draws its sequence diagram. Each sequence diagram should be drawn in individual page that contains its author on top of the page. In the sequence diagram, its corresponding use case text should be presented as a comment as sown in power-point slides 4. Following 7 pages shows the sample class and sequence diagrams captured from Figures in Rosenberg’s book.
Last 9 pages in this assignment show the robustness diagrams.
3
Note 1: Follow the red parts in this assignment. Those red parts and rules (for sequence diagram and use case modeling) will be the part of rubric. Additional rules can be added.
Note 2: You may find partially incorrect/inaccurate descriptions in use case texts or robustness diagram, or you may need more detailed descriptions in the use case text to disambiguates sequence diagram. Aware that this situation is considered in ICONIX process, and correcting them in sequence diagram is a part of ICONIX process. Update use case texts if you need.
CHAPTER 8 ■ SEQUENCE DIAGRAMS 213
Figure 8-14. Prefactored Internet Bookstore static model, still pure OO
«boundary»
BookDetailScreen«boundary»
WriteReviewScreen
+ display() : void+ showValidationErrors(List) : void
«entity»
CustomerReview
- rating: int
- reviewText: String
+ setRating(int) : void+ setReviewText(String) : void+ validate(List) : void
«boundary»
ConfirmationScreen
«entity»
CustomerSession
+ isUserLoggedIn() : boolean
«entity»
PendingReviewsQueue
+ add(CustomerReview) : void
«boundary»
LoginScreen
«boundary»
View
+ display() : void
Overriding display()method to showvalidation errors.
«entity»
BookCollection
«boundary»
HomePage
«entity»
Book
- synopsis: String- title: String
CHAPTER 9 ■ CRITICAL DESIGN REVIEW 249
Figure 9-6. Command class for WriteCustomerReviewController, after prefactoring and withmultiplicity added in for good measure
WriteCustomerReviewController
+ doSubmitAction(CustomerReview) : void+ formBackingObject(HttpServletRequest) : CustomerReview
CustomerReview
+ book: Book+ customer: Customer+ id: int+ rating: int+ review: String
Book
+ id: int+ synopsis: String+ title: String
Customer
+ email: String+ firstName: String+ id: int+ lastName: String
1
0..*
1
0..*
CHAPTER 8 ■ SEQUENCE DIAGRAMS 207
Figure 8-10. Building a sequence diagram, beginning of step 4 (pure OO version of the completedsequence diagram)
CHAPTER 8 ■ SEQUENCE DIAGRAMS 209
Figure 8-11. Building a sequence diagram, completing step 4 (the completed sequence diagram)
CHAPTER 8 ■ SEQUENCE DIAGRAMS 223
Figure 8-22. The corrected sequence diagram excerpt for Exercise 8-1
SellerAdd External Booksto Catalog:
BASIC COURSE:The system displaysthe Add ExternalBook page. The Sellertypes in the ExternalBook details (title,ISBN, price etc) andclicks the Add Bookbutton.
The system checksthat each field has avalue, and that theprice is numeric, isn'ta negative value or >$1,000.
The system alsochecks that there's amatching ISBN in theBookstore database.
The system thencreates the ExternalBook in thedatabase.
. . .
Add ExternalBook page
ExternalBook
BookstoreDatabase
display
click AddBook button
checkFieldsHaveValues
checkPriceIsNumeric
book= create
validate
checkPriceIsInRange
doesISBNExist
save
save(this)
CHAPTER 8 ■ SEQUENCE DIAGRAMS 225
Figure 8-24. The corrected sequence diagram excerpt for Exercise 8-2
CHAPTER 8 ■ SEQUENCE DIAGRAMS228
Figure 8-26. The corrected sequence diagram excerpt for Exercise 8-3
From the Checkout
page, the user clicks on
Edit Shopping Cart.
The system displays
the Edit Shopping Cart
page.
The user clicks on a
Line Item in the list of
items in his Shopping
Cart, then modifies the
quantity of the Line
Item, and clicks
Update.
The system checks that
the quantities entered
are valid, and redisplays
the Edit Shopping Cart
page with the totals
updated and a
confirmation message.
. . .
User Edit Shopping
Cart page
Shopping Cart
Line Item
Customer
Session
Customer
Account
click link
displayPage
customer= getCustomerAccount
cart= getShoppingCart
lineItems= fetchList
{for each LineItem in
the ShoppingCart }
*new
populate
LineItems
Component
display page
submit modified
LineItem qty
updateList
checkQuantities
createConfirmationMessage
display page
Join a groupBASIC COURSE:On the Group Setting Page, the User enters the name of Group Account onto the Group Name Edit Box, and clicks the Join A Group Button. The system checks if the Group Account exists in the Master Account List, and if at least one domain of emails in User Account is same to the domain of Group Account’s email. Then, The system sends the Add-User Confirmation Email to the Group Account including the Confirmation Link to add the User Account.ALTERNATIVE COURSE:The name of Group Account does not exist: The system displays an Error Page explaining why the user cannot join the group, and displays the Group Setting Page.The Group Account already includes the User Account: The system displays an Error Page explaining that the user is already in the group, and displays the Group Setting Page.Domain of email does not match: The system displays an Error Page explaining why the user cannot join the group, and displays the Group Setting Page.
No
User
Group Setting page
Enter name ofGroup Account
Group Account
Does GroupAccount exist?
Clicks Join A Groupbutton
MasterAccount List
Is domain match between user emails and group account?
User Account Is User inGroup already?
Yes
Display “Group account does not exist” message
No
Display “User is already in the group” message
No
Display “Domain of email does not match
with the group” message
Error page
Send
Yes
Add‐User Conformation
Display
Group
Leave a groupBASIC COURSE:On the Group Setting Page, the User enters the name of Group Account onto the Group Name Edit Box, and clicks the Leave A Group Button. The system checks if the Group Account exists in the Master Account List, and if the Group Account includes the User Account. Then, the system removes the User Account from the Group Account, and sends the User-Left Notification Email to the Group Account.ALTERNATIVE COURSE:The name of Group Account does not exist: The system displays an Error Page explaining why the user cannot leave the group, and displays the Group Setting Page.The group account does not include the user: The system displays an Error Page explaining why the user cannot leave the group, and displays the Group Setting Page.
click Leave A Group button
User
Group Setting page
Error page
Display “Group account does not exist” message
Does groupexist?
Enter name ofGroup Account
Group Account
Master AccountList
Yes
User Account
No No
Yes
Remove userfrom group
SendUser‐LeftNotification email
Display “User is not in the group” message
Display
Group
Is User ingroup?
Delete user accountBASIC COURSE:On the User Account Setting Page, the User clicks the Account Delete Button. The system display Delete Account Conformation Screen to prompts to the User to confirm deleting User Account. If the User confirms, the system expires Session. Then, the System retrieve list of Group Accounts that the user belongs from User Account, removes the User Account from each Group Account, and send the User-Left Notification Email to the Group Account. Finally, the system deletes the User Account from Master Account List.ALTERNATIVE COURSE:The User denies deleting User Account: The system displays the User Account Setting Page.Some Group Account(s) is already deleted from Master Account List before User deletes User Account: The system does not remove the User Account from the deleted Group Account(s).
User
Display
Session
Deny
click AccountDelete Button
User AccountSetting Page
Confirm
Delete Account Confirmation Screen
Expire SessionGroup Account
Find user’s group
User Account
Delete User Account
Remove userfrom group
Send email
User‐Left Notification email
Master AccountList
Display
Is group already deleted?
No
Yes
Group
Enter file location
Does fileexist?
Request BCMoleMotion serviceBASIC COURSE:On the Main Page, the User clicks Request BCMoleMotion Button, and the system displays Request BCMoleMotion Page. The User enters the file location of Molecular Structure into Molecular Structure Edit Box, enters the Selection Formula into Selection Formula Edit Box, and then clicks Request Button. The system stores the Selection Formula into User Account, downloads the Molecular Structure file from User’s computer, and sends MoleMotion Compute Request Email to the NMC system containing a link to open Receive Result Page with attaching the Molecular Structure file.ALTERNATIVE COURSE:Molecular Structure file is not found: The system displays a message on Request BCMoleMotion Page, explaining why the request is denied.Molecular Structure file is not too large (>10 Mb): The system displays a message on Request BCMoleMotion Page, explaining why the request is denied.Selection Formula is has an error: The system displays a message on Request BCMoleMotion Page, explaining why the request is denied.
User
Main Page
MolecularStructure
No
Click RequestBCMoleMotion
button
Display “Cannot find structure file”
SelectionFormula
Enter formula
Click RequestButton
User Account
Downloadstructure
Send email with structure link
Yes
Is file size< 10 Mb?
Yes
No
Display “Structure file size should be <10 Mb”
Yes
No
Display “formulahas errors”
NMC System
Store formula inUser Account
MoleMotion ComputeRequest email
Is formulavalid?
Display
Request BCMoleMotion page
Receive results from NMC system
BASIC COURSE:NMC system click link in MoleMotion Compute Request Email, the system displays the Receive Result Page. NMC system sends Molecular Motion files to the system via the Receive Result Page. After receiving the files, the system identifies the User Account who requested the BCMoleMotion service from Receive Result Page address, retrieves Selection Formula, and selects 10 Molecular Motions using the Selection Formula in User Account, and then stores the selected 10 Molecular Motions in Caching Database. The system sends the Visualize Mole Motion Email to the User with a link to open Visualize Mole Motion Page.ALTERNATIVE COURSE:System failed to receive Molecular Motion files from NMC System: The system send the NMC System Failure Email to the User, which explains why the service is failed.User Account is deleted from Master Account List: The system discards the received Molecular Motion files.
NMC System
Receive ResultPage
Display
Molecular Motion
No
NMC SystemFailure Email
Click link
Send emailMoleMotion Compute Request email
User Account
Yes
Retrieve selection formula
Selection FormulaSelect 10 motions
Store todatabase
Caching Database
Send email
User
Success receiving motion
Is user deleted?
No
Master AccountList
Yes
Discardmotion file
Send Molecular Motion files
Identify User Account
Visualize MoleMotion Email
Visualize molecular motionsBASIC COURSE:The User clicks the link in Visualize Mole Motion Email. The system check if the User access the link within 7 days from Caching Database, retrieves 10 Molecular Motions in Caching Database. System converts them to VRML MoleMotion in VRML format, and then displays Visualize Mole Motion Page showing the VRML MoleMotion.ALTERNATIVE COURSE:Visualize Mole Motion Page is accessed after 7 days of receiving the Molecular Motion files: The system displays a message in Visualize Mole Motion Page explaining that the Molecular Motions cannot be displayed because its time limit is exceeded.The User is not logged in: The system invokes Login Use Cases.The User Account is deleted: The system displays a message explaining why the Molecular Motions cannot be displayed in Visualize Mole Motion Page.
User
Retrieve 10 motions
MolecularMotion
No
Clicklink
Display “Access deadline is expired”
message
Visualize MoleMotion Email
MolecularMotion
Convert to VRML
VRMLMoleMotion
DisplayVisualize MoleMotion page
Access within7 days?
Yes
Caching Database
Is logged‐in?
Yes
Login Use CaseNo
Session
No
Master Account List
Yes
Display “Account is deleted” message
Is accountdeleted?