package com.aura.scala.day01object sealedClassed { def findPlaceToSit(piece: Furniture) = piece match { case a: Couch => "Lie on the couch" case b: Chair => "Sit on the chair" }}//sealed定义密封类sealed abstract class Furniturecase class Couch() extends Furniturecase class Chair() extends Furniture