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 Zadanie2
- {
- class Student
- {
- public string nazwisko;
- public string imie;
- public int nr_albumu;
- public int semestr;
- public Student(string nazwisko, string imie, int nr_albumu, int semestr)
- {
- this.nazwisko = nazwisko;
- this.imie = imie;
- this.nr_albumu = nr_albumu;
- this.semestr = semestr;
- }
- public void zmien_nazwisko(string nowe_nazwisko)
- {
- nazwisko = nowe_nazwisko;
- }
- public void zmien_imie(string nowe_imie)
- {
- imie = nowe_imie;
- }
- public void zmien_nr_albumu(int nowe_nr_albumu)
- {
- nr_albumu = nowe_nr_albumu;
- }
- public void zmien_semestr(int nowe_semestr)
- {
- semestr = nowe_semestr;
- }
- public void wyswietl()
- {
- Console.WriteLine("Student {0} {1} o numerze albumu {2} uczęszcza na zajecia semestru {3}",nazwisko,imie,nr_albumu,semestr);
- }
- public void zmien_semestr()
- {
- semestr = semestr + 1;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Student s1 = new Student("Kowalski", "Jan", 2333, 3);
- }
- }
- }
Add Comment
Please, Sign In to add comment