Beispiel #1
0
        static void Main()
        {
            Person.Human firstPerson = new Person.Human("ivan", "petrov", "25", "man", "sportsman", "800");
            firstPerson.Information();
            Console.WriteLine("Now we go to add new human");
            Person.Human newPerson = new Person.Human();
            newPerson.EnterData();
            newPerson.Information();
            Console.WriteLine("Now we go to change the surname to " + newPerson.Surname + " "
                              + newPerson.Name + ". Enter new surname:");
            newPerson.Surname = Console.ReadLine();
            newPerson.Information();
            firstPerson.ChangeInformation("sasha");
            firstPerson.ChangeInformation(32);
            firstPerson.Information();
            newPerson.Information();
            Console.WriteLine("You can find in what period of time " + firstPerson.Name + " " + firstPerson.Surname +
                              " will earn a certain amount of money. Enter this amount");
            string money = Console.ReadLine();
            int    time  = firstPerson.CountTime(Convert.ToInt32(money));

            Console.WriteLine("in " + time + " months");
            Console.WriteLine("His salary is " + firstPerson["salary"]);

            Console.WriteLine("\nNow persons look like this");
            firstPerson.Information();
            newPerson.Information();
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     Person.Human girl = new Person.Human("Ivan", "Ivanov", 18, "secondary", 0, "low", "single", "CIS");
     girl.GrowingUp();
     girl.Educate();
     girl.Marriage();
     girl.Work();
     girl.Upgrade();
     girl.Information();
 }