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 egzamin
- {
- public class Osoba
- {
- private string nazwisko;
- private int wiek;
- public Osoba(string nazwiko, int wiek)
- {
- this.nazwisko = nazwisko;
- this.wiek = wiek;
- }
- public string Nazwisko
- {
- set { nazwisko = value; }
- }
- public string Wiek
- {
- get { return wiek; }
- }
- public virtual void Wypisz()
- {
- // Console.Write("{0},{1},{3}",nazwisko, wiek);
- }
- }
- public class Student : Osoba
- {
- private string uczelnia;
- private string wydzial;
- private int rok;
- public Student(string uczelnia,string wydzial,int rok,string nazwisko,int wiek):base(nazwisko,wiek)
- {
- this.uczelnia = uczelnia;
- this.wydzial = wydzial;
- this.rok = rok;
- }
- public double Uczelsnia
- {
- get { return uczelnia; }
- set { uczelnia = value; }
- }
- public override void Rysuj()
- {
- // Console.WriteLine("{0},{1},{2}",nazwisko,wiek:uczelnia:wydział,rok);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement