32 lines
443 B
Go
32 lines
443 B
Go
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")
|
|
}
|