Exemple #1
0
 public static Job CreateJob(TimeLine tl)
 {
     Job j = new Job();
     do
     {
         j.Baslangic = tl.DayStart.Add(new TimeSpan(0, rnd.Next(tl.DayLengthMinute - tl.MaksJobLength), 0));
         j.Bitis = j.Baslangic.Add(new TimeSpan(0, rnd.Next(tl.MaksJobLength), 0));
     } while (j.JobLength > tl.MaksJobLength || j.JobLength < tl.MinJobLength);
     return j;
 }
        static void Main(string[] args)
        {
            Maths mathStuff = new Maths();

            Job.Job job1 = new Job.Job("Programmer", 420.69);

            Person.Person person1 = new Person.Person("Uvuvwevwevwe Onyetenyevwe Ugwemuhwem Osas", 69, job1);

            int idk = 1;

            while (idk < 10)
            {
                Console.WriteLine(idk + ". " + person1.name + ", " + person1.age + ", " + person1.job.jobName + ", he earns " + person1.job.jobSalary + "$");

                idk++;
            }

            Console.WriteLine(mathStuff.Plus("4", "6"));
            Console.WriteLine(mathStuff.Minus("15", "5"));
            Console.WriteLine(mathStuff.Multiply("2", "5"));
            Console.WriteLine(mathStuff.Divide("50", "5"));
        }
Exemple #3
0
 public Person(string name, int age, Job.Job job) // Constructor
 {
     this.name = name;
     this.age  = age;
     this.job  = job;
 }