对象和对象 [英] Object and objects
问题描述
你好,
我还是不明白!
让我们说我们有一些人...... ..有些人有车。
我们拥有的物品是人。和汽车。
人
- 创建人
- Haves汽车
汽车
- 创建汽车
如何查看(保存)哪些人有哪些汽车?
能否请给我一个工作实例???
我希望我能把它当作OO的基础知识。
谢谢!
这听起来更像是应该存储在数据库中的信息所以
很容易被查询。
我不认为你问的是OO编程的一个好例子
是什么。 />
" Arjen" <博***** @ hotmail.com>在消息中写道
news:bt ********** @ news4.tilbu1.nb.home.nl ...你好,>
我仍然没有得到它!
让我们说我们有一些人......有些人有车。
我们的对象是人和汽车。
人
- 创造人物
- Haves汽车
汽车
- 创造汽车
我怎样才能看到(保存)哪些人拥有哪些车?
你能给我一个工作实例吗?
>我希望我能把它当作OO的基础知识。
谢谢!
Arjen写道:
< blockquote class =post_quotes>如何查看(保存)哪些人拥有哪些车?
Person类有一个Car属性,如果他们没有,将返回null
有车。
我希望我得到了OO的基础知识。
我想你希望从这么简单的例子中获得更多的东西。
-
有10种人。那些懂二元的人和那些没有b $ b的人。
http://code.acadx.com
(拉针回复)
在互联网上我找不到我想要知道的东西。
我想在数组内部的应用程序中保存东西。
之后我想去序列化。
Hello,
I still don''t get it!
Let''s say that we have some persons.... some persons have a car.
The objects that we have are "person" and "car".
"Person"
-- Create person
-- Haves car
"Car"
-- "Create car"
How can I see (save) which persons have which cars?
Can you please give me an working example???
I hope that I get it the basics of OO then.
Thanks!
This sounds more like information that should be stored in a database so it
can be easily queried.
I don''t think what you are asking is a good example of what OO programming
is about.
"Arjen" <bo*****@hotmail.com> wrote in message
news:bt**********@news4.tilbu1.nb.home.nl...Hello,
I still don''t get it!
Let''s say that we have some persons.... some persons have a car.
The objects that we have are "person" and "car".
"Person"
-- Create person
-- Haves car
"Car"
-- "Create car"
How can I see (save) which persons have which cars?
Can you please give me an working example???
I hope that I get it the basics of OO then.
Thanks!
Arjen wrote:
How can I see (save) which persons have which cars?
The Person class has a Car property which will return null if they do not
have a car.
I hope that I get it the basics of OO then.
I think you''re hoping for a bit much from such a simple example.
--
There are 10 kinds of people. Those who understand binary and those who
don''t.
http://code.acadx.com
(Pull the pin to reply)
On the internet I cannot find exactly what I want to know.
I want to save thing inside the application inside arrays.
After that I want to go to serialization.
这篇关于对象和对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!