Bed.cs
using party.house.occupants; // for Robot
namespace party.house.rooms.furniture
{
enum BedType {Single, Double}
class Bed
{
BedType type;
public Bed()
{
type = BedType.Single;
}
public Bed(BedType bedtype)
{
type = bedtype;
}
public BedType GetBedType()
{
return type;
}
public void SetBedType(BedType type)
{
this.type = type;
}
public void MakeBed(Robot r)
{
System.Console.WriteLine(r + " makes the bed");
}
override public string ToString()
{
string message = "Bed type: " + type;
return message;
}
}
}
Comments
Post a Comment