Timeline for Monty Hall simulation - OOP
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 5, 2021 at 18:05 | vote | accept | henryn | ||
Jun 5, 2021 at 18:05 | comment | added | henryn |
This is excellent, a very thorough answer. I like your suggestion of starting out by thinking about the visible behaviors before diving into code. Looking back at my initial implementation with that in mind (i.e. that a player does two things - pick a door and switch/stick), it looks to me like I was writing Contestant as a mini-procedural program rather than a class. I also didn't know about abstract classes and I really like how that works with defining each player, so I'll definitely look into that further. A lot to think about but all really helpful - thanks for your time!
|
|
Jun 5, 2021 at 16:57 | review | First posts | |||
Jun 5, 2021 at 20:55 | |||||
Jun 5, 2021 at 16:52 | history | answered | delphinus | CC BY-SA 4.0 |