Exemplo n.º 1
0
        public Chore Generate(string name, string description, double cost)
        {
            Chore chore = new FamilyChore(name, cost, description);

            chore.Activate();
            return(chore);
        }
Exemplo n.º 2
0
        private Chore ParseEntry(string entry)
        {
            Chore chore = ChoreFactory.Empty;

            string[] fields = entry.Split(',');
            if (fields.Length >= 4)
            {
                string key         = fields[0].Trim();
                string name        = fields[1].Trim();
                double value       = double.Parse(fields[2]);
                string description = fields[3].Trim();

                chore = new FamilyChore(name, value, description);
                chore.SetKey(key);
            }

            return(chore);
        }