package main

import "fmt"

type Location interface {
	ConfirmReservation()
}
type OnlineLocation struct{}

func (ol OnlineLocation) ConfirmReservation() {
	fmt.Println("OnlineLocation::ConfirmReservation")
}

type Room struct{}

func (r Room) ConfirmReservation() {
	fmt.Println("Room::ConfirmReservation")
}

type Training interface {
	CreateLocation() Location
}
type OnsiteTraining struct{}

func (o OnsiteTraining) CreateLocation() Location {
	fmt.Println("OnsiteTraining::CreateLocation")
	return Room{}
}

type OnlineTraining struct{}

func (o OnlineTraining) CreateLocation() Location {
	fmt.Println("OnlineTraining::CreateLocation")
	return OnlineLocation{}
}

func main() {

	training := OnlineTraining{}
	location := training.CreateLocation()
	location.ConfirmReservation()
}
