Advertisement
Gillito

Untitled

Jul 21st, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication57
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Student student = new Student(5, 3, 2);
  14.             Console.WriteLine(student.CurrentValue.LangAvg);
  15.         }
  16.     }
  17.  
  18.     class StudentAvgValue
  19.     {
  20.         public int MathAvg { get; set; }
  21.         public int LangAvg { get; set; }
  22.         public int PenieAvg { get; set; }
  23.     }
  24.  
  25.     class Student
  26.     {
  27.  
  28.         public Student(int math, int lang, int penie)
  29.         {
  30.             CurrentValue = new StudentAvgValue();
  31.             CurrentValue.MathAvg = math;
  32.             CurrentValue.LangAvg = lang;
  33.             CurrentValue.PenieAvg = penie;
  34.         }
  35.  
  36.         public StudentAvgValue CurrentValue
  37.         {
  38.             get;
  39.             set;
  40.         }
  41.  
  42.     }
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement