learning_go/headFirst/interfaces/gadget/tape.go
Alexander Pivkin fd57dc9b95 sdf
2025-09-05 14:14:21 +03:00

28 lines
384 B
Go

package gadget
import "fmt"
type TapePlayer struct {
batteries string
}
func (t TapePlayer) Play(song string) {
fmt.Println("Playing", song)
}
func (t TapePlayer) Stop() {
fmt.Println("Stopped")
}
type TapeRecorder struct {
Microphones int
}
func (t TapeRecorder) Play(song string) {
fmt.Println("Playing", song)
}
func (t TapeRecorder) Stop() {
fmt.Println("Stopped")
}