不要真的了解聚合练习.. [英] Dont really understand Aggregation exercise..

查看:62
本文介绍了不要真的了解聚合练习..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的导师给出了一份练习清单,其中一个是

这个:

http://www.cems.uwe。 ac.uk/~amclymer/.../Exercise.html


我发现很难理解需要什么以及如何使用
完全是这样做的..任何想法/想法都会得到很好的收获!


Global_Inferno

解决方案

Simon Mansfield写道:

我的导师给出了一份练习清单,其中一个是
[...]
我找到的很难理解需要什么,以及如何完成它......任何想法/想法都会得到很好的收获!




你有没有问过你的导师要澄清一下吗?


Simon Mansfie ld写道:

我已经给了我的导师做的练习清单,其中一个是
这个:

http:// www。 cems.uwe.ac.uk/~amclymer/.../Exercise.html

我发现很难理解需要什么以及如何准确地做什么它......任何想法/想法都会得到很好的收获!




好​​吧,它看起来非常简单。尝试在教科书中查找聚合

。关于这个问题的思考 - 从一张卡开始,然后

想到一个甲板,这应该让你感动。


我唯一不喜欢的东西要理解的是,一张完整的牌照可以拥有所有56张牌。


- J.


2004年12月14日星期二23:00:53 -0000 in comp.lang.c ++,Simon

Mansfield < GL ************ @ ntlworld.com>写了,

我的导师给出了一份练习清单,其中一个是
这个:

http://www.cems .uwe.ac.uk / ~amclymer /.../ Exercise.html

我发现很难理解需要什么以及如何确切地去做..任何想法/想法都会得到很好的收获!




1.你对你理解的部分的具体了解更多

,你的问题是什么,你得到的帮助就越大。


2.我认为首先教授方法是不好的想法

是现实生活中真正的C ++程序员的首选。所以,在创建你自己的动态操作数组之前,你应该

熟悉std :: vector并且总是使用它,除非它不合适

由于某种原因。同样地使用std :: random_shuffle进行所有

改组,除非由于某种原因它不合适。


3.做什么:写一些代码。不要尝试在

做一切,但是在每一步之后进行编译和测试。如果您的代码没有工作,请记得在询问

问题时在此处发布相关的摘录。 Marshall Cline的C ++ FAQ中介绍了这个问题。在发布之前检查常见问题解答总是好的。
总是很好。您可以在以下网址获取常见问题解答

http: //www.parashift.com/c++-faq-lite/

4.你的教练显然有一个关于

& ;聚合" ;.您可能只是礼貌地忽略它并且

使用以普通方式包含其他类的类。


I have been given a list of exercises to do by my tutor, one of which is
this:

http://www.cems.uwe.ac.uk/~amclymer/.../Exercise.html

Which i am finding very difficult to understand what is required and how
exactly to do it.. Any thoughts/idea''s will be greatfully recieved!

Global_Inferno

解决方案

Simon Mansfield wrote:

I have been given a list of exercises to do by my tutor, one of which is
[...]
Which i am finding very difficult to understand what is required and how
exactly to do it.. Any thoughts/idea''s will be greatfully recieved!



Have you asked your tutor for some clarification?


Simon Mansfield wrote:

I have been given a list of exercises to do by my tutor, one of which is
this:

http://www.cems.uwe.ac.uk/~amclymer/.../Exercise.html

Which i am finding very difficult to understand what is required and how
exactly to do it.. Any thoughts/idea''s will be greatfully recieved!



Well, it looks pretty straightforward. Try looking up "aggregation"
in your textbook. Ponder on the problem -- start with a Card, then
think of a Deck, this should get you moving.

The only thing that I don''t comprehend is how a full deck of
cards can have "all the 56 cards".

- J.


On Tue, 14 Dec 2004 23:00:53 -0000 in comp.lang.c++, "Simon
Mansfield" <gl************@ntlworld.com> wrote,

I have been given a list of exercises to do by my tutor, one of which is
this:

http://www.cems.uwe.ac.uk/~amclymer/.../Exercise.html

Which i am finding very difficult to understand what is required and how
exactly to do it.. Any thoughts/idea''s will be greatfully recieved!



1. The more specific you are about what part you _do_ understand
and what your questions are, the better the help you will get.

2. I think it''s a bad idea to teach methods first that would not be
the first choice of a real C++ programmer in real life. So, before
creating your own dynamically manipulated array, you should be
familiar with std::vector and use it always unless it is unsuitable
for some reason. Likewise use std::random_shuffle for all your
shuffling unless it is unsuitable for some reason.

3. What to do: write some code. Don''t try to do everything at
once, but compile and test after each step. If your code doesn''t
work, remember to post relevant excerpts of it here when asking
questions. This issue is covered in Marshall Cline''s C++ FAQ. It
is always good to check the FAQ before posting. You can get the FAQ
at: http://www.parashift.com/c++-faq-lite/

4. Your instructor apparently has a tic about the word
"aggregation". You should probably just politely ignore that and
use classes that contain other classes in the ordinary manner.


这篇关于不要真的了解聚合练习..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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