当前位置:网站首页>类的基础
类的基础
2022-07-23 16:15:00 【InfoQ】
抽象数据类型

良好的类接口
类接口应展现一致的抽象层次


一定要理解类所实现的抽象是什么
把不相关的信息转移到其他类
尽量让接口可以编程,而不是靠注释表达语义
谨防修改类时破坏类接口的抽象
同时考虑抽象性和内聚性
良好的封装
尽可能的限制类成员的访问性
边栏推荐
- Sentinel introduction and microservice integration
- Past weaving of zero one-2022
- What happened behind kubectl's creation of pod?
- 物联网之Zigbee系统开发一(zigbee简介)[通俗易懂]
- Awk from introduction to earth (16) comprehensive case of awk
- Ubuntu 22.04 installing mysql8
- 大神“魔改”AirPods,配备USB-C接口,3D打印外壳让维修更容易
- Leetcode: Jianzhi offer II 115. reconstruction sequence [graph theory thinking + in degree consideration + topological sorting]
- Lin Zhiying is still in the intensive care unit and will undergo a second round of surgery: the police said he did not wear a seat belt
- Do you still have certificates to participate in the open source community?
猜你喜欢

SQLZOO——SELECT from Nobel Tutorial

【Coggle 30 Days of ML】糖尿病遗传风险检测挑战赛(2)

Sentinel introduction and microservice integration

rhcsa笔记五

20220721 积分环节的时频域分析

MySQL massive write problem optimization scheme MySQL parameter tuning

serialization and deserialization

Data crawling and display of e-commerce platform based on scratch

大佬在线复盘:我在训练 DALL·E 时犯过的错

Go medium high parallel communication mode: the underlying principle of channel pipeline
随机推荐
Specify the port number in topology.yaml
数据库建模
JVM – thoroughly understand and break the parental delegation mechanism
DDD: how to use domain driven design to avoid writing journal code
前置放大器和功率放大器有什么区别?
零一的昔日织-2022
MySQL事务,从redo log、bin log、undo log说起...
Detailed explanation of CO process principle in go
ubuntu22.04安装mysql8
What happened behind kubectl's creation of pod?
MySQL性能调优
MySQL performance tuning
防控调整后暑期市场井喷,途家、木鸟、美团暑期活动测评
平安过暑假,安全不放假!这些暑期安全小提示请收好
The Little Schemer-周而复始之Y组合子由来
Flutter 运行模式
JVM – 彻底理解打破双亲委派机制
分组加密模式 ECB、CBC、PCBC、CFB、OFB、CTR
Rhcsa Notes 6
变分法 (Calculus of Variations)