OOAD_Lec01_Introduction.ppt

  1. 1、本文档共55页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* OOAD and UML: 一种表达设计思想的工具 OOAD and C++/C#/Java: 一种工具,实现设计思想 OOAD and Design pattern: 现有的、比较好的针对问题的解决方案 OOAD and System: 最终目的是提交一个用户满意、高质量的系统. * * * !电子版教材, 也有对应的中文版 Chinese version: UML 和模式应用 * 20%? 5次*4分 10% 5次*2分 * * 面向过程就是分析出解决问题所需要的步骤,然后用函数把这些步骤一步一步实现,使用的时候一个一个依次调用就可以了。 面向对象是把构成问题事务分解成各个对象,建立对象的目的不是为了完成一个步骤,而是为了描叙某个事物在整个解决问题的步骤中的行为。 结构化编程:你要出门坐车,先写个穿鞋出门的方法,然后是走路的方法,然后是等车的方法,然后是上车买票的方法,做到哪写到哪 面向对象:把以上各种方法写成类,存起来。你出去坐车可以依次调用这些方法,下次你出去坐火车,飞机都可以直接调用这些方法 * * * * Method, attribute, object diagram? * 类和对象很少在同一张图中出现,所以可以根据类进行建模的大多数工作,而对象仅用于演示和验证。 It defines the common features of the objects, that is the operations and information structure. you can think of a class as a template from which objects are made An instance’s behaviour and information structure is defined in the class. Its current state (values of instance variables) is determined by operations performed on it. * * Association 实例化之后是link, 就没有multiplicity * * * * 简单地讲, 抽象(abstraction)就是过滤掉对象的一部分特性和操作,直到只剩下你所需要的属性和操作。 就是实现一个类所需要的方法和成员变量的实现(Implementation) 在这里OOP最终和POP(Procedure-OrientedProgramming)相融合 * 针对一组相似对象定义一个类作为生成对象的模板,类定义了对象的对外服务接口以及内部继承接口 * * * * Please prepare chapter 1 and 2 before next lesson. * Association Association lies in anywhere. * * buys Name ID Addres Age Person Name Addres Company * * multiplicity * Inheritance The basic principle is simple: A class gets the state and behaviour of another class and adds additional state and behaviour * * OOAD Lecture * * OOAD Lecture Inheritance Exercise: Draw the inheritance Figure, open figure, closed figure, line, square, polygon, oval, circle, triangle, * * How do you express inheritance in C++? ?class?Car?:?public?Vehicle?{ ?public: ???... ?}; We state the above relationship in several ways: Car is a kind of a Vehicle Car is derived from Vehicle Car is a specialized Vehicle Car is a subclass of Vehicle Car is a derived class of Vehicle Vehicle is the base class of Car Vehicle is the super class of Car * * Aggregation

文档评论(0)

sd44055 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档