I have this problem that I am working on for class, I don't have the method calls in the main mostly because I'm not sure how to use them. I guess my question is what am I missing and what do I need to change to get this to run properly. Any input will be a great help.

class Program
    {
        static void Main(string[] args)
        {
            RealEstateSalesperson agent1 = new RealEstateSalesperson();
            RealEstateSalesperson agent2 = new RealEstateSalesperson();
            GirlScout scout1 = new GirlScout();
            GirlScout scout2 = new GirlScout();

            // Real Estate Agent 1
            agent1.FirstName = "Jenny";
            agent1.LastName = "Lewis";
            agent1.TotalSales = 1122000;
            agent1.Commission = 224400;
            agent1.CommissionRate = 20;
            

            // Real Estate Agent 2
            agent2.FirstName = "John";
            agent2.LastName = "Smith";
            agent2.TotalSales = 2346500;
            agent2.Commission = 469300;
            agent2.CommissionRate = 20;

            // Girl Scout 1
            scout1.FirstName = "Sarah";
            scout1.LastName = "James";
            scout1.BoxesSold = 100;

            // Girl Scout 2
            scout2.FirstName = "Sarah";
            scout2.LastName = "James";
            scout2.BoxesSold = 100;

        }

        abstract class Salesperson : ISellable
        {
            protected string _fname, _lname, _name;

            // properties
            public string FirstName
            {
                get { return _fname; }
                set { _fname = value; }
            }

            public string LastName
            {
                get { return _lname; }
                set { _lname = value; }
            }

            public string FullName
            {
                get { return _name; }
                set { _name = value; }
            }

            // constructor
            public Salesperson()
            {
            }

            public Salesperson(string f, string l)
            {
                FirstName = f;
                LastName = l;
            }

            // method
            public string Name()
            {
                _name = _fname + " " + _lname;
                Console.WriteLine(_name);
                return _name;
            }

            public abstract string SalesSpeech(string speech);
            public abstract string MakeSale(int dollar);

        }

        class RealEstateSalesperson : Salesperson
        {
            protected int _totSales = 0, _commission = 0, _cRate;

            public int TotalSales
            {
                get { return _totSales; }
                set { _totSales = value; }
            }

            public int Commission
            {
                get { return _commission; }
                set { _commission = value; }
            }

            public int CommissionRate
            {
                get { return _cRate; }
                set { _cRate = value; }
            }

            public RealEstateSalesperson()
            {
            }

            public RealEstateSalesperson(int tS, int cO, int cR)
                : base()
            {
                TotalSales = _totSales;
                Commission = _commission;
                CommissionRate = _cRate;
            }

            public override string SalesSpeech(string speech)
            {
                return "We are proud to be the best Real Estate Agency in the area!";
            }

            public override string MakeSale(int dollar)
            {
                return dollar.ToString();
            }
        }

        class GirlScout : Salesperson
        {
            protected int _boxesSold = 0;

            public int BoxesSold
            {
                get { return _boxesSold; }
                set { _boxesSold = value; }
            }

            public override string SalesSpeech(string speech)
            {
                return "All of the preceeds from the cookie sale will fund our upcoming camping trip";
            }

            public override string MakeSale(int dollar)
            {
                return dollar.ToString();
            }
        }

        interface ISellable
        {
            string SalesSpeech(string speech);
            int MakeSale(int dollar);
        }
    }
}

Method calls take the form

instanceVariable.methodName(argumentList);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.