Exemplo n.º 1
0
 public static void Main()
 {
     Student payingStudent = new Student();
       ScholarshipStudent freeStudent = new ScholarshipStudent();
       Employee clerk = new Employee();
       Console.Write("Using Student: ");
       DisplayObjectMessage(payingStudent);
       Console.Write("Using ScholarshipStudent: ");
       DisplayObjectMessage(freeStudent);
       Console.Write("Using Employee: ");
       DisplayObjectMessage(clerk);
 }
Exemplo n.º 2
0
    static void Main()
    {
        Student            payingStudent = new Student();
        ScholarshipStudent freeStudent   = new ScholarshipStudent();
        Employee           clerk         = new Employee();

        Write("Using Student: ");
        DisplayObjectMessage(payingStudent);
        Write("Using ScholarshipStudent: ");
        DisplayObjectMessage(freeStudent);
        Write("Using Employee: ");
        DisplayObjectMessage(clerk);
    }
Exemplo n.º 3
0
 public static void Main()
 {
     Student payingStudent = new Student();
       ScholarshipStudent freeStudent = new ScholarshipStudent();
       payingStudent.Name = "Megan";
       payingStudent.Credits = 15;
       freeStudent.Name = "Luke";
       freeStudent.Credits = 15;
       Console.WriteLine("{0}'s tuition is {1}",
      payingStudent.Name,
      payingStudent.Tuition.ToString("C"));
       Console.WriteLine("{0}'s tuition is {1}",
      freeStudent.Name,
      freeStudent.Tuition.ToString("C"));
 }
Exemplo n.º 4
0
    public static void Main()
    {
        Student            payingStudent = new Student();
        ScholarshipStudent freeStudent   = new ScholarshipStudent();

        payingStudent.Name    = "Megan";
        payingStudent.Credits = 15;
        freeStudent.Name      = "Luke";
        freeStudent.Credits   = 15;
        Console.WriteLine("{0}'s tuition is {1}",
                          payingStudent.Name,
                          payingStudent.Tuition.ToString("C"));
        Console.WriteLine("{0}'s tuition is {1}",
                          freeStudent.Name,
                          freeStudent.Tuition.ToString("C"));
    }
Exemplo n.º 5
0
    static void Main()
    {
        Student            payingStudent = new Student();
        ScholarshipStudent freeStudent   = new ScholarshipStudent();

        payingStudent.Name    = "Megan";
        payingStudent.Credits = 15;
        freeStudent.Name      = "Luke";
        freeStudent.Credits   = 15;
        WriteLine("{0}'s tuition for {1} credits is {2}",
                  payingStudent.Name, payingStudent.Credits,
                  payingStudent.Tuition.ToString("C"));
        WriteLine("{0}'s tuition for {1} credits is {2}",
                  freeStudent.Name, freeStudent.Credits,
                  freeStudent.Tuition.ToString("C"));
    }