Most books don't go into how to code one to many relationships. They just
seem to basically cover one to one. Can some one point me out how to guide
me to a link on the net where I can get more information.
By they way I found a book that covered a bit on it but i am confused with
...UnboundedSetByValue in the following examples shown in the book.
LISTING 2.9. THE ApartmentBuilding CLASS DECLARATION
// Tenant
#include “Tenant.h”
class ApartmentBuilding
{
public:
ApartmentBuilding();
~ApartmentBuilding();
.. . .
//## Association: Unnamed
//## Role: ApartmentBuilding::Houses
const UnboundedSetByValue<Tenant> get_Houses() const;
void set_Houses(const UnboundedSetByValue<Tenant> value);
private:
UnboundedSetByValue<Tenant> Houses;
};
LISTING 2.8. THE Tenant CLASS DECLARATION
// ApartmentBuilding
#include “AprtmntB.h”
class Tenant
{
public:
Tenant ();
~Tenant ();
.. . .
//## Association: Unnamed
//## Role: Tenant::Lives at
const ApartmentBuilding get_Lives_at() const;
void set_Lives_at(const ApartmentBuilding value);
private:
ApartmentBuilding Lives_at;
};
-----------