MCPcopy
hub / github.com/careercup/ctci / Being

Interface Being

Go/Chapter 3/Question3_7/Question.go:17–24  ·  view source on GitHub ↗

* Dogs and Cats polymorphism */

Source from the content-addressed store, hash-verified

15)
16/* Dogs and Cats polymorphism */
17type Being interface {
18 String() string
19 SetName(s string)
20 SetOrder(o int)
21 Name() string
22 isOlder(other Being) bool
23 Order() int
24}
25type Animal struct {
26 name string
27 order int

Callers 11

potentialCompressStringFunction · 0.65
StringMethod · 0.65
StringMethod · 0.65
StringMethod · 0.65
StringMethod · 0.65
compressFunction · 0.65
StringMethod · 0.65
enqueueMethod · 0.65
mainFunction · 0.65
dequeueAnyMethod · 0.65
isOlderMethod · 0.65

Implementers 1

AnimalGo/Chapter 3/Question3_7/Question.go

Calls

no outgoing calls

Tested by

no test coverage detected