j*i
2 楼
I have the following classes: Atom, Molecule (contains atoms). I also have
the CoordinatedAtom class
which derives from Atom and contains position information. My
CoordinatedMolecule class should derive
from Molecule, but needs to contain CoordinatedAtom, instead of Atom. How
should I write the
CoordinatedMolecule class? I think this might be a common design problem.
What I'm thinking is that
whether I could define a member variable in CoordinatedMolecule that has the
same name as the base
class
the CoordinatedAtom class
which derives from Atom and contains position information. My
CoordinatedMolecule class should derive
from Molecule, but needs to contain CoordinatedAtom, instead of Atom. How
should I write the
CoordinatedMolecule class? I think this might be a common design problem.
What I'm thinking is that
whether I could define a member variable in CoordinatedMolecule that has the
same name as the base
class
D*a
4 楼
use template
Molecule
Molecule
the
【在 j****i 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: I have the following classes: Atom, Molecule (contains atoms). I also have
: the CoordinatedAtom class
: which derives from Atom and contains position information. My
: CoordinatedMolecule class should derive
: from Molecule, but needs to contain CoordinatedAtom, instead of Atom. How
: should I write the
: CoordinatedMolecule class? I think this might be a common design problem.
: What I'm thinking is that
: whether I could define a member variable in CoordinatedMolecule that has the
: same name as the base
Molecule
Molecule
the
【在 j****i 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: I have the following classes: Atom, Molecule (contains atoms). I also have
: the CoordinatedAtom class
: which derives from Atom and contains position information. My
: CoordinatedMolecule class should derive
: from Molecule, but needs to contain CoordinatedAtom, instead of Atom. How
: should I write the
: CoordinatedMolecule class? I think this might be a common design problem.
: What I'm thinking is that
: whether I could define a member variable in CoordinatedMolecule that has the
: same name as the base
K*n
8 楼
是不是要练到programming版的问题都能答出来才行?
l*g
9 楼
我是CS的
但是我想在本校修一个统计的master........
但是我想在本校修一个统计的master........
相关阅读
被亚马逊绑架的问题第一个go项目快上线了在药厂做大数据平台有前途吗?windows的file search怎么做的这么烂有人用百度的echart吗,github七千星求解:socket client用node.js, socket server用c++dotnet可以用NPM,Bower吗?iOS类似Picasso这样的库哪个最好T倒了以后就靠D来撑Scala了?谁能推荐剖析SQL/NoSQL本质区别的文章?c的问题(2)这里有几个程序猿, 说谢谢我的提醒win10 看起来还是怪怪的我溜须拍马的跟风赞下好虫cluster环境里怎么做测试怎么做个文件的 index, 比如archive 这样的感叹一下,除了能力之外的资本为0干货:2015年中国互联网行业薪酬报告 (转载)问一个Git的问题热门技术系统学习,求指导