Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public class RasowyPies extends Pies {
  2.  
  3. String rasa;
  4. String ojciec;
  5. String matka;
  6.  
  7.  
  8. public RasowyPies(int identyfikator, String rasa, String wabiSie, String kolor, int wiek, String matka, String ojciec,
  9. String imie, String nazwisko) {
  10. super(identyfikator, wabiSie, kolor, wiek, imie, nazwisko,);
  11. this.rasa = rasa;
  12. this.ojciec = ojciec;
  13. this.matka = matka;
  14. }
  15.  
  16. public String toString() {
  17. String result = super.toString();
  18. result += "\n" + " Pies rasowy" + "\n";
  19. result += "----------------------------------------------\n";
  20. result += " RASA: " + rasa + "\n";
  21. result += " MATKA: " + matka + "\n";
  22. result += " OJCIEC: " + ojciec + "\n";
  23. result += " MIOT: " + wabiSie.charAt(0)-'A' + 1 + "\n";
  24. result += "----------------------------------------------\n";
  25. return result;
  26. }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement