Class Steward

  • All Implemented Interfaces:
    ISteward

    public class Steward
    extends java.lang.Object
    implements ISteward
    • Constructor Summary

      Constructors 
      Constructor Description
      Steward()  
    • Field Detail

      • expertiseLevel

        private int expertiseLevel
      • salary

        private int salary
      • totalProfit

        private int totalProfit
    • Constructor Detail

      • Steward

        public Steward()
    • Method Detail

      • getTotalProfit

        public int getTotalProfit()
        Description copied from interface: ISteward
        Retrieve the amount of profit the steward made. The profit defines when the next level is reached.
        Specified by:
        getTotalProfit in interface ISteward
        Returns:
        total profit.
      • updateProfit

        public void updateProfit​(int profit)
        Description copied from interface: ISteward
        Add the profit the total profit.
        Specified by:
        updateProfit in interface ISteward
        Parameters:
        profit - additional profit to the total (may be negative)
      • upgradeToNextLevel

        public void upgradeToNextLevel()
        Description copied from interface: ISteward
        Increase the experiance level by one. The highest level i 5.
        Specified by:
        upgradeToNextLevel in interface ISteward