Head First C#

Head First C# Code: Chapter 7
Explore the House
Outside.cs

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace __Explore_the_House
{
    public class Outside : Location
    {
        private bool hot;
        public bool Hot { get { return hot; } }

        public Outside(string name, bool hot)
            : base(name)
        {
            this.hot = hot;
        }

        public override string Description
        {
            get
            {
                string NewDescription = base.Description;
                if (hot)
                    NewDescription += " It’s very hot.";
                return NewDescription;
            }
        }
    }

}