C
C#2y ago
LeviCoding

❔ I'm stuck with Polymorfism

So In my program we have a class Persoon and a class student and class leerkracht. a student and leerkracht is a persoon. I need to keep a list of personen and leerkrachten. I can implement student but not leerkracht. Can someone help. If you see code you will understad
9 Replies
SG97
SG972y ago
no one's going to download a zip generally, use $paste
MODiX
MODiX2y ago
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
LeviCoding
LeviCodingOP2y ago
Ok, I was already expecting this xp
LeviCoding
LeviCodingOP2y ago
BlazeBin - phiaqtullymo
A tool for sharing your source code with the world!
LeviCoding
LeviCodingOP2y ago
this works? Could not add all the classes, but the problem is that School.Personen.Add(new Leerkracht("Danny")); not works Probably the problem is in the School class or Persoon class? I'm not ssure
this_is_pain
this_is_pain2y ago
but you have defined the array as Student, not as Person
LeviCoding
LeviCodingOP2y ago
In school? Damn I'm stupid indeed Thx @dont
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.

Did you find this page helpful?