This repository has been archived on 2021-09-07. You can view files and clone it, but cannot push or open issues or pull requests.
2019-03-09 23:38:10 +03:00

27 lines
414 B
Go

package abstract_factory
// A group of Car family
type Sportcar struct{
wheels int
doors int
speed int
hasElectricEngine bool
// Some sportcar specific properties
}
func (c Sportcar) WheelCount() int {
return c.wheels
}
func (c Sportcar) NumberOfDoors() int {
return c.doors
}
func (c Sportcar) Speed() int {
return c.speed
}
func (c Sportcar) HasElectricEngine() bool {
return c.hasElectricEngine
}