什么时候创建课程? [英] When to create a class?

查看:170
本文介绍了什么时候创建课程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我应该满足程序的哪些条件才能选择将程序的特定部分封装到类中?
什么时候将一个班级分为两个单独的班级?

谢谢,

Hey all,

Which conditions of a program should be met for me to make the choice of encapsulating a particular part of it into a class?
When would you split a class into two seperate classes?

Thanks,

推荐答案

您可以根据何时执行此操作以及何时不使用内聚和耦合来进行判断.要进行良好的讨论,请参见此处 [
You could base your judgement on when to do this and when not using Cohesion and Coupling. For a good discussion, see here[^].


这篇关于什么时候创建课程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆