Przeciążanie konstruktorów

  • 8
  • Niedostępne
1. W klasie Solution utwórz 4 konstruktory z różnymi modyfikatorami dostępu. 2. W osobnym pliku utwórz klasę SubSolution będącą obiektem podrzędnym klasy Solution. 3. W klasie SubSolution użyj komendy Alt+Insert -> Constructors, aby utworzyć konstruktory. 4. Popraw modyfikatory dostępu konstrukto
Nie możesz wykonać tego zadania, ponieważ nie jesteś zalogowany.
Komentarze (1)
  • Popularne
  • Najnowsze
  • Najstarsze
Musisz się zalogować, aby dodać komentarz
Misiu
Poziom 41 , Gdansk, Poland
21 kwietnia 2020, 22:41
I have constructors without bodies. And no variables in classes Solution and SubSolution. In class SubSolution I used super() method in constructors. e.g. In S: protected Solution (double x) { } In SS: protected SubSolution(double x) { super(x); }