Coder Social home page Coder Social logo

16-11-2021's Introduction

16-11-2021

Übungsaufgabe vom 16.11.2021 für die Studierenden des Java I Seminars der Universität zu Köln

📝 Aufgabe:

Erstellt eine Klasse Hund und füllt sie mit folgenden Attributen:

  • String rasse
  • int alter
  • String name

✨ Optional: Schreibt Getter/Setter für eure Hund Klasse bzw. dessen Attribute.

Erzeugt in eurer main-methode zwei Hund Objekte und überprüft in einem conditional statement (if-else) ob einer der beiden Hunde mindestens 5 Jahre alt ist.

  • Falls die Bedingung zutreffend ist, gebt in der Konsole aus "Ein Hund ist mindestens 5 Jahre alt".
  • Falls die Bedingung nicht zutrifft gebt in der Konsole aus "Die Hunde sind beide jünger als 5 Jahre"

⚠️ Advanced: Versucht euch an einem switch-case statement, das je nach String rasse des Hundes einen anderes bellen in der Konsole ausgibt. D.h. String rasse ist der switch und als case wird z.B. "Pekinese" gewählt. Falls der case "Pekinese" zutrifft gebt ihr in der Console "...wuff..." aus. Pro Rasse ein anderes "bellen"

ℹ️ Resourcen:

Hier noch ein paar nützliche 📃Artikel, 🖊️Threads und 🎥Videos

16-11-2021's People

Contributors

ddemmer1 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.