面向对象软件工程 第三章 答案
- 格式:pdf
- 大小:472.06 KB
- 文档页数:4
面向对象程序设计课后答案(完整版)第二章2-4#includeusing namespace std;Add(int a,int b);int main(){int x,y,sum;cout>x>>y;sum = add(x,y);cout >*p;p++;}p = p-20;for( i=0;i0) countp++;if(*p>age ;try{checkagescore(name,age);}catch( string){cout<<"exception :name is exit"<<endl;continue;}catch(int){cout<<"exception :age is not proper"<<endl;continue;}cout<<"name:"<<name<<" age :"< }return 0;}第三章3-1(1)A (2)C (3)B (4)C (5)C(6)B (7)B (8)C (9)C3-7(1)main()函数中p1.age = 30;语句是错误的。
age 是类的私有成员(2)构造函数应当给常数据成员和引用成员初始化,将构造函数改为:A(int a1,int b1):a(a1),b(b1){}或A(int a1 ):a(a1),b(a){}再将main中的A a(1,2); 改为A a(1);(3)(1)在Test 类中添加语句:void print();void Print(){cout<<x<<"-"<<y<<"="<<x-y<<endl;}改为void Test::Print(){cout<<x<<"-"<<y<<"="<<x-y<<endl;}main函数中Init(38,15);改为:A.Init(38,15);Print();改为:A.Print();3-8(1)Constructing AConstructing BDestructing BDestructing A(2)double a,double bpoint & pp.x3-9class box{int len1,len2,len3;public:box(int l1,int l2,int l3){len1 = l1;len2 = l2; len3 = l3;} long volumn(){return len1*len2*len3;}};3-10class Test{int m1,m2;public:void Init(int a,int b){m1 = a;m2 = b;}void Pring(){cout<<m1<<" "<<m2<<endl;}};3-11略3-12}第四章4-6(1)D (2)D (3)D (4)D (5)B(6)D4-7(1)static int count = 0;这样初始化静态成员值是不对的将其改为static int count;在类外,main函数前加int Sample::count = 0;(2)#include//#includeusing namespace std;class Ctest{private:int x; const int y1;public:const int y2;Ctest(int i1,int i2):y1(i1),y2(i2) {y1 =10;//y1 为常量不能赋值x = y1;}int readme() const;};int Ctest::readme ()const{int i;i = x;x++; //常函数内不能改变成员值return x;}int main(){Ctest c(2,8);int i = c.y2;c.y2 = i;//y2为常量,不能改值i = c.y1;//y1私有,类外不能访问return 0;}将出错语句全部注释4-8(1)题中印刷错误,将class C构造函数改为: C(){cout<<"constructor C:";}运行结果为:constructor Aconstructor Bconstructor C(2)40(3)3434-9#include#includeclass Date{int year;int month;int day;public:Date(int y,int m,int d){year=y;month=m;day=d;}void disp(){cout<<year<<" "<<month<<" "<<day<<endl;}friend int count_day(Date &d,int k);friend int l(int year);friend int h(Date &d1,Date &d2);};int count_day(Date &d,int k){static int day_tab[2][12]={{31,28,31,30,31,30,31,31,30,31,30,3 1},{31,29,31,30,31,30,31,31,30,31,30,31}};// 使用二维数组存放各月天数,第一行对应非闰年,第二行对应闰年int j,i,s;if(l(d.year))j=1;//闰年,取1else j=0;//非闰年,取0if(k)//K非0时{s=d.day;for(i=1;i<d.month;i++)//d.month为输入的月份s+=day_tab[j][i-1];}else//K为0时{s=day_tab[j][d.month]-d.day;for(i=d.month+1; i<=12; i++)s+=day_tab[j][i-1];}return s;//S为相差的天数}int l(int year){if(year%4==0&&year%100!=0||year%400==0) // 是闰年return 1;else // 不是闰年return 0;}int h(Date &d1,Date &d2){int days,day1,day2,y;if(d1.year<d2.year)//第一个日期年份小于第二个日期年份{days=count_day(d1,0);for(y=d1.year+1;y<d2.year;y++)if(l(y))//闰年。
第三章测验一、单选题(共40.00分)1. 状态是任何可被观察到的系统()。
A. 外部接口B. 动作C. 行为模式D. 信息流动正确答案:C2. ()是复审需求分析成果时的焦点。
A. 代码B. 需求规格说明C. 模型D. 计划正确答案:C3. 在对数据流图分层细化时必须保持()。
A. 信息连续性B. 信息流封闭C. 不产生新信息D. 输入数据与输出数据平衡正确答案:A4. 一张状态图中只能有一个()。
A. 初态B. 终态C. 中间状态D. 以上都不正确正确答案:A二、多选题(共33.00分)1. DFD的基本符号包括()。
A. 数据的源点或终点B. 变换数据的处理C. 数据存储D. 数据流正确答案:A B C D2. ()通常不会出现在DFD中。
A. 输入数据处理B. 出错处理C. 内务处理(如打开/关闭文件)D. 数据合并正确答案:B C3. 支持分层细化的图形有()。
A. 数据字典B. ER图C. DFDD. STD正确答案:C D三、判断题(共27.00分)1. 需求分析是开发方的工作,用户的参与度不大。
()A. 正确B. 错误正确答案:B答案解析:用户与分析员应密切合作共同分析需求2. 结构化分析实质上就是一种建模活动。
()A. 正确B. 错误正确答案:A3. 模型是验证规格说明的完整性、一致性和准确性的重要依据。
()A. 正确B. 错误正确答案:A。
C++⾯向对象程序设计第三章习题答案解析整理⼀下⾃⼰写的作业,供考试前复习⽤,哈哈进⼊正题题⽬:2.分析下⾯的程序,写出其运⾏时的输出结果这⾥就不展⽰课本源代码,直接给出修改后的代码,错误部分代码已给出具体的注释1 #include<iostream>2//原题的#include<iostream.h>写法错误3 #include<stdlib.h>4//⽤于解决闪屏的头⽂件5using namespace std;6//原题缺少该⾏代码,⽤于输⼊cin和输出cout7class Date{8public:9 Date(int,int,int);10 Date(int,int);11 Date(int);12 Date();1314void display();15private:16int month;17int day;18int year;1920 };2122 Date::Date(int m,int d,int y):month(m),day(d),year(y){}2324 Date::Date(int m,int d):month(m),day(d)25 {year=2005;}2627 Date::Date(int m):month(m)28 {day=1;year=2005;}2930 Date::Date()31 {month=1;day=1;year=2005;}3233void Date::display()34 {35 cout<<month<<"/"<<day<<"/"<<year<<endl;36 }3738int main()39 {40 Date d1(10,13,2005);41 Date d2(12,30);42 Date d3(10);43 Date d4;44 d1.display();45 d2.display();46 d3.display();47 d4.display();48 system("pause");49//解决闪屏的代码50return0;51 }运⾏结果:3.如果将第2题中程序的第四⾏改为⽤默认参数,即Date(int =1,int =1,int =2005);分析程序有⽆问题。
面向对象软件工程答案【篇一:软件工程考试试题与答案】txt> 一、单项选择题1.好的软件结构应该是()a.低耦合、低内聚b.高耦合、高内聚c.高耦合、低内聚d.低耦合、高内聚答案: d2.需求分析中开发人员要从用户那里了解()a.软件的规模b.软件做什么c.用户使用界面d.输入的信息答案: b3.软件调试技术包括()a.演绎法b .循环覆盖c .边界值分析 d .集成测试答案: a4.软件需求规格说明书的内容不应包括对()的描述。
a.用户界面及运行环境b .主要功能c .算法的详细过程 d .软件的性能答案: c5.常用动词或动词词组来表示()a.属性b.关联c.类d.对象答案: b6.软件可行性研究实质上是要进行一次()需求分析、设计过程。
a.详细的b.深入的c.彻底的d.简化、压缩的答案: d7.软件部分的内部实现与外部可访问性分离,这是指软件的()a.继承性b.共享性c.抽象性d.封装性答案: d8.软件部分的内部实现与外部可访问性分离,这是指软件的()a.共享性b.继承性c.抽象性d.封装性答案: d9.在详细设计阶段,经常采用的工具有()a.pdlb. dfdc.scd.sa答案: a10.数据字典是对数据定义信息的集合,它所定义的对象都包含于()a.软件结构b .程序框图c .方框图d .数据流图答案: d11.软件工程结构化生命周期方法,提出将软件生命周期划分为计划、开发和运行三个时期,下述()工作应属于软件开发期的内容。
a.问题定义b.可行性研究c.都不是d.总体设计答案: d12 .应用执行对象的操作可以改变该对象的()a.功能b .数据c .属性d .行为答案: c13 .软件质量因素不包括()a.可理解性b .可测试性 c .正确性 d .高性能答案: d14 .软件可行性研究实质上是要进行一次()需求分析、设计过程。
a.详细的b .彻底的c .深入的d .简化、压缩的答案: d15 .结构化设计是一种面向()的设计方法。
第一章软件工程概述软件工程的基本原则是什么?1,抽象:采用分层次抽象,自顶向下逐层细化的办法控制软件开发过程的复杂性。
2,模块化:模块化有助于信息隐蔽和抽象,有助于表示复杂的系统。
3,信息隐蔽:将模块化设计成“黑箱”,实现的细节隐蔽在模块内部,不让模块的使用直接访问,这就是信息封装。
4,局部化:保证模块之间具有松散的耦合,模块内部具有较强的内聚,这有助于控制模块的复杂性5,一致性:整个软件系统使用一致的概念符号和术语。
6,完整性:软件系统不丢失任何重要成分,可以完全实现系统所要求功能的程度。
7,不可验证性:易于检查、测试、评审,确保系统的正确性。
第二章可行性研究选择题1,研究开发所需要的成本和资源属于可行性研究中(经济可行性)研究的一方面。
2,可行性分析研究的目的是(项目值得开发与否)。
3,软件分析的第一步要做的工作在于(分析系统开发的可行性)。
4,可行性研究目的主要在于(用最小的代价确定问题定义阶段所确定的目标和规模是否可实现,可解决)。
5,软件可行性分析是着重确定系统的目标和规模。
对功能,性能及约束条件的分析应属于下列(技术可行性分析)。
简答题简述可行性研究的步骤?1,复查系统规模和目标2,研究目前正在使用的系统3,导出新系统的高层逻辑模型4,重新定义问题5,导出和评价供选择方案6,推荐一个方案并说明理由7,推荐行动方针8,书写计划任务书9,提交审查应用题设计一个软件的开发成本为5万元,寿命为3年。
未来3年的每年收益预计为22000元,24000元,26620元,银行年利率为10%。
试对此项目进行成本效益分析,以决定其经济可行性。
答:设银行的年利率是10%,则下列出每年的收益第一年:22000/1.1=20000第二年:24000/1.21=19834.71第三年:26620/1.331=20000因此:现有值收益为20000+19834.71+20000=59834.71投资回收期2+10165/20000=2.51纯收入59835-50000=9834.71第三章需求分析需求分析的原则有哪些?1.需求分析方法应该容易被用户理解。
面向对象程序设计课后习题答案第一章:面向对象程序设计概述[1_1]什么是面向对象程序设计?面向对象程序设计是一种新型的程序设计范型。
这种范型的主要特征是:程序=对象+消息。
面向对象程序的基本元素是对象,面向对象程序的主要结构特点是:第一:程序一般类的定义和类的使用两部分组成,在主程序中定义各对象并规定它们之间传递消息的规律。
第二:程序中的一切操作都是通过向对象发送消息来实现的,对象接受到消息后,启动有关方法完成相应的操作。
面向对象程序设计方法模拟人类习惯的解题方法,代表了计算机程序设计新颖的思维方式。
这种方法的提出是软件开发方法的一场革命,是目前解决软件开发面临困难的最有希望、最有前途的方法之一。
[1_2]什么是类?什么是对象?对象与类的关系是什么?在面向对象程序设计中,对象是描述其属性的数据以及对这些数据施加的一组操作封装在一起构成的统一体。
对象可以认为是:数据+操作在面向对象程序设计中,类就是具有相同的数据和相同的操作的一组对象的集合,也就是说,类是对具有相同数据结构和相同操作的一类对象的描述。
类和对象之间的关系是抽象和具体的关系。
类是多个对象进行综合抽象的结果,一个对象是类的一个实例。
在面向对象程序设计中,总是先声明类,再类生成对象。
类是建立对象的“摸板”,按照这个摸板所建立的一个个具体的对象,就是类的实际例子,通常称为实例。
[1_3]现实世界中的对象有哪些特征?请举例说明。
对象是现实世界中的一个实体,其具有以下一些特征:每一个对象必须有一个名字以区别于其他对象。
需要用属性来描述它的某些特性。
有一组操作,每一个操作决定了对象的一种行为。
对象的操作可以分为两类:一类是自身所承受的操作,一类是施加于其他对象的操作。
例如:雇员刘名是一个对象对象名:刘名对象的属性:年龄:36 生日:工资:2000 部门:人事部对象的操作:吃饭开车[1_4]什么是消息?消息具有什么性质?在面向对象程序设计中,一个对象向另一个对象发出的请求被称为“消息”。
软件工程智慧树知到课后章节答案2023年下山东财经大学山东财经大学第一章测试1.软件没有相应的文档,且最终不能满足用户要求是软件危机的一种表现。
()答案:对2.软件本身的不可见性和复杂性随规模的增加呈指数上升是产生软件危机的主要原因。
()答案:错3.开发软件就是写程序。
()答案:错4.开发软件所需高成本和产品的低质量之间有着尖锐的矛盾,这种现象称()。
答案:软件危机5.以下对软件工程描述正确地是()。
答案:采用经过时间考验而证明正确的管理技术。
;一门工程学科。
;经济地开发出高质量的软件并有效地维护它。
;结合最好的技术方法。
6.软件生命周期中所花费费用最多的阶段是()。
答案:软件维护。
7.软件是()。
答案:程序、数据及其文档的集合。
8.同螺旋模型相比,原型模型主要缺少()。
答案:风险分析9.在软件生存周期模型中,不适应变化需求的软件开发模型是()。
答案:瀑布模型10.针对高质量软件的生产的软件过程模型()。
答案:净室模型第二章测试1.可行性研究的技术可行性是指现有技术是否可行。
()答案:对2.可行性研究的成本效益分析是从经济方面讨论是否可行。
()答案:对3.可行性分析研究的目的是()。
答案:项目值得开发否4.描绘物理系统的传统工具是()。
答案:系统流程图5.数据字典的基本功能是()。
答案:数据定义。
6.使用数据流图对工资系统进行需求分析建模,外部实体是()。
答案:接受工资单的银行7.数据流图的作用包括()。
答案:可以逻辑模型考虑系统的物理实现;作为交流信息的工具;作为分析和设计的工具8.典型环境下各个开发阶段需要使用的人力的百分比最多的是()。
答案:综合测试第三章测试1.需求分析阶段的产品是()。
答案:需求规格说明书。
2.进行需求分析可使用多种工具,但是()不适用。
答案:PAD图3.软件需求规格说明的内容不应该包括()。
答案:算法的描述。
4.在考察系统的一些涉及时序和改变的状况时,要用动态模型来表示。
2:#include 〈iostream〉using namespace std;class Date{public:Date(int,int,int);Date(int,int);Date(int);Date();void display();private:int month;int day;int year;};Date::Date(int m,int d,int y):month(m),day(d),year(y){}Date::Date(int m,int d):month(m),day(d){year=2005;}Date::Date(int m):month(m){day=1;year=2005;}Date::Date(){month=1;day=1;year=2005;}void Date::display(){cout<〈month〈〈"/”〈<day〈<”/”<<year〈<endl;}int main(){Date d1(10,13,2005);Date d2(12,30);Date d3(10);Date d4;d1.display();d2。
display();d3.display();d4。
display();return 0;}3:#include 〈iostream>using namespace std;class Date{public:Date(int=1,int=1,int=2005);void display();private:int month;int day;int year;};Date::Date(int m,int d,int y):month(m),day(d),year(y){}void Date::display(){cout〈〈month<<”/”<<day<〈"/"<〈year〈〈endl;}int main(){Date d1(10,13,2005);Date d2(12,30);Date d3(10);Date d4;d1.display();d2.display();d3。
面向对象分析与设计(第二版)习题答案第一章:面向对象基础知识1.1 什么是面向对象分析和设计?面向对象分析和设计(Object-Oriented Analysis and Design,OOAD)是软件工程中一种常用的方法论,通过将问题领域进行建模,通过对象、类、继承、封装等概念来描述现实世界中的实体、关系和行为。
面向对象分析和设计的目标是开发出可复用、可维护、可扩展、高质量的软件系统。
1.2 面向对象分析和设计的优势有哪些?面向对象分析和设计有以下优势: - 高度模块化:通过将系统划分为多个独立的对象,便于理解和设计系统的各个部分。
- 可复用性:面向对象设计强调对象的复用,通过定义通用的类和接口,可以提高代码的复用程度。
- 可维护性:面向对象的封装特性使得系统的各个部分具有独立性,便于维护和修改。
- 可扩展性:通过继承和多态等特性,可以方便地扩展和修改系统的功能。
- 高可靠性:面向对象的封装和隐藏特性可以减少系统中的错误和安全漏洞。
- 开发效率高:面向对象的分析和设计提供了一种更自然的思考和描述问题的方法,可以提高开发效率。
第二章:面向对象建模2.1 对象的特征有哪些?对象具有以下特征: - 状态(State):对象的状态是对象的属性值的集合,表示对象的某个时刻的状态。
- 行为(Behavior):对象可以执行的操作,描述了对象能够做什么。
- 身份(Identity):每个对象都有唯一的身份,可以通过身份来区分不同的对象。
2.2 类和对象之间的关系有哪些?类和对象之间有以下关系: - 实例化(Instantiation):类是对象的模板,对象是类的一个具体实例。
- 继承(Inheritance):一个类可以继承另一个类的属性和方法。
- 聚合(Aggregation):一个类可以包含其他类的对象作为成员变量。
- 关联(Association):两个类之间存在某种关系,一个类的对象可以访问另一个类的对象。
Chapter 3MORE FLOW OF CONTROL1. Solutions for and Remarks on Selected Programming ProblemsIn order to preserve flexibility of the text, the author has not dealt with classes in this chapter at all. To help those who really want to do things with classes, some of the Programming Projects will be carried out using one or several classes.1. Rock Scissors PaperHere each of two players types in one of strings "Rock", "Scissors", or "Paper". After the second player has typed in the string, the winner of this game is determined and announced.Rules:Rock breaks ScissorsScissors cuts PaperPaper covers RockIf both players give the same answer, then there is no winner.A nice touch would be to keep and report total wins for each player as play proceeds.To find the classes, we note first that there are 2 identical players. These players record the character entered, and keep track of the wins. There is a constructor that sets the total wins to 0. There is a play() member function that prompts for and gets from the keyboard returns one of the characters 'R', 'P', or 'S' for rock, paper and scissors. There is an accessor member function for ch and an incrementor member function for accumulated wins so that a stand alone function int win(ch, ch); can determine who wins and increment the accumulated wins variable.(A better solution would make the wins function a friend of class player so that wins can have access to the each player's private data to determine who wins and update the accumulated wins without the accessor function ch() and incrementWins() function.)Note that I have left a bit of debugging code in the program.class player{public function membersconstructors()play(); // prompts for and gets this player's movechar ch(); // accessorint accumulatedWins(); // accessorincrWins(); // increments win countprivate datacharacter typed inaccumulatedWins};int wins(player user1, player user2);//player1's character is compared to player2's character using accessor // functions.// wins returns// 0 if there no winner// 1 if player 1 wins,// 2 if player 2 wins,//calls the appropriate incrWins() to update the winsNote that once the class is defined and the auxiliary function written, the code “almost writes itself.”//file: //Rock Paper Scissors game//class/object solution#include <iostream>#include <cctype> //for int toupper(int);using namespace std;class Player{public:Player();void play(); //prompts for and gets this player's movechar Ch(); //accessorint AccumulatedWins(); //accessorvoid IncrWins(); //increments win countprivate:char ch; //character typed inint totalWins; //total of wins};Player::Player():totalWins(0)//intializer sets Player::totalWins to 0 {//The body is deliberately empty. This is the preferred C++ idiom. //This function could be written omitting the initializer, and//putting this line in the body://totalWins = 0;}void Player::play(){cout << "Please enter either R)ock, P)aper, or S)cissors."<< endl;cin >> ch;ch = toupper(ch); //no cast needed, ch is declared to be char}char Player::Ch(){return ch;}int Player::AccumulatedWins(){return totalWins;}void Player::IncrWins(){totalWins++;}int wins(Player& user1, Player& user2);// player1's character is compared to player2's character// using accessor functions.// The function wins returns// 0 if there no winner// 1 if player 1 wins,// 2 if player 2 wins,//calls the appropriate IncrWins() to update the winsint wins(Player& user1, Player& user2 ) // this must change user1// and user2{if( ( 'R' == user1.Ch() && 'S' == user2.Ch() )||( 'P' == user1.Ch() && 'R' == user2.Ch() )||( 'S' == user1.Ch() && 'P' == user2.Ch() ) ){// user 1 winsuser1.IncrWins();return 1;}else if( ( 'R' == user2.Ch() && 'S' == user1.Ch() )|| ( 'P' == user2.Ch() && 'R' == user1.Ch() )|| ( 'S' == user2.Ch() && 'P' == user1.Ch() ) ) {// user2 winsuser2.IncrWins();return 2;}else// no winnerreturn 0;}int main(){Player player1;Player player2;char ans = 'Y';while ('Y' == ans){player1.play();player2.play();switch( wins(player1, player2) ){case 0:cout << "No winner. " << endl<< "Totals to this move: " << endl<< "Player 1: " << player1.AccumulatedWins() << endl<< "Player 2: " << player2.AccumulatedWins()<< endl<< "Play again? Y/y continues other quits";cin >> ans;cout << "Thanks " << endl;break;case 1:cout << "Player 1 wins." << endl<< "Totals to this move: " << endl<< "Player 1: " << player1.AccumulatedWins()<< endl<< "Player 2: " << player2.AccumulatedWins()<< endl<< "Play Again? Y/y continues, other quits. "; cin >> ans;cout << "Thanks " << endl;break;case 2:cout << "Player 2 wins." << endl<< "Totals to this move: " << endl<< "Player 1: " << player1.AccumulatedWins()<< endl<< "Player 2: " << player2.AccumulatedWins()<< endl<< "Play Again? Y/y continues, other quits.";cin >> ans;cout << "Thanks " << endl;break;}ans = toupper(ans);}return 0;}A typical run for the class/object solution follows:Please enter either R)ock, P)aper, or S)cissors.RPlease enter either R)ock, P)aper, or S)cissors.Sinside IncrWins()1Player 1 wins.Totals to this move:Player 1: 1Player 2: 0Play Again? Y/y continues, other quits. yThanksPlease enter either R)ock, P)aper, or S)cissors. SPlease enter either R)ock, P)aper, or S)cissors. Pinside IncrWins()2Player 1 wins.Totals to this move:Player 1: 2Player 2: 0Play Again? Y/y continues, other quits. yThanksPlease enter either R)ock, P)aper, or S)cissors. PPlease enter either R)ock, P)aper, or S)cissors. Sinside IncrWins()1Player 2 wins.Totals to this move:Player 1: 2Player 2: 1Play Again? Y/y continues, other quits.yThanksPlease enter either R)ock, P)aper, or S)cissors. PPlease enter either R)ock, P)aper, or S)cissors. PNo winner.Totals to this move:Player 1: 2Player 2: 1Play again? Y/y continues other quits qThanks1. Rock Scissors Paper -- Conventional solution:Here each of two players types in one of strings "Rock", "Scissors", or "Paper". After the second player has typed in the string, the winner of this game is determined and announced.Rules:Rock breaks ScissorsScissors cuts PaperPaper covers RockIf both players give the same answer, then there is no winner.A nice touch would be to keep and report total wins for each player as play proceeds.This is a conventional solution to the problem.//file //conventional solution to the Rock Scissors Paper game#include <iostream> // stream io#include <cctype> // for int toupper(int)using namespace std;int wins(char ch1, char ch2){if( ( 'R' == ch1 && 'S' == ch2 )||( 'P' == ch1 && 'R' == ch2 )||( 'S' == ch1 && 'P' == ch2 ) )return 1; // player 1 winselse if(( 'R' == ch2 && 'S' == ch1 )||( 'P' == ch2 && 'R' == ch1 )||( 'S' == ch2 && 'P' == ch1 ) )return 2; // player 2 winselsereturn 0; // no winner}char play(){char ch;cout << "Please enter either R)ock, P)aper, or S)cissors." << endl; cin >> ch;return toupper(ch); // no cast needed, char is return type}int main(){int wins_1 = 0;int wins_2 = 0;char ch1;char ch2;char ans = 'Y';while ('Y' == ans){ch1 = play();ch2 = play();switch( wins(ch1, ch2) ){case 0:cout << "No winner. " << endl<< "Totals to this move: " << endl<< "Player 1: " << wins_1 << endl<< "Player 2: " << wins_2 << endl<< "Play again? Y/y continues other quits";cin >> ans;cout << "Thanks " << endl;break;case 1:wins_1++;cout << "Player 1 wins." << endl<< "Totals to this move: " << endl<< "Player 1: " << wins_1 << endl<< "Player 2: " << wins_2 << endl<< "Play Again? Y/y continues, other quits. ";cin >> ans;cout << "Thanks " << endl;break;case 2:wins_2++;cout << "Player 2 wins." << endl<< "Totals to this move: " << endl<< "Player 1: " << wins_1 << endl<< "Player 2: " << wins_2 << endl<< "Play Again? Y/y continues, other quits.";cin >> ans;cout << "Thanks " << endl;break;}ans = toupper(ans);}return 0;}A typical run follows for the co nventional solution is essentially the same as for the …class‟ based solution.2. Credit Account problem. -- class/object solutionCompute interest due, total amount due, and minimum payment for a revolving credit account.Inputs: account balanceProcess: Computes interestinterest according to:1.5% on 1st $10001.0% on all over $1000adds this to account balance get total due.Computes minimum payment according to:if amount due < $10,minimum payment is total dueelseminimum payment is 10% of total dueoutputs: Interest due, total amount due, minimum paymentThe class is the account.the public interface has functions:constructorsdefault constructorconstructor with parameter balance,computes interest, total due, minimum payinterestDue() reports interesttotalDue() reports total amount dueminPayDue() reports minimum payment dueprivate databalancetotal dueinterest dueminimum paymentClass-object Implementation://file: //Interest//class-object solution//Purpose: Compute interest due, total amount due, and minimum payment //for a revolving credit account.////Inputs: account balance////Process: Computes interest// interest according to:// 1.5% on 1st $1000 of balance// 1.0% on all over $1000 of balance// adds this to account balance get total due.// Computes minimum payment according to:// if amount due < $10,// minimum payment is total due// else// minimum payment is 10% of total due////outputs: Interest due, total amount due, minimum payment#include <iostream>using namespace std;const double INTEREST_RATE1 = 0.015;const double INTEREST_RATE2 = 0.01;const double MINPAY_FRACTION = 0.10;class CreditAccount{public:CreditAccount(); // sets everything to 0CreditAccount( double balance );// computes everything needed double interestDue();double totalDue();double minPayDue();private:double balance;double interestDue;double totalDue;double minPay;};double CreditAccount::interestDue(){return interestDue;}double CreditAccount::totalDue(){return totalDue;}double CreditAccount::minPayDue(){return minPay;}CreditAccount::CreditAccount():balance(0),totalDue(0), interestDue(0), minPay(0){//Body deliberately left empty.//This is a C++ idiom. See this IRM Chapter 10.// This is covered in Appendix 7 of the text}CreditAccount::CreditAccount( double balance ){if (balance <= 1000 )interestDue = balance*INTEREST_RATE1;else if ( balance > 1000 )interestDue = 1000*INTEREST_RATE1 + (balance - 1000)*INTEREST_RATE2; totalDue = balance + interestDue;if (totalDue <= 10 )minPay = totalDue;elseminPay = totalDue * MINPAY_FRACTION;}int main(){cout.setf(ios::showpoint);cout.setf(ios::fixed);cout.precision(2);char ans;double balance;do{cout << "Enter the account balance, please: " ;cin >> balance;CreditAccount account( balance );cout << "Interest due: " << account.interestDue() << endl<< "Total due: " << account.totalDue() << endl<< "Minimum Payment: " << account.minPayDue() << endl;cout << "Y/y repeats. any other quits" << endl;cin >> ans;}while('y' ==ans || 'Y' == ans );}A typical run for the class/object solution follows:Enter the account balance, please: 9.00Interest due: 0.14Total due: 9.13Minimum Payment: 9.13Y/y repeats. any other quitsyEnter the account balance, please: 9.85Interest due: 0.15Total due: 10.00Minimum Payment: 10.00Y/y repeats. any other quitsyEnter the account balance, please: 985.22Interest due: 14.78Total due: 1000.00Minimum Payment: 100.00Y/y repeats. any other quitsyEnter the account balance, please: 1000Interest due: 15.00Total due: 1015.00Minimum Payment: 101.50Y/y repeats. any other quitsyEnter the account balance, please: 2000Interest due: 25.00Total due: 2025.00Minimum Payment: 202.50Y/y repeats. any other quitsq2. Credit Account problem -- Conventional solutionCompute interest due, total amount due, and minimum payment for a revolving credit account. Inputs: account balanceProcess: Computes interestinterest according to:1.5% on 1st $10001.0% on all over $1000adds this to account balance get total due.Computes minimum payment according to:if amount due < $10,minimum payment is total dueelseminimum payment is 10% of total dueoutputs: Interest due, total amount due, minimum paymentdatabalancetotal dueinterest dueminimum payment//file: //conventional solution////Purpose: Compute interest due, total amount due, and minimum payment //for a revolving credit account.////Inputs: account balance////Process: Computes interest// interest according to:// 1.5% on 1st $1000 of balance// 1.0% on all over $1000 of balance// adds this to account balance get total due.// Computes minimum payment according to:// if amount due < $10,// minimum payment is total due// else// minimum payment is 10% of total due////Outputs: Interest due, total amount due, minimum payment#include <iostream>using namespace std;const double INTEREST_RATE1 = 0.015;const double INTEREST_RATE2 = 0.01;const double MINPAY_FRACTION = 0.10;double interestDue(double balance){if (balance <= 1000 )return balance*INTEREST_RATE1;return 1000*INTEREST_RATE1 + (balance - 1000)*INTEREST_RATE2; }double minPay(double totalDue){if (totalDue <= 10 )return totalDue;return totalDue * MINPAY_FRACTION;}int main(){double balance;double interestDue;double totalDue;double minPay;cout.setf(ios::showpoint);cout.setf(ios::fixed);cout.precision(2);char ans;do{cout << "Enter the account balance, please: " ;cin >> balance;interestDue = interestDue(balance);totalDue = balance + interestDue;minPay = minPay(totalDue);cout << "Interest due: " << interestDue << endl<< "Total due: " << totalDue << endl<< "Minimum Payment: " << minPay << endl;cout << "Y/y repeats. any other quits" << endl;cin >> ans;}while ( 'y' ==ans || 'Y' == ans );}A typical run for the conventional solution does not differ significantly from the …class‟ based solution.3. Astrology Class/Object solution.Notes:I have not done a conventional solution. All the bits and pieces necessary to do a conventional solution are present here. I also have not done the enhancements suggested. I have, however, included comments that suggest how to carry out these enhancements.I have used slightly modified new_line and display_line code from the text. Encourage students not to reinvent the wheel, that is, to use bits and pieces code from the book and other sources as long as copyrights are not violated.I used a library book on astrology for my reference. A newspaper works as well.Planning:Input: user's birthday. Month 1-12, day 1-31Process: table lookup of signs and horoscopes, with repeat at user's optionOutput: Sign of the Zodiac and horoscope for that birthday.Hint: user a newspaper horoscope for names, dates and ahoroscope for each sign.Enhancement: If birthday is within 2 days of the adjacentsign, announce that the birthdate is on a "cusp" and outputthe horoscope for the adjacent sign also.Comments and suggestions. Program will have a long multiwaybranch. Store the horoscopes in a file.Ask your instructor for any special instructions, such as file name orlocation if this is a class assignment.Planning for the solution:What are the object and classes?The Astrological Chart would be the class if we were doing a full chart. We are only selecting the Sun Sign, but we still let Astro be the class.Zodiac Sign names and dates:Aries March 21 - April 19Tarus April 20 - May 20Gemini May 21 - June 21Cancer June 22 - July 22Leo July 23 - August 22Virgo August 23 - September 22Libra September 23 - October 22Scorpio October 23 - November 21Sagittarius November 22 - December 21Capricorn December 21 - January 19Aquarius January 19 - February 18Pices February 19 - March 20Horoscope file structure.The initial <cr> is necessary given this code to prevent output from running on from the first horoscope. (We did not make use of the sign number.)<cr>sign numberhoroscope#sign numberhoroscope#and so on.Pseudocode for the class and what member functions do...class Astro{public:constructorsAstro();Astro( Date birthday);looks up and sets the sign number,Enhancement:sets iscusp to -1 if birthday is within 2 daysbefore the adjacent sign, to -1 if within 2 daysafter adjacent sign and 0 if neither.member functionsvoid horoscope ();Enhancement:if iscusp == -1, report horoscope before thecurrent one and the current one.else if iscusp == 1, report the current horoscopeand the one following.else // iscusp == 0, do the default action:Unenhanced action:Dump the horoscopes from file up to the current one.Display current horoscope.How? # is sentinel for end of a horoscope. Dump horoscopesthrough (signNumber -1) # symbols, using utilityfunctions. Display through next # using utilityfunctions.private:Day birthday;int signNumber;void newHoroscope(istream & inStream);// display inStream to next # and discard the #void displayHoroscope( istream& sourceFile);// read and ignore inStream through the next #//Enhancement:// int isCusp(};Planning done, now to the coding. The contents of “horoscope.dat” are listed with the …typical run‟ at the end of the following code.// Program: file: // Requires file "horoscope.dat" having structure// lines of text// #// lines of text// #// ...// lines of text// ##include <fstream> //for stream io#include <stdlib> //for exit()using namespace std;// an enum could have certainly been used hereconst int aries = 1;const int taurus = 2;const int gemini = 3;const int cancer = 4;const int leo = 5;const int virgo = 6;const int libra = 7;const int scorpio = 8;const int Sagittarius = 9;const int capricorn = 10;const int aquarius = 11;const int pisces = 12;//const makes certain no error that changes these constants is made.struct month //no checking is done... Let the user be warned!{int day; // 1..28, or 29 or 30 or 31, depending on month.int month; // 1..12};class Astro{public:Astro();Astro( month birthday);// looks up and sets the sign number//Enhancement: sets iscusp to -1 if birthday is within 2 days // before the adjacent sign, to -1 if within 2 days// after adjacent sign and 0 if neither.void horoscope ();//Enhancement: if iscusp == -1,// dump (signNumber - 2) horoscopes// else if iscusp == 1// dump (signNumber - 1) horoscopes// display next two horoscopes.// return;// unenhanced action: if we get here, iscusp == 0 so we// dump (signNumber - 1) horoscopes,// display next horoscope.private:month birthday;int signNumber;void newHoroscope(istream & inStream);void displayHoroscope( istream& sourceFile);//Enhancement:// int isCusp;};// dumps all from file through the next #void Astro::newHoroscope(istream & inStream){char symbol;do{inStream.get(symbol);} while(symbol != '#' );}//displays all from file through the next #void Astro::displayHoroscope( istream& sourceFile){char next;sourceFile.get(next);while ( '#' != next ){cout << next;sourceFile.get(next);}}void Astro::horoscope(){ifstream infile;infile.open( "horoscope.dat");int c;// cusp == 0 case: dump signNumber - 1 horoscopes.for ( int i = 1; i < signNumber; i++)newHoroscope( infile );displayHoroscope( infile );cout << endl;//Enhancement, change from //cusp==0 case://so that// if (cusp == -1)// dump thru (signNumber - 2) horoscopes// else if(cusp == 1 )// dump thru (signNumber - 1) hororscopes// from this position,// display two horoscopes// return// this is the cusp = 0 case, as above.}Astro::Astro() // I prefer to use the class initializer list { // notation. This follows the textsignNumber = 0;// isCusp = 0; // for one of the enhancements I did not do }Astro::Astro( month birthday)//int signNumber( month birthday ) // to test this turkey// looks up and sets the sign number,{switch( birthday.month ){case 1:if (birthday.day <= 19) signNumber = capricorn;else signNumber = aquarius;// enhancement code will look like this in all the cases:// if ( 17 <= birthday.day && birthday.day < 19 )cusp = -1;// else if ( 19 < birthday.day && birthday.day <= 21 )cusp = -1; // else cusp = 0;//break;case 2:if ( birthday.day <= 18 ) signNumber = aquarius;else signNumber = pisces;break;case 3:if ( birthday.day <=20 ) signNumber = pisces;else signNumber = aries;break;case 4:if ( birthday.day <= 19 ) signNumber = aries;else signNumber = taurus;break;case 5:if (birthday.day <= 20 ) signNumber = taurus;else signNumber = gemini;break;case 6:if (birthday.day <= 21 ) signNumber = gemini;else signNumber = cancer;break;case 7:if (birthday.day <= 22 ) signNumber = cancer;else signNumber = leo;break;case 8:if (birthday.day <= 22 ) signNumber = leo;else signNumber = virgo;break;case 9:if (birthday.day <= 22 ) signNumber = virgo;else signNumber = libra;break;case 10:if (birthday.day <= 22 ) signNumber = libra;else signNumber = scorpio;break;case 11:if (birthday.day <= 21 ) signNumber = scorpio;else signNumber = sagittarius;break;case 12:if (birthday.day <= 21 ) signNumber = sagittarius;else signNumber = capricorn;break;default: cout << "no such month as " << birthday.month<< " Aborting " << endl;exit(1);break;}}int main(){month birthday;cout << "Any non-digit in the month field will terminate the program." << endl;cout << "Enter birthday in numeric form: month day, as 12 5 : "<< endl;cin >> birthday.month >> birthday.day;do{cout << birthday.month << " " << birthday.day;Astro user(birthday);user.horoscope();cout << "Enter birthday in numeric form: month day, as 12 5: " << endl; cin >> birthday.month >> birthday.day;} while ( cin );}Test Data and Runs.Space restrictions prohibit including a complete horoscope here for each Sun Sign. I have created an abbreviated test file for Horoscopes. (The carriage return at the start of the file is necessary to obtain acarriage return before the Aries horoscope.)$cat horoscope.dat1 Aries#2 Taurus#3 Gemini#4 Cancer#5 Leo#6 Virgo#7 Libra#8 Scorpio#9 Sagittarius#10 Capricorn#11 Aquarius#12 Pisces#A shortened typical run with the test data file following:a.out < data | lessTest data: first entry is the month, second is the day:cat data1 191 201 212 182 19several dates omitted10 2411 2011 2111 2212 2112 2212 23Output from this run:Enter birthday in numeric form: day month, as 12 5:1 1910 CapricornEnter birthday in numeric form: day month, as 12 5:1 2011 AquariusEnter birthday in numeric form: day month, as 12 5:1 2111 AquariusSeveral lines of output have been deleted.Enter birthday in numeric form: day month, as 12 5:12 219 SagittariusEnter birthday in numeric form: day month, as 12 5:12 2210 CapricornEnter birthday in numeric form: day month, as 12 5:12 2310 CapricornEnter birthday in numeric form: day month, as 12 5:4. Modify Horoscope// File: ch3.4.cpp// Modify File: ch3.3.cpp//// Modify Project 3 to request the user's birthday then// to display the three most compatible astrological signs// (having the same Element)//// Elements are Earth, Air, Fire, and Water,// Fire signs are Aries, Leo, Sagittarius// Earth signs are Taurus, Virgo, Capricorn// Air signs are Gemini, Libra, Aquarius// Water signs are Cancer, Scorpio, Pisces//// Known Bugs:// Day number is only partially verified. Program aborts if the// day number > 31. No further checking is done for day input errors // such as Feb 29 on non-leap-years or April 31.// Enhancements suggested from #3 are not implemented. Hints// on how to do the enhancements are given in strategic places// in comments.// Program: file: // Requires file "horoscope.dat" having structure// lines of text// #// lines of text。
一、单项选择题(每题1.5分,计30分)1.B2.B3.D4.A5.B6.A7.C8.D9.C 10.A11.A 12.A 13.B 14.C 15.C16.B 17.D 18.D 19.B 20.D二、多项选择题(每题2分,计10分)1.ABCF2.ABCDE3.ACD4.ABCD5.ABD三、判断题(每题1分,计15分)1. 错2. 对3.错4. 错5. 对6. 错7.错8. 对9. 错10.错11.对12.错13.错14.对15.错四、简答题(6题,计45分)1.请列举类关系图中的各种关系,并画出其UML图形表示。
(4分)答:类关系图中主要存在组合、聚合、泛化、实现四种关系组合、聚合、泛化、实现2、根据要求画出用例图(10分)在图书管理系统中,管理员可以进行“删除书籍”和修改“修改书籍信息”这两个操作,并且这两个用例与“图书查询”用例之间是一种包含关系:即不管删除数据还是修改书籍信息,都必须先进行该书籍信息的查询工作,请画出描述该业务的用例图删除书籍图书查询修改书籍3、简述面向对象技术发展的动因。
(8分)答:面向对象开发方法一改过去传统的以功能分析为基础的面向过程的结构化分析与设计方法,面向对象开发方法模拟人们理解和处理客观世界的方式来分析问题,把系统视为一系列对象的集合,其面向对象的设计又将分析的结果映射到某种面向对象实现工具的结构上,使映射过程有着比较直接的对应关系,使分析者、设计者和编程者都可使用相同的概念,从而使面向对象的软件开发能比较自然地模拟客观世界的活动,使问题描述空间与解空间在结构上尽可能一致。
因此,采用面向对象方法可以更有效地开发大型软件系统。
面向对象方法的封装、继承、多态等机制不仅支持软件复用,而且使软件维护工作可靠有效,可实现软件系统的柔性制造,更好地克服软件危机。
4、如何实现运行时多态(5分)。
答:在类层次结构的不同类中,将函数名相同但实现功能不同的函数定义为虚函数。
第三章习题及参考答案1、用逐步求精方法解决下述得更新顺序主文件得问题。
美国某杂志社需要一个软件,以更新存有该杂志订户姓名、地址等数据得顺序主文件。
共有插入、修改与删除等3种类型得事务,分别对应于事务代码1、2与3。
也就就是说,事务类型如下:类型1:INSERT(插入一个新订户到主文件中)类型2:MODIFY(修改一个已有得订户记录)类型3:DELETE(删除一个已有得订户记录)事务就是按订户名字得字母顺序排序得。
如果对一个订户既有修改事务又有删除事务,则已对那个订户得事务排好次序了,以便使修改发生在删除之前。
2.分析图3、1所示得层次图,确定每个模块得内聚类型。
3.分析图3、2,确定模块之间得耦合类型。
在图3、2中已经给模块之间得接口编了号码,表3、1描述了模块间得接口。
4、假设您在一所职业高中工作,负责该校信息系统得建设与维护。
财务科长请您研究用学校拥有得微型计算机生成工资明细表与各种财务报表得可能性。
请详细描述您用结构化分析方法分析上述问题得过程。
用面向数据流方法设计工资支付系统得软件结构。
5.用3种方法计算图3、3所示流图得环形复杂度。
6、图3、4就是用程序流程图描绘得程序算法,请把它改画为等价得盒图。
7、某交易所规定给经纪人得手续费计算方法如下:总手续费等于基本手续费加上与交易中得每股价格与股数有关得附加手续费。
如果交易总金额少于1000元,则基本手续费为交易金额得8、4%;如果交易总金额在1000元到10000元之间,则基本手续费为交易金额得5%,再加34元;如果交易总金额超过10000元,则基本手续费为交易金额得4%加上134元。
当每股售价低于14元时,附加手续费为基本手续费得5%,除非买进、卖出得股数不就是100得倍数,在这种情况下附加手续费为基本手续费得9%。
当每股售价在14元到25元之间时,附加手续费为基本手续费得2%,除非交易得股数不就是100得倍数,在这种情况下附加手续费为基本手续费得6%。
Object-Oriented Software Engineering: Using UML, Patterns, and Java: Solutions to Exercises3. Project Communication: Solutions3-1What is the difference between a role and a participant?A participant is an individual. A role corresponds to a set of responsibilities. A single participant can assume many roles. Some roles may be shared among more than one participant.3–2Can a role be shared between two or more participants? Why or why not?Some roles are assigned to more than one participant. For example, a team of developers can be assigned to the same subsystem. Other roles, such as chief architect or project manager, can only be assigned to a single participant in the project. In the end, the issue is one of assigning clear and non-overlapping tasks to single participants: When two or more participants are responsible for exactly the same task, none of them will feel personally responsible for the success of the task.3–3What is the difference between a client and an end user?The client contracts the development of a system. The client is responsible for defining the scope of the system and for financing the project. The end users are the participants who actually uses the system to accomplish their work. In some project, the role of end user and client may be shared by the same participant. In general, however, this is not the case.3–4To which roles would you assign the following tasks?•Change a subsystem interface to accommodate a new requirement. [system architect]•Communicate the subsystem interface change to other teams. [API engineer (liaison)]•Change the documentation as a result of the interface change. [editor]•Design a test suite to find defects introduced by the change. [tester]•Ensure that the change is completed on schedule. [project manager or team leader]3–5You are responsible for coordinating the development of a system for processing credit applications for a bank.In what roles would the following project participants be able to contribute most to the project?• a bank employee responsible for processing credit applications [end user]•the manager of the information technology group at the bank, who contracted the system [client]• a free-lancer who developed similar systems in the past [developer]• a technical writer [editor]3–6Draw a UML activity diagram representing the meeting process described in Section 3.4.3. Focus in particular on the work products generated before and after the meeting, such as the agenda and the meeting minutes. Use swimlanes to represent roles.Figure 3-1 depicts an example solution. This exercise tests the student’s knowledge of the meeting process and of activity diagrams described in Chapter 2.3–7What is the difference between a work package and a work product?A work package is a description of work. A work product is the actual result of work (e.g., a document, a pieceof code, etc.).When is a work package defined?During planning.Consider an assignment where two students collaborate to plan and develop a system for sorting lists of names using two different sort algorithms. The deliverables for the assignment are the source code, the system documentation, and a manual for other developers explaining how new sorting algorithms can be integrated into the code. Give examples of work packages and work products in this project.Examples of work packages:•Plan developmentObject-Oriented Software Engineering: Using UML, Patterns, and Java: Solutions to ExercisesFigure 3-1An example meeting process (UML activity diagram).•Define and document interface between system and sort algorithms•Implement algorithms•Document systemExamples of work products:•development plan•source code•system documentation•manual for explaining how to integrate new sorting algorithms3–8What is the difference between a cross-functional team and a subsystem team? Provide examples and justify your choices.Object-Oriented Software Engineering: Using UML, Patterns, and Java: Solutions to ExercisesA subsystem team is completely responsible for the development of a subsystem.A cross-functional team is made out of liaison of subsystem teams and is responsible for support tasks, such as documentation and configuration management. Also, the system architecture can is often defined by a cross-functional team made out of liaison from all subsystem teams.3–9As many critical communication events are planned (e.g., client reviews, project reviews, peer reviews), why is there still a need for unplanned communication events (e.g., request for clarification, request for change, issue resolution)?There are many reasons for unplanned communication. Some of the more important ones are:•Reduce latency: While developers could wait for the next project review to request clarification on their tasks or on interfaces provided by other teams, this would slow down development significantly and introduce much rework (e.g., correcting code that was developed under incorrect assumptions).•React to unexpected events: Any system of a realistic size cannot be completely specified and understood a priori. This results in requirements and design changes during development, which often have to becommunicated and negotiated among several stakeholders. While change processes can be set in place to manage this communication, much unplanned and informal communication complements the formal communication events to motivate, clarify, understand, gauge, and negotiate the underlying issues introduced by the change.•Team building: Formal communication events are rarely conducive to a team atmosphere. It is during unplanned and informal events that participants get know each other and form a community working towards a common goal.3–10Select a random working day in your work week. Log all activities that qualify as communication activities(e.g., talking to friends over coffee, obtaining information from a fellow student, providing information,negotiating, advertising, browsing the web). Which fraction of your working day does communication represent?Typically, the fraction of the day spent of communication can easily reach 50% or more. However, there will be a wide variance in the numbers reported by the students, depending on whether or not they are currently doing project work.3–11You are a member of the user interface team. You are responsible for designing and implementing forms collecting information about users of the system (e.g., first name, last name, address, E-mail address, level of expertise). The information you are collecting is stored in the database and used by the reporting subsystem.You are not sure which fields are required information and which are optional. How do you find out?This is an open-ended question whose purpose is to have the student think of all the communication paths available. The side effect of this question is that the student will also have to think about the information sources associated with a project. A correct answer should contain at least two of the following points:•The user interface team member should first check the requirements analysis document, described in Chapter 1.•If the answer is not in the requirements analysis document, or if the answer is not clear, the document is incomplete or does not exist yet, in which case the user interface team member should ask the responsible analyst on the project. This is a request for change or a request for clarification.•If the analyst does not have the answer, he or she should investigate with a potential user and possibly get approval from the client. This is also a request for clarification.•In all cases, the answer should eventually make its way into the requirements analysis document.3–12You have been reassigned from the user interface team to the database team due to staff shortages and replanning. The implementation phase is well underway. In which role would you be most proficient given your knowledge of the user interface design and implementation?Liaison of the database team to the user interface team.Object-Oriented Software Engineering: Using UML, Patterns, and Java: Solutions to Exercises3–13Assume the development environment is Unix workstations, and the documentation team uses the Macintosh platform for writing documentation. The client requires the documents to be available on Windows platforms.Developers produce the design documentation using FrameMaker. The documentation team uses Microsoft Word for the user-level documentation. The client submits corrections on hardcopies and does not need to modify the delivered documents. How could the information flow between the developers, the technical writers, and the client be set up (e.g., format, tools, etc.) such that duplication of files is minimized while everybody’s tool preferences and platform requirements are still satisfied?This is a simple real life question with complicated answers. Several approaches are possible, including:•The project uses a printable format as a standard interchange format, such as Postscript or PDF (Portable Display Format). This allows every participant to access and view documents. Only the author of a document is able to make changes, however. This makes it difficult to move the document responsibility to move from one team to another (e.g., from a subsystem team to the documentation team).•The project uses an interchange format such as RTF or XML for all documents. Both formats are recognized by recent versions of both Microsoft Word and FrameMaker. This allows document responsibilities to be transferred between developers and technical writers. Unfortunately, this is currently not a practical solution as both tools understanding of the interchange formats is different and imperfect, resulting in some loss of formatting.3–14Which changes in the organization and communication infrastructure would you recommend for a successor of the Ariane 5 project as a consequence of the Ariane 501 failure described at the beginning of this chapter?This is an open-ended question as many solutions exist and detailed knowledge of the current team organization are not available. Note that this question is only interested in communication or organizational changes, not technical or methodological changes. A correct answer could include the following points:•Increase communication between the team responsible for system testing and the software developers. This can be done by introducing liaisons on both teams.•Increase communication between the team responsible for unit testing and for system testing.•Change documentation requirements for reused components.。