473,708 Members | 2,377 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dont really understand Aggregation exercise..

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
Jul 22 '05 #1
10 1784
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?
Jul 22 '05 #2
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 "aggregatio n"
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.
Jul 22 '05 #3
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_shu ffle 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
"aggregatio n". You should probably just politely ignore that and
use classes that contain other classes in the ordinary manner.

Jul 22 '05 #4
"Victor Bazarov" <v.********@com Acast.net> wrote in message
news:Zt******** ********@newsre ad1.dllstx09.us .to.verio.net.. .
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?


Yes but I ddin't really understand half the words that came out his mouth..
let alone what he was on about...
Jul 22 '05 #5
"Simon Mansfield" <gl************ @ntlworld.com> wrote in message
news:41******** **************@ news.zen.co.uk. ..
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/...C++/Exercises/
Exercise%208/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!


It looks reasonably clear to me, although I don't agree with the alternative
of creating cards dynamically (you can have a dynamic collection such as a
vector or a list without having to use pointers to the actual cards; it's an
unnecessary complication).

It's not enough to say that you don't understand what is required. Are you
saying that you don't understand a word of it? Can you at least do the card
class? Do as much of it as you can, post your code, and then ask _specific_
questions about what you need help with.

DW
Jul 22 '05 #6
On Wed, 15 Dec 2004 00:28:50 +0100 in comp.lang.c++, Jacek Dziedzic
<ja************ *@janowo.net> wrote,
The only thing that I don't comprehend is how a full deck of
cards can have "all the 56 cards".


14*4. Counting only the minor arcana, of course.
http://www.google.com/search?q=minor+arcana

Jul 22 '05 #7
Simon Mansfield wrote:
"Victor Bazarov" <v.********@com Acast.net> wrote in message
news:Zt******** ********@newsre ad1.dllstx09.us .to.verio.net.. .
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?

Yes but I ddin't really understand half the words that came out his mouth..
let alone what he was on about...


Did he know that you didn't understand half the words? Why are we having
this conversation? Your tutor is probably paid, in that case why should
we do his job? Or he's not paid (in that case you should find another
tutor for one-on-one interaction). How can we help, off-line like this?
What do you expect from the newsgroup? If you don't understand the task,
how can we help you understand? You need to sit down with somebody to
talk about the exercise and what _exactly_ you don't understand there.
A newsgroup is too slow for that kind of interaction.

So, as was alluded by other posters, try to concentrate on the part that
you _do_ understand. Do as much as you can, then ask specific questions.

What is required? To write a program. How to do it? By using what you
already know. There are even specific steps: "Define a class", "Write
test code", "Create a Deck class", "Implement such and such method"...
What's there not to understand? If you don't understand how to "define
a class", go back to your textbook...

V
Jul 22 '05 #8
"Simon Mansfield" wrote:
Have you asked your tutor for some clarification?


Yes but I ddin't really understand half the words that came out his
mouth.. let alone what he was on about...


Try using Wikipedia to reduce the jargon to ordinary English. Unfortunately
it doesn't have "stub function", which I thought might be a problem. A stub
function is one with an empty body, e.g.:

int foo(double x)
{
}

You can compile it and call it, but nothing happens when you do.

I thought the question was phrased about as well as could be expected,
except for the 56, which has already been mentioned. Just dig in and start
writing, when you get hung up ask a specific question.
Jul 22 '05 #9
David Harmon wrote:
On Wed, 15 Dec 2004 00:28:50 +0100 in comp.lang.c++, Jacek Dziedzic
<ja************ *@janowo.net> wrote,
The only thing that I don't comprehend is how a full deck of
cards can have "all the 56 cards".

14*4. Counting only the minor arcana, of course.
http://www.google.com/search?q=minor+arcana


Thank you,
- J.

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1606
by: Merlin | last post by:
Hi Imagine the following classes (A class diagram will help) BASE, A, B, C, D, E, F, G. A, B, C, D, G inherit from BASE. E, F inherit from D.
1
2916
by: Nice Chap | last post by:
Aggregation in COM was defined as 'Exposing an interface of an inner object by the outer object as though it were an interface of the outer object'. Is this type of aggregation possible in c#? For example... Class COuter - 'Contains' an instance variable of type CInner Class CInner - Implements IList Can COuter be made to look like its implementing IList?
4
10965
by: cmrchs | last post by:
Hi, how do I implement aggregation and how composition in C# ? When I say : an Airplane has a Pilot then I use aggregation but when I say : an Airplane has a Cockpit then I use composition. How do I implement the difference in C# ? Here's what I try : class Pilot
2
2625
by: Jozsef Bekes | last post by:
Hi, I would like to implement aggregation in C#, therefore I'd need to implement the queryinterface COM function of a class. I am not sure whether this can be done, and if yes where to start. If someone has an example, a hint or anything that might help, please share it with me. Thanks and Regards, Jozsi
23
2120
by: SenthilVel | last post by:
Hi Can any one let me know the websites/Pdf for learning Aggragation in C#?? Thanks Senthil
7
15194
by: Bruce One | last post by:
In C#, how would people implement a relationship between Customer class and Request class, considering a customer may have 0-n requests and a request must belong to 1 and only 1 customer...? Would about the following options? OPTION 1 -------------------------- public class Customer() { private int CustomerID;
5
2361
by: isetea | last post by:
Hi, I'm working on a access database to automate our Staff procedures a bit. One part is to select several informations from a table and to aggregate some of the outputs. For example: 50 people are in the department 45 are current staff (15 business adviser, 15 financial planner and 15 sales officer) 3 are on extended leave (1 business adviser and 2 financial planner) 1 is resigned (1 sales officer) and 1 moved to another department (1...
0
1244
by: Karigar | last post by:
I have been so far developing COM servers and clients in C++. I am new to C#/NET way of doing COM and was wondering if it is possible to accomplish aggregation in .NET platform. By aggregation I mean classic COM aggregation in which the outer object controls which interfaces it of inner object it exposes, and to the outside world it appears as the inner object without having to implement all the interfaces. By aggregation I do not mean a...
2
14826
by: Gary Wessle | last post by:
Hi what is the difference "in code writing" between aggregation and composition? is the following correct? aggregation (life time of both objects are independent). class A{ /* ... */ }; class B{ A& a; /* ... */};
0
9158
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7921
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6615
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5939
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4454
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3151
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2508
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2096
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.