Interview Test – Looking for feedback

Hi friends. Yesterday was my first programming interview ever. It went very well! I was so nervous going in, but it turns out they were looking for someone with a blank slate so that they could teach "their way of coding". When I was leaving they asked me to program a concept that would show them I’m capable of creating a CRUD program.
The description they provided me was to program a parking lot management system. It should contain a list of up to 100 members, and the lot can house no more than 100 members. I should have some sort of storage for those who have a membership to the lot. Those members should have information associated with them: Name, car make and model, car color, and license plate #.
I flow charted how I think I want to handle this problem, and wrote down some exceptions that I thought could happen.

1) Upon arriving at the gate, a member swipes their card. Their Member ID # is read.
2) Perform a bool on whether or not their status is “Checked in”.
3) If they’re checked in, remove them from the lot.
4) If they’re not checked in add them to lot.

I planned on using variables for the members and an array for the lot. The list of all my members are stored permanently somewhere else, I’m not sure how to do this part. I think I would need some sort of dictionary. The reporting functions can be covered with listing who is in the dictionary and who is in the array, I think.

Some exceptions that I thought would be useful for the program

1) Invalid member number is entered.
2) Number entered is already checked in.

I guess the feedback I’m looking for is:
I’m pretty sure I’ll need the member of the lot to be a dictionary. Just something permanent that isn’t stored in memory that can be taken from to add to an array. Is an array okay to use for the lot? Does it make sense to have the active lot members populate to an array so we can ask the array to list itself at any time? Any suggestions on what syntax/methods/classes to look up to get me started on actually coding this program? Thanks in advance for the consideration.

by Servatose via /r/csharp

Leave a Reply