Best container to store this information
Posted
by
user2368481
on Programmers
See other posts from Programmers
or by user2368481
Published on 2013-11-07T02:00:28Z
Indexed on
2013/11/07
4:12 UTC
Read the original article
Hit count: 199
I'm trying to write a smallish system as a homework excercise, I don't have much experience with containers and I'm not sure the best way of storing this data would be:
Incident Records object holds instants of Incident Report.
Report is a superclass which has 3 subclasses, Police, Fire or Medical.
Record must must record which of these types apply, and which response teams are to be involved.
So Record has to keep track of the Report objects, the type of the report (Police, Fire or Medical) and the teams involved in the reports.
I was initially thinking of an array but that wouldn't be sufficient to hold all the info.
Record<>---------Report<|----------Police, Fire or Medical
© Programmers or respective owner