Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 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. namespace egzamin
  7. {
  8. public class Osoba
  9. {
  10. private string nazwisko;
  11. private int wiek;
  12. public Osoba(string nazwiko, int wiek)
  13. {
  14. this.nazwisko = nazwisko;
  15. this.wiek = wiek;
  16. }
  17. public string Nazwisko
  18. {
  19. set { nazwisko = value; }
  20. }
  21. public string Wiek
  22. {
  23. get { return wiek; }
  24. }
  25. public virtual void Wypisz()
  26. {
  27. // Console.Write("{0},{1},{3}",nazwisko, wiek);
  28.  
  29. }
  30. }
  31. public class Student : Osoba
  32. {
  33. private string uczelnia;
  34. private string wydzial;
  35. private int rok;
  36. public Student(string uczelnia,string wydzial,int rok,string nazwisko,int wiek):base(nazwisko,wiek)
  37. {
  38. this.uczelnia = uczelnia;
  39. this.wydzial = wydzial;
  40. this.rok = rok;
  41. }
  42.  
  43. public double Uczelsnia
  44. {
  45. get { return uczelnia; }
  46. set { uczelnia = value; }
  47.  
  48. }
  49. public override void Rysuj()
  50. {
  51.  
  52. // Console.WriteLine("{0},{1},{2}",nazwisko,wiek:uczelnia:wydział,rok);
  53.  
  54. }
  55. }
  56.  
  57. class Program
  58. {
  59. static void Main(string[] args)
  60. {
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. }
  69. }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement