Phân tích & thiết kế hệ thống system analysis and design
Trang 1
SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY
HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY
Lê Hữu Thành
Vũ Đan Hoài Vũ
Vũ Văn Ước Trần Hải Sơn
20092416
20093332
20093224
20092277 Instructor : TS Trần Đức Khánh
Trang 2
Mục lục
Mục lục ……… 2
A Analysis I Business Document II Business Analysis 1 Các nghiệp vụ ……… 6
2 Active Datagram ……… 6
III Usecase Analysis 1 Actor ……… 10
2 Usecase ……… 10
3 Usercase Datagram ……… 10
4 Đặc tả usecase ……… 11
IV Conceptual data modeling ……… 17
B Design I High-level Design 1 Scenario Analysis ……… 18
2 Object Analysis ……… 22
3 Screen Design 3.1 Log on ……… 24
3.2 Reservation ……… 37
3.3 Return ……… 45
3.4 Book Search ……… 50
3.5 Lending ……… 54
3.6 Check User status ……… 66
3.7 Change password ……… 72
II Detail Design 1 Scenario Design ……… 84
2 Object Design ……… 90
C Testing ……… 91
Trang 3
A Analysis
I Business Document (Tài liệu nghiệp vụ)
You are working on a new business system for S City Library The library wants to systematize book check-out, return, search and reservation as well as usage status check Assume that the library has multiple copies of the same books, each of which is identified by its book number The library also wants to offer book search, reservation and usage status check services to the public over the Internet S City Library is available to the public from 9:00 to 18:00
(1) User registration
- To borrow a book, users first create their “borrower’s cards”
- They fill out the “borrower’s card application form”, and submit the filled form with their identification (e.g health insurance card or driver’s license) to the front counter of the library
- The borrower’s card is for use in S City Library only
- Internet users can access the library system using their accounts and tentative passwords that are issued when they register as library users The tentative password can be changed at any time
(2) Using the library system via the Internet
- Users can use the library system via the Internet by entering their accounts and passwords
- Library staff enter their employee numbers and passwords They leverage the system
to perform operations of S City Library Specifically, they can perform book search, out, return, reservation, user registration and usage status check
check General users enter their borrower’s card numbers and passwords They can perform book search, usage status check and reservation
Trang 4
(3) Borrowing books
- The system processes check-out in units of books
- The system assigns an administration number (check-out number) to each check-out
- A user can borrow up to 10 books for 15 days
- Users bring books they want to borrow, together with their “borrower’s cards”, to the front counter
(4) Returning books
- The system processes books return in units books
- Users return books to the “return counter” of library before the due date
- Users can return books to the “return post ” when the library is closed
- Library staff put the returnd books back on the shelves or hold them for users who have reserved books
(5) Searching a books
- The system allows users to search for a book the live library own
- User can search books using beywords such as “title”, “author” and “publisher”
Trang 5- The system does not allow double reservations for the same book
- When a reserved books is held for the reneral user, library staff notify the user of it
by phone or e-mail Users can specify their contact method (phone or e-mail) at the time of reservation
- The system allows checking the information on reservation that is made by areneral user
(7) Checking usage status
- The library system allows checking the status of the books that a reneral user has borrowed or reserved Usage status check can also be performed over internet System users can check the usage status on the usage status check screen after loggin on to the library system
Trang 6
II Business Analysis (Phân tích nghiệp vụ):
Từ tài liệu nghiệp vụ, đưa ra những phân tích về quá trình thực hiện cho từng nghiệp
vụ trong thự tế triển khai Business analysis (phân tích nghiệp vụ) là bước đầu tiên trong quá trình thiết kế hệ thống Business analysis cho phép hiểu rõ được từng hoạt động nghiệp vụ cụ thể của hệ thống, xác định được tương tác giữa người dùng và các thành phần của hệ thống Sản phẩm của quá trình Business analysis là các activity diagram (biểu đồ hoạt động), miêu
tả các hoạt động của người sử dụng và của hệ thống trong các nghiệp vụ cụ thể
Trang 7
User log in
Librarian log in:
Trang 8
Borrowing book:
Book search:
Trang 9
Checking usage status:
Returning book:
Trang 11Tác nhân User, Librarian
Điều kiện cần ID và password đã được đăng kí
Mô tả No Hành động
1 Actor nhập các thông tin: ”ID” and “Password”
2 Hệ thống kiểm tra thông tin đăng nhập
3 Nếu actor đăng nhập thành công,thì hiển thị “menu điều khiển của nhân viên thư viện” hoặc “menu điều khiển của người dùng” Ngoại lệ 1a Một vài thông tin còn trống
2a ID đã nhập không tìm thấy 2b Password đã nhập không chính xác Scenario Mô tả
U001 – S01 Người dùng đăng nhập thành công
U001 – S02 Nhân viên thư viện đăng nhập thành công
U001 – S03 Thông tin ID không chính xác
U001 – S04 Password nhập sai
U001 – S05 Có một vài thông tin còn trống
Trang 12
Đăng kí tài khoản:
Tên Đăng kí tài khoản
Tóm tắt ND Người dùng tạo 1 tài khoản thư viện
Tác nhân Librarian và user
Điều kiện cần Không
Mô tả No Hành động
1 User mang mẫu đơn đã được điền thông tin cùng với
“identication” tới “front counter”
2 Librarian nhập thông tin user
3 Hệ thống kiểm tra các thông tin được nhập vào(đúng chuẩn, đủ các thông tin yêu cầu, …)
4 Nếu thỏa mãn, hệ thống lưu thông tin người dùng mới vào CSDL
5 Hiển thị thông tin tài khoản Ngoại lệ 3a Nhập thiếu hoặc sai một số thông tin
3b Thông tin “identication” không có thực Scenario Mô tả
U001 – S01 Tạo tài khoản thành công
U001 – S02 Hệ thống hiển thị các ô cần điền thông tin còn thiếu
U001 – S03 Hiển thị thông báo “indentication” không có thực
Trang 131 User nhập user ID và book IDs cần đặt
2 Hệ thống kiểm tra thông tin nhập vào
3 Hệ thống gán 1 “reservation number”
4 Hệ thống hiển thị thông tin đặt sách Ngoại lệ 2a Chưa điền đầy đủ thông tin
2b User ID không đúng 2c Book ID không đúng 2d Số lượng sách đặt vượt quá 10 Scenario Mô tả
U001 – S01 Yêu cầu nhập đủ thông tin
U001 – S02 Yêu cầu nhập lại User ID
U001 – S03 Yêu cầu nhập lại Book ID
U001 – S04 Thông báo số lượng sách đặt vượt quá 10
U001 – S05 Hiển thị thông tin đặt sách
Trang 141 Librarian nhập thông tin “library card number” của người mượn
2 Hệ thống kiểm tra thông tin nhập vào
3 Hệ thống kiểm tra xem người mượn có vi phạm hạn trả sách của lần mượn trước đó không
4 Librarian nhập thông tin về sách người dùng mượn
5 Hệ thống tìm kiếm thông tin sách
6 Hệ thống kiểm tra xem sách có thể mượn được không
7 Hệ thống kiểm tra số lượng sách mượn
8 Hệ thống thay đổi trạng thái sách từ “rỗi” sang “check-out”
9 Hệ thống hiển thị thông tin mượn sách Ngoại lệ 2a Thông tin nhập vào không đúng
3a Người mượn đã vi phạm hạn trả sách của lần mượn trước 5a Sách cần mượn không có trong thư viện
6a Sách cần mượn đã ở trạng thái “check-out”
7a Số lượng sách mượn vượt quá 10 Scenario Mô tả
U001 – S01 “Library card number” không tồn tại
U001 – S02 Thông báo “Vi phạm hạn trả sách”
U001 – S03 Thông báo “Sách cần mượn không có trong thư viện
U001 – S04 Thông báo “Sách cần mượn đã ở trạng thái “check out”
U001 – S05 Thông báo “Số lượng sách mượn vượt quá 10
U001 – S06 Mượn sách thành công
Trang 15
Tìm kiếm sách
Tóm tắt ND Tác nhân tìm sách có trong thư viện
Tác nhân User hoặc librarian
Điều kiện cần Tác nhân đã đăng nhập thành công
Mô tả No Hành động
1 Tác nhân nhập thông tin về sách cần tìm(có thể nhập một, hai hoặc
cả 3 thông tin sau: “title”, “author” và “publisher”
2 Tác nhân chọn chức năng tìm kiếm chính xác hoặc tìm kiếm theo
từ khóa có liên quan
3 Hệ thống đối chiếu thông tin tác nhân nhập với CSDL sách
4 Hệ thống hiển thị thông tin sách cần tìm Ngoại lệ Không có
Tên Cập nhật thông tin
Tóm tắt ND User hoặc librarian cập nhật thông tin user
Tác nhân Librarian, user
Điều kiện cần Tác nhân đăng nhập thành công
Mô tả No Hành động
1 Tác nhân nhập thông tin cần cập nhật (thay đổi usename, mật khẩu, avatar, …)
2 Hệ thống kiểm tra thông tin cập nhật
3 Hệ thống lưu thông tin cập nhật vào CSDL
4 Hệ thống hiển thị kết quả cập nhật Ngoại lệ 2a Thông tin cập nhật không hợp lệ
Scenario Mô tả
U001 – S01 Yêu cầu nhập lại thông tin cập nhật
U001 – S02 Kết quả thông tin cập nhật mới
Trang 16
Kiểm tra trạng thái
Tên Kiểm tra trạng thái
Tóm tắt ND User hoặc librarian kiểm tra trạng thái về user
Tác nhân User, Librarian
Điều kiện cần Tác nhân đăng nhập thành công
U001 – S01 Yêu cầu nhập lại User ID
U001 – S02 Hiển thị thông tin về User
Trang 17
IV Conceptual data modeling:
Các dữ liệu mô hình hóa:
Trang 191.2 Reservation
1.3 Search
Trang 20
1.4 Register
1.5 Return
Trang 211.6 Cập nhật thông tin người dùng
1.7 Lending
Trang 22
2 Object Analysis
Database
User
BookItem
Book
Trang 23
Librarian
Reservation
Lending
Trang 26
b) Layout
Logon Screen for Citizen User
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00101/Logon Screen for Citizen User
Logon Screen for Librarian
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00102/Logon Screen for Librarian
Trang 27
Citizen User Menu Screen
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00103/Citizen User Menu Screen
Librarian User Menu Screen
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00104/Librarian User Menu Screen
Trang 28
Logon Error for Citizen User Screen
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00105/Logon Error for Citizen User Screen
Logon Error for Librarian
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00106/Logon Error for Librarian
Trang 29
c) Item
Logon Screen for Citizen User
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00101/Logon Screen for Citizen User
1 Screen title Literal S city Library System Logon Screen for Citizen User
2 message Literal Enter Your User ID and Password
4 Password Input Max10degits
Form def Method="POST" Action="controller" name="inform"
)is invoked
・Input check
Trang 30
Logon Screen for Librarian
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00102/Logon Screen for Librarian
No Item on
Screen
1 Screen title Literal S city Library System Logon Screen for Librarian
2 message Literal Enter Your User ID and Password
3 ID Input > 6 digits
4 Password Input Max10degits
Form def Method="POST" Action="controller" name="inform"
Trang 31
Log off Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00103/Log off Screen
link For Citizen User / Logon.html
For Librarian / LogonLib.html
Form def
Trang 32
Citizen User Menu Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/name SC00104/Citizen User Menu Screen
1 Screen title Literal Citizen User Menu
4 Change Password Button
6 Check Usage Status Button
Trang 33
Form def Method="POST" Action="controller"
Trang 34
Librarian User Menu Screen
Screen Item System
name S City Library System Date 2009/11/01 Screen ID/name SC00105/Librarian User Menu Screen
Trang 35Form def Method="POST" Action="controller"
9 Log Off BUTTO
N
k
this.form.COMMAND_ID.value="99" this.form.submit()
Trang 36
Logon Error for Citizen User Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/name SC00106/Logon Error for Citizen User Screen
2 Back to Logon User
Screen
link For Citizen User / Logon.html
Form def
Logon Error for Citizen User Screen
Screen Item System
name
S City Library
Screen ID/name SC00107/Logon Error for Citizen User Screen
2 Back to Logon Librarian
Screen
link For Librarian User / LogonLib.html
Trang 39
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00203/Reservation Error Screen
Trang 40c CS_Item
Reservation Screen for Librarian
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00201/Reservation Screen for Librarian
1 Screen title Literal S city Library System Logon Screen for Citizen User
2 BookIDIP Input
3 ListBooks ListBox
4 Remove Button Remove
Trang 41Form def Method="POST" Action="controller" name="inform"
Reservation Screen for User
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00201/Reservation Screen for User
1 Screen title Literal Reservation Screen
2 BookIDIP Input
3 ListBooks ListBox
4 Remove Button Remove
Trang 42Form def Method="POST" Action="controller" name="inform"
Reservation Error Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00203/Reservation Error Screen
1 Screen title Literal Reservation Error
2 ErrorMessage Literal Error: _
3 BacktoReservat
ionScreen
Button
4 GotoMenu Button
Trang 43Form def Method="POST" Action="controller" name="inform"
Reservation Success Screen for Librarian
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00204/Reservation Success Screen for Librarian
1 Screen title Literal Reservation Success Screen
Form def Method="POST" Action="controller" name="inform"
Trang 45
Screen Layout System name S City Library
System
Date 2012/12/21 Screen ID/name SC00303/Return Error Screen
Trang 46
c Item
Return Book Screen
d Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00301/Return Book Screen
1 Screen title Literal Return Book
2 UserID_Text Literal UserID
Form def Method="POST" Action="controller" name="inform"
Trang 47
Return Success Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00302/Return Success Screen
1 Screen title Literal Return Success Screen
2 UserID Literal UserID
Form def Method="POST" Action="controller" name="inform"
Trang 48
Return Error Screen
Screen Item System name S City Library System Date 2009/11/01 Screen ID/Name SC00303/Return Error Screen
1 Screen title Literal S city Library System Logon Screen for Citizen User
2 UserID Literal UserID: ************
3 ErrorMessage Literal Error:
4 BacktoReturn
Screen
Button
5 GotoMenu Button
Form def Method="POST" Action="controller" name="inform"
onClick
Menu
onClick