Skip to content
#

objects

Here are 858 public repositories matching this topic...

Die Instanzvariablen der 'Dog'-Klasse sind als 'private' markiert. Ergänze für jedes Attribut eine 'getter'-Methode, um auch außerhalb der 'Dog'-Klasse auf diese zugreifen zu können. Erzeuge anschließend in der main-Methode der 'Main'-Klasse eine neue Instanz von 'Dog' und weise diese einer Variable zu. Rufe die 'bark'-Methode auf der neuen 'Dog…

  • Updated Dec 22, 2021
  • Java

Überschreibe die 'bark'-Methode der 'Dog'-Klasse innerhalb von 'OldDog', sodass ein alter Hund nur dann bellt, wenn er nicht taub ist. Nutze dafür die 'bark'-Methode der super-Klasse. Erzeuge anschließend in der main-Methode der 'Main'-Klasse eine neue Instanz von 'OldDog' und weise diese einer Variable zu. Rufe auf der erstellten Instanz die 'b…

  • Updated Dec 22, 2021
  • Java

Improve this page

Add a description, image, and links to the objects topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the objects topic, visit your repo's landing page and select "manage topics."

Learn more