Class Country


  • public class Country
    extends java.lang.Object
    Class to manage a Country Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int Country_id  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      Country​(int country_id, java.lang.String name)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCountry_id()
      Return the Country ID
      java.lang.String getName()
      Get the country name
      void setCountry_id​(int country_id)
      Set the Country ID
      void setName​(java.lang.String name)
      Set the country name
      java.lang.String toString()
      Overrides the .toString() function, so that a human readable name of the country is returned to the user
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • Country_id

        private int Country_id
      • name

        private java.lang.String name
    • Constructor Detail

      • Country

        public Country​(int country_id,
                       java.lang.String name)
        Constructor.
        Parameters:
        country_id - Country id
        name - Country name
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides the .toString() function, so that a human readable name of the country is returned to the user
        Overrides:
        toString in class java.lang.Object
        Returns:
        String, Country name
      • getCountry_id

        public int getCountry_id()
        Return the Country ID
        Returns:
        Integer, Country id
      • setCountry_id

        public void setCountry_id​(int country_id)
        Set the Country ID
        Parameters:
        country_id - Integer, country id
      • getName

        public java.lang.String getName()
        Get the country name
        Returns:
        String, name
      • setName

        public void setName​(java.lang.String name)
        Set the country name
        Parameters:
        name - String, name