【中级】软件设计师

考试试题

[填空题]Designing object-oriented software is hard,and designing(  )object-oriented software is even harder.You must find pertinent(相关的)objects,factor them into class at the rightgranularity,define class interfaces and inheritances,and establish key relationships among them.You design should be specific to the problem at hand,but also(  )enough to address future problems and requirements.You also want to avoid redesign,or atleast minimize it.Experienced object-oriented designers will tell you that a reusable and flexible design is difficult if not impossible to get"right"the first time.Before a design is finished,they usually try to reuse it several times,madifring it each time.Yet experienced object-oriented designers do make good designs.Meanwhile new designers are(  )by the options available and tend to fall back on non-object-oriented techniques they're used before.lt takes a long time for movies to learn that goodobeject-oriented design is all about.Experienced designers evidently know something inexperiencedones.What is it One thing expert desigeners know not to do is solve every problem from first principles.Rather,theyreuse solutions that have worked for them in the past.When they find a good(  ).They use it aqain and again.Such experience is part of what makes them experts.Consequently,you'll find(  )patterns of classes and communicating objects in many object-oriented systems. (1)A.runnable B.right C.reusable D.pertinent (2)A.clear B.general C.personalized D.customized (3)A.excited B.shocken C.surprised D.overwhelmed (4)A.tool B.component C.system D.solution (5)A.recurring B.right C.experienced D.past
[问答题]某客户信息管理系统中保存着两类客户的信息: (1)个人客户。对于这类客户,系统保存了其客户标识(由系统生成)和基本信息(包括姓名、住宅电话和E-mail) (2)集团客户。集团客户可以创建和管理自己的若干名联系人。对于这类客户,系统除了保存其客户标识(由系统生成)之外,也保存了其联系人的信息。联系人的信息包括姓名、住宅电话、E-mail、办公电话以及职位 该系统除了可以保存客户信息之外,还具有以下功能: (1)向系统中添加客户(addCustomer) (2)根据给定的客户标识,在系统中查找该客户(getCustomer) (3)根据给定的客户标识,从系统中删除该客户(removeCustomer) (4)创建新的联系人(addContact) (5)在系统中查找指定的联系人(getContact) (6)从系统中删除指定的联系人(removeContact) 该系统采用面向对象方法进行开发。在面向对象分析阶段,根据上述描述,得到如表2-5所示的类 表2-5 得到的各种类 类名说明 CustomerInformationSystem客户信息管理系统 IndividualCustomer个人客户 InstitutionalCustomer集团客户 Contact联系人 描述该客户信息管理系统的UML类图如图2-26所示 图2-26 客户信息管理系统的UML类图 【问题1】 请使用说明中的术语,给出图2-26中类Customer和类Person的属性 【问题2】 识别关联的多重度是面向对象建模过程中的一个重要步骤。根据说明中给出的描述,完成图中的(1)~(6) 【问题3】 根据说明中的叙述,抽象出如表2-6所示的方法,请指出图2-26中的类CustomerInformationSystem和InstitutionalCustomer应分别具有其中的哪些方法 表2-6 抽象出的方法