Class Dog

java.lang.Object
Dog

public class Dog
extends java.lang.Object
Dog class. Represents the basics of a Dog and related methods
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) int age
    age as an int
    (package private) java.lang.String breed
    breed of Dog
    (package private) java.lang.String name
    name of Dog as a String
    (package private) java.lang.String owner
    owner's name
  • Constructor Summary

    Constructors 
    Constructor Description
    Dog()
    default constructor initiallizes variables to dummy values
    Dog​(java.lang.String n, java.lang.String o, int a, java.lang.String b)
    constructor that takes in initial values for following class variables
  • Method Summary

    Modifier and Type Method Description
    (package private) java.lang.String getName()
    getter for name of Dog
    (package private) void setName​(java.lang.String n)
    setter for name of Dog

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      java.lang.String name
      name of Dog as a String
    • owner

      java.lang.String owner
      owner's name
    • age

      int age
      age as an int
    • breed

      java.lang.String breed
      breed of Dog
  • Constructor Details

    • Dog

      Dog()
      default constructor initiallizes variables to dummy values
    • Dog

      Dog​(java.lang.String n, java.lang.String o, int a, java.lang.String b)
      constructor that takes in initial values for following class variables
      Parameters:
      n - Dog's name
      o - Dog's owner's name
      a - Dog's age as an int
      b - Dog's breed
  • Method Details

    • getName

      java.lang.String getName()
      getter for name of Dog
      Returns:
      the name as a String
    • setName

      void setName​(java.lang.String n)
      setter for name of Dog
      Parameters:
      n - name to be stored