Jul 13, 2024
vendingMachine interface with two types:
coinsnackcoin and snack.candyBar is a subtype of snack.SimpleVendingMachine always returning a candyBar which is a subtype of snack.product instead of snack).money type includes more than just coin.out: indicates covariant relationship (appears as return type).in: indicates contravariant relationship (appears as parameter type).vendingMachine converted into a generic interface.