This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace AnimalKingdom | |
{ | |
// I'm sticking a bit more with pseudo-code than FORMAL c-sharp (I'm a bit rusty there) | |
// More worth understanding some of the key concepts I would look for as an interviewer here: | |
// 1) Inheritance - check - you've got the idea of this in the bag | |
// 2) Encapsulation - you don't necessarily want just anybody to be able to take your object and modify properties about it | |
// - By setting the setters to private, utilizing them in a constructor (or other private-to-Animal method), you encapsulate any logic | |
// that may accompany that. Imagine having some logic in Animal base where, given a size and weight, you perform validation on that | |
// pair of data. If just anybody is able to modify the members, you wouldn't necessarily force validation. Yes, C# makes it a bit | |
// simpler with their get/set built-ins but it's best practice overall not to depend on the public get; set; methodology given that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"protocol" : "ProtocolA", | |
"namespace" : "com.inome.common", | |
"doc" : "Protocol A", | |
"types" : [ { | |
"type" : "record", | |
"name" : "Date", | |
"doc" : "Represents a Date", | |
"fields" : [ { | |
"name" : "month", |