: Administrator1: provide course info():DeleteCourseWindow2: send recevied info():Control:Databaseif effective,remindadministratorthat validatethe delete5: validate removing course()3: check if course is effective()4: return info()6: send validation info()7: send validation info()8: remove course and return result()9: return result()
4.3组件图
用于描述软件组件以及组件之间的组织和依赖关系。
4.4组件图
AdministratorStudents<>controlSystemDBCourse
5.活动图(系统级别的流程)
9
5.1活动图
活动图用于描述用例的业务流程或操作的工作步骤,用于对系统进行动态建模。 添加课程事件流:删除课程事件流和修改课程事件流与此类似 1 管理员选择进入管理界面,用例开始 2 系统提示输入管理员密码 3 管理员输入密码 4 系统验证密码 A1 密码错误
5 进入管理界面,系统显示目前所建立的全部课程信息 6 管理员选择添加课程 7 系统提示输入新课程信息 8 管理员输入信息
9 系统验证是否和已有课程冲突 A2 有冲突
10 系统添加新课程,提示课程添加成功。 11 系统重新进入管理主界面,显示所有课程 12 用例结束 其它事件流: A1 密码错误
1 系统提示再次输入 2 用户确认
3 三次错误,拒绝再次访问
4 否则进入添加课程事件流第5步 A2 有冲突
1 系统提示冲突,显示冲突课程信息 2 用户重新输入
3 继续验证直到无冲突
4 进入添加课程事件流第10步 选课事件流:
1 学生进入选课登录界面,用例开始 2 系统提示输入学号和密码 3 学生输入学号和密码 4 系统验证 A1 验证失败
5 进入选课主界面 6 学生点击选课
7 系统显示所有课程信息 8 学生选择课程
9 系统验证课程是否可选 A2 不可选
10 系统提示课程选择成功,提示学生 11 用例结束
10
错误流: A1 验证失败
1 系统体实验证失败,提示重新输入 2 三次失败,拒绝访问
3 成功,转选课事件流第5步 A2 课程不可选
1 系统提示课程不可选及原因 2 学生重新选课 3 重新验证直至成功 4 转选课事件流第10步
5.2. 活动图
Input Register infoSend register infoRegister as Register as StudentAdministratorControl estimate register infoAdd Register info into database
11
Enter Selection interfaceRefuse to enterFailed Three timesSys pormpt input account infoCheck until successStudent input infoSys Prompt input againSuccessSys validate account infoStudent select againSuccessEnter the main interfaceSys prompt the course is unavailableUnavailableStudent click course selectionSys display all coursesAvailableSelection successStudent select coursesSys validate if the course is available
AddStartEnter manage interfaceInput info againElseUser Affirm infoValidate untill no collision occursSys Prompt input infoInput admin infoAdmin input info againCorrect infoDisplay all Courses infoElseWrong Three timesRefuse accessing againSys prompt the collisionElseAdmin Add Course infoSys prompt input new course infoAdmin input infoSys validate if a collision existNo CollisionAdding New Course SucceedRenter manage interface and display all coursesAddEnd
Enter manage interfaceInput info againValidate untill no collision occursSys Prompt input infoInput Admin infoElseUser Affirm infoAdmin input info againSys prompt the collisionCorrect infoDisplay all Courses infoElseWrong Three timesRefuse accessing againSys Check the infoElseDelete new Course SucceedNo CollisionAdmin delete Course infoSys validate if a collision existRenter manage interface and display all courses
12
Enter manage interfaceInput info Validate until no againcollision occursSys Prompt input infoElseUser Affirm Admin input infoinfo againInput Admin infoSys prompot the collisionElseCorrect infoWrong Three timesElseDisplay all Refuse No CollisionModify new accessing againCourse SucceedCourses infoAdmin modify Sys Check Sys validate if a Renter manage interface Course infothe infocollision existand display all courses6.类(设计)图(逻辑视图)
6.1类图
类图来描述系统的内部结构,是对系统进行静态建模的重要技术之一。
13