public void PersonExamples()
        {
            //var person = new Person();
            //person.FirstName = "Joshua";
            //person.ToString();

            var customer = new Customer(true, "Josh", "Tucker", "123456789", "*****@*****.**");

            customer.PhoneNumber = "";
            customer.FirstName   = "Lawrence";
            customer.IsPremium   = true;

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();


            List <Person> people = new List <Person>(); //Can inherit!

            //people.Add(person);
            people.Add(customer);
            people.Add(employee);
            people.Add(hourlyEmployee);

            List <int> numbers = new List <int>(); //Can only hold int.
        }
        public void PersonExamples()
        {
            //var person = new Person();
            //person.Firstname = "Joshua";
            //person.ToString();

            var customer = new Customer(true, "Josh", "Tucker", "12345678910", "*****@*****.**");

            customer.ToString();
            customer.Firstname = "Lawerence";
            customer.IsPremium = true;

            var empolyee = new Employee();

            empolyee.Firstname = "Luke";
            empolyee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();


            List <Person> people = new List <Person>();


            List <int> numbers = new List <int>();

            people.Add(customer);
            people.Add(empolyee);
            people.Add(hourlyEmployee);
        }
        public void PersonExmaples()
        {
            //var person = new Person();
            //person.FirstName = "Nadia";
            //person.ToString();

            var customer = new Customer(true, "Nadia", "Belghozlane", "123456789", "*****@*****.**");

            customer.ToString();
            customer.FirstName = "Lawrence";
            customer.IsPremium = true;

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();

            List <Person> people = new List <Person>();

            people.Add(customer);
            people.Add(employee);
            people.Add(hourlyEmployee);
        }
예제 #4
0
        public void PersonExamples()
        {
            /*var person = new Person();
             * person.FirstName = "Roberto";
             * person.ToString();*/

            var customer = new Customer(true, "Roberto", "Vega", "1234567890", "*****@*****.**");

            customer.PhoneNumber = "";
            customer.FirstName   = "Lawrence";
            customer.IsPremium   = true;

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();

            List <Person> people = new List <Person>();

            people.Add(customer);
            people.Add(employee);
            people.Add(hourlyEmployee);
        }
        public void PersonExamples()
        {
            //var person = new Person();
            //person.FirstName = "Joshua";
            //person.ToString();

            var customer = new Customer(true, "Josh", "Tucker", "1234567890", "*****@*****.**");

            customer.PhoneNumber = "";
            customer.FirstName   = "Lawrence";
            customer.IsPremium   = true;

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();


            List <Person> people = new List <Person>();

            //people.Add(person); the class is now abstract so that you can't do this
            people.Add(customer);
            people.Add(employee);
            people.Add(hourlyEmployee);
        }
예제 #6
0
        public void PersonExamples()
        {
            //var person = new Person();
            //person.FirstName = "Joshua";
            //person.ToString();

            var customer = new Customer(true, "Imran", "Zaveri", "12345678910", "*****@*****.**");

            customer.PhoneNumber = "";
            customer.FirstName   = "Lawrence";
            customer.IsPremium   = true;

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();

            hourlyEmployee.FirstName = "Charles";

            List <Person> people = new List <Person>();

            //people.Add(person);
            people.Add(customer);
            people.Add(employee);
            people.Add(hourlyEmployee);
        }
예제 #7
0
        public void PersonExamples()
        {
            var customer = new Customer(true, "Konrad", "Haight", "555-555-5555", "*****@*****.**");

            var employee = new Employee();

            employee.FirstName = "Luke";
            employee.HireDate  = DateTime.Today;

            var hourlyEmployee = new HourlyEmployee();

            hourlyEmployee.FirstName = "Kim";

            List <Person> people = new List <Person>();

            people.Add(customer);
            people.Add(hourlyEmployee);
            people.Add(employee);
        }
        public void PersonExamples() {
            //var person = new Person();
            //person.FirstName = "Brian";
            var customer = new Customer(true, "Brian", "Campassi", "3174209614", "*****@*****.**");
            //customer.Email = "*****@*****.**";

            var employee = new Employee();
            employee.FirstName = "Joe";
            employee.HireDate = DateTime.Now;

            var hourlyEmployee = new HourlyEmployee();
            hourlyEmployee.FirstName = "John";
            hourlyEmployee.HourlyWage = 15.00m;

            var salaryEmployee = new SalaryEmployee();
            salaryEmployee.FirstName = "Jason";
            salaryEmployee.Salary = 75000;

            List<Person> people = new List<Person>();
            //people.Add(person);       can't use person anymore directly after it has been assigned to base
            people.Add(customer);
            people.Add(employee);   //We can add all these variations of "people" to the same list 

        }