Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 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 naloga8
  8. {
  9. class Program
  10. {
  11. public delegate void Obvestilo(string niz1, string niz2);
  12. public class Študent
  13. {
  14. private string Ime;
  15. private string Priimek;
  16. private int Vpisna;
  17.  
  18. public Študent(string Ime, string Priimek, int Vpisna)
  19. {
  20. this.Ime = Ime;
  21. this.Priimek = Priimek;
  22. this.Vpisna = Vpisna;
  23. }
  24. public string _ime { get { return Ime; } set { Ime = value; } }
  25. public string _priimek { get { return Priimek; } set { Priimek = value; } }
  26. public int _vpisna { get { return Vpisna; } set { Vpisna = value; } }
  27.  
  28. public void PrijaviSeNaObvestilo (Referat referat)
  29. {
  30.  
  31. }
  32. }
  33. public class Zaposleni
  34. {
  35. private string Ime;
  36. private string Priimek;
  37. private string Delovno_mesto;
  38.  
  39. public Zaposleni(string Ime, string Priimek, string Delovno_mesto)
  40. {
  41. this.Ime = Ime;
  42. this.Priimek = Priimek;
  43. this.Delovno_mesto = Delovno_mesto;
  44. }
  45. public string _imeZaposlenega { get { return Ime; } set { Ime = value; } }
  46. public string _priimekZaposlenega { get { return Priimek; } set { Priimek = value; } }
  47. public string _delovnoMesto { get { return Delovno_mesto; } set { Delovno_mesto = value; } }
  48.  
  49. public void PrijaviSeNaObvestilo(Referat referat)
  50. {
  51.  
  52. }
  53. }
  54. public class Referat
  55. {
  56. private string Naziv;
  57.  
  58. public Referat(string Naziv)
  59. {
  60. this.Naziv = Naziv;
  61. }
  62. public string _naziv { get { return Naziv; } set { Naziv = value; } }
  63.  
  64. public event Obvestilo obvestilo;
  65.  
  66. public void PosljiObvestilo(Referat referat)
  67. {
  68. Console.WriteLine("Nekaj delam...");
  69. obvestilo("Lep pozdrav", "kreten");
  70. }
  71.  
  72. }
  73. static void Main(string[] args)
  74. {
  75. Referat Feri = new Referat("FERI");
  76. Študent Luka = new Študent("Luka", "Mlinaric", 1002376637);
  77. Luka.PrijaviSeNaObvestilo(Feri);
  78. }
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement