面向对象编程OOP的优点

1. Simplicity: software objects model real world objects, so the complexity is reduced and the program structure is very clear;

简单性: 因为面向对象语言里面的对象都是反映的真实世界的对象,所以复杂性就降低了而且程序结构也更加清晰;
2. Modularity: each object forms a separate entity whose internal workings are decoupled from other parts of the system;

模块性: 每一个对象都来源于一个单独的实体, 它内部的工作与系统的其他部分是分离的
3. Modifiability: it is easy to make minor changes in the data representation or the procedures in an OO program. Changes inside a class do not affect any other part of a program, since the only public interface that the external world has to a class is through the use of methods;

易修改性: 在面向对象程序中对数据表现层和工作过程进行小的改动是非常简单的, 类内部的改动不会影响程序的其他部分,因为外边的程序与这个类的交互是通过一个公开的接口方法进行的。只要这个方法不改动就不会影响交互。
4. Extensibility: adding new features or responding to changing operating environments can be solved by introducing a few new objects and modifying some existing ones;

可扩展性:在面向对象程序里面,添加新的功能只需要引入新的对象或者修改一下现存的对象。
5. Maintainability: objects can be maintained separately, making locating and fixing problems easier;

可维护性: 对象可以进行分别维护, 这样就使查找问题和修复问题变得简单了
6. Re-usability: objects can be reused in different programs

重用性:对象可以在不同的程序里面重用

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值