Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace naloga8
- {
- class Program
- {
- public delegate void Obvestilo(string niz1, string niz2);
- public class Študent
- {
- private string Ime;
- private string Priimek;
- private int Vpisna;
- public Študent(string Ime, string Priimek, int Vpisna)
- {
- this.Ime = Ime;
- this.Priimek = Priimek;
- this.Vpisna = Vpisna;
- }
- public string _ime { get { return Ime; } set { Ime = value; } }
- public string _priimek { get { return Priimek; } set { Priimek = value; } }
- public int _vpisna { get { return Vpisna; } set { Vpisna = value; } }
- public void PrijaviSeNaObvestilo (Referat referat)
- {
- }
- }
- public class Zaposleni
- {
- private string Ime;
- private string Priimek;
- private string Delovno_mesto;
- public Zaposleni(string Ime, string Priimek, string Delovno_mesto)
- {
- this.Ime = Ime;
- this.Priimek = Priimek;
- this.Delovno_mesto = Delovno_mesto;
- }
- public string _imeZaposlenega { get { return Ime; } set { Ime = value; } }
- public string _priimekZaposlenega { get { return Priimek; } set { Priimek = value; } }
- public string _delovnoMesto { get { return Delovno_mesto; } set { Delovno_mesto = value; } }
- public void PrijaviSeNaObvestilo(Referat referat)
- {
- }
- }
- public class Referat
- {
- private string Naziv;
- public Referat(string Naziv)
- {
- this.Naziv = Naziv;
- }
- public string _naziv { get { return Naziv; } set { Naziv = value; } }
- public event Obvestilo obvestilo;
- public void PosljiObvestilo(Referat referat)
- {
- Console.WriteLine("Nekaj delam...");
- obvestilo("Lep pozdrav", "kreten");
- }
- }
- static void Main(string[] args)
- {
- Referat Feri = new Referat("FERI");
- Študent Luka = new Študent("Luka", "Mlinaric", 1002376637);
- Luka.PrijaviSeNaObvestilo(Feri);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement