trying_out_go/pkg/gadget/tape.go

32 lines
443 B
Go
Raw Permalink Normal View History

package main
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 {
Microphone int
}
func (t TapeRecorder) Play(song string) {
fmt.Println("Playing", song)
}
func (t TapeRecorder) Record() {
fmt.Println("Recording")
}
func (t TapeRecorder) Stop() {
fmt.Println("Stopped")
}