问答题

【说明】
一个图书馆信息管理系统的分析与建模。下面是某图书馆的有关介绍。
图书馆雇有若干管理员,各自具有编码、姓名等属性。管理员可上岗,也可下岗。
图书馆中备有若干图书,每本图书有书号、书名、出版社、价格等属性。图书馆不定期地购买并注册新图书供读者借阅,也可将报废的旧书注销以停止借阅。
图书馆可为众多读者提供服务。每个读者在借阅之前需注册姓名、性别、地址、Email等内容。读者可在终端上查询。每个读者最多可同时借阅5本书。每本图书借期为30天;若有一本书超期,则不可再借其他图书。一本书超期一天罚款0.1元。若一本书超期3个月不归还,则发布通告。若读者的图书丢失,在罚款处理之前不能借书,每本报失的图书罚款该书价的2倍。注册新读者不受限制;在注销读者之前,该读者必须归还所有借阅的图书,或者报失并接受罚款。
【用例图】


【协作图】


1.【问题1】
在需求分析阶段,采用UML的用例图描述系统功能需求,如图1-6所示。指出图1-6中(1)(2)、(3)、(4)分别是哪个用例

【参考答案】

全局的约束应用于一个链接角色,指定相应的实例是可见的,因为它是一个全局量。
2.局部的约束应用于一个链接角色,......

(↓↓↓ 点击下方‘点击查看答案’看完整答案、解析 ↓↓↓)
热门 试题

问答题
0…1、(6)0…1
问答题
【程序说明】 定义一个多边形结构:struct polygon实现以下内容:(1)建立该结构的链表:create函数是创建链表,每输入一个结点的数据,就把该结点加入到链表当中,它返回创建的链表的头指针。(2)显示链表的各个结点数据:结点数据包括:多边形顶点数、各顶点的纵横坐标、当多边形顶点数为0时,链表创建结束。(3)编写一个函数disp,删除链表中的所有结点。需要注意的是:要先释放结点数据内存,再删除结点,如果在释放结点数据内存单元之前删除结点,则无法找到结点数据内存单元的地址,也就无法释放数据的内存单元。 【程序】 #include iostxeam. h #include iomanip. h stmct polygon int n; int *x; int *y; polygon *next; ; void Push(polygon*& head, int n) polygon* newNode = new polygon; newNode = new polygon; newNode->next= (1) ; newNode->x = new int[n]; newNode->y = new int[n]; newNode->n= (2) ; for(int i=0; i<= (3) ; i++) cout<< 请输入多边形各顶点x、y坐标, 坐标值之间用空格分隔: ; cin>>newNode->x[i]>>newNode->y[i]; (4) = head; 在head前不需要额外的* head = newNode; polygon *create() polygon* head = NULL; polygon* tail; int n; cout<< 请输入多边形顶点的个数(顶点个数为0时结束): ; cin>>n; if(n==O) return (5) ; Push(head, (6) ); tail = head; cout<< 请输入多边形顶点的个数(顶点个数为0时结束): ; cin>>n; while(n!=0) Push(tail->next, (7) ); 在tail->next增加结点 tail = tail->next; advance tail to point to last node cout<< 请输入多边形顶点的个数(顶点个数为0时结束): ; cin>>n; remm head; void disp(polygon *head) inti, No=l; eout<<setw( 10)<< x <<setw(6)<< y <<endl; while(head !=NULL) cout<< 第 <<No<< 结点: <<endl; for(i=0;i<=head->n-1;i++) cout<<setw(10)<<head->x [i] <<setw(6)<<head->y[i]<<endl; (8) ; he ad= (9) ; Match while statement void del(polygon *head) polygon *p; while(head!=NIILL p= (10) ; head=head->next; delete p->x; delete p->y; delete p; Match while statement void main() polygon *head; head=create(); disp(head); del(head);