p-GymReg / CSC330_CSharp_Midterm / Member.cs
Member.cs
Raw
namespace CSC330_CSharp_Midterm
{
    public class Member : Person
    {
        // will use automatic properties
        /*
        private int weight;
        private string height;
        private string goal;
        private int month;
        private string numberofcreditcard;
        */

        public Member()
        {

        }

        public int Weight { get; set; }
        public string Height { get; set; }
        public string Goal { get; set; }
        public int Month { get; set; }
        public string NumberOfCreditCard { get; set; }

        public override string ToString()
        {
            return "Name: " + Name + ". DOB: " + DOB + ". Address: " + Address;
        }

        public override string ShowCost(object obj)
        {
            return (obj as Member).Cost.ToString();
        }
    }
}