Class PE0023

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.ArrayList<java.lang.Integer> AbundantNumbers
      Stores all found abundant numbers.
      private int[] AbundantSums
      Storage for all sums.
    • Constructor Summary

      Constructors 
      Constructor Description
      PE0023()
      A simple constructor to set number and title.
    • Method Summary

      Modifier and Type Method Description
      void prepare()
      Just initializes AbundantNumbers and AbundantSums.
      java.lang.String solve()
      This method solves the given problem by checking every number in AbundantSums if it is an abundant number.
      • Methods inherited from class java.lang.Object

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

      • AbundantSums

        private int[] AbundantSums
        Storage for all sums. If sum is the result by to abundant numbers the value is equal to the index in this array.
      • AbundantNumbers

        private java.util.ArrayList<java.lang.Integer> AbundantNumbers
        Stores all found abundant numbers.
    • Constructor Detail

      • PE0023

        public PE0023()
        A simple constructor to set number and title.
    • Method Detail

      • solve

        public java.lang.String solve()
        This method solves the given problem by checking every number in AbundantSums if it is an abundant number. If it is one it is added to all other found abundant numbers. The result is stored, so it can be summed up finally.
        Returns:
        the sum of of all abundant number sums
        See Also:
        Mathe.isAbundantNumber(int)