How to program this in c++

I already made three classes

Werknemer
VasteKracht (derived)
manager (derived)

Im currently stuck at trying to make this into code
image: HRbLp

How do I get manager to contain multiple werknemers
code looks like this
Comments
17
vastekracht
verkracht
VasteKracht* LoL
vid_restart bug
In java:

class VasteKracht extends Werknemer {
}

class Manager extends Werknemer {
private List<WerkNemer> werknemers;
}
thanks :)
do you know the english name for the relation between werknemer and manager?
Parent
In c++ you can use stl, then it's pretty much the same - at top #include <list>
and then:

public std::list<WerkNemer> werknemers;

you can omit std:: by "using std" or "using std::list", but it's not always recommended. It has all the shit like push pop etc: http://www.cplusplus.com/reference/stl/list/ . Though list is not always recommended performance-wise, there are also vectors, normal arrays and some other stuff.
Parent
Cool to know bro.
Parent
I have a C++ final today also mate!
But it's only an introduction.
C###

get life nerd

###C

seems like one of many solutions
ask lady
it would be easier to understand what you are doing for us if you wrote these names in english so i am not totally sure of the Q though.. The diagram suggests a 1 worker to many managers relationship?

Either way, whether you are storing managers in the worker object, or vice versa, you will have an array of class objects in one of the classes, which should have CRUD functionaly (create, read, update delete) for easy operations. These would be public methods which manipulate the private/protected object array.

can't help more because of this weird language shit.
In PHP I could do so:
class VasteKracht {
//
}

class Manager {
//
}

class Werknemer extends Manager {
//
}
superclasses
Back to top