Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com;
- public class Uczeń extends Osoba {
- Rodzic rodzic;
- Nauczyciel nauczyciel;
- public Uczeń(String imie, String nazwisko, int rokUrodzenia, Rodzic rodzic, Nauczyciel nauczyciel) {
- super(imie, nazwisko, rokUrodzenia);
- this.rodzic = rodzic;
- this.nauczyciel = nauczyciel;
- }
- @Override
- public String toString() {
- return "Uczeń{" +
- "rodzic=" + rodzic +
- ", nauczyciel=" + nauczyciel +
- ", imie='" + imie + '\'' +
- ", nazwisko='" + nazwisko + '\'' +
- ", rokUrodzenia=" + rokUrodzenia +
- '}';
- }
- }
Add Comment
Please, Sign In to add comment