Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise: SNMP numbers

  • SNMP numbers are strings consisting a series of integers separated by dots: 1.5.2, 3.7.11.2
  • Create a class that can hold such an snmp number. Make sure we can compare them with less-than (the comparision is pair-wise for each number until we find two numbers that are different. If one SNMP number is the prefix is the other then the shorter is "smaller").
  • Add a class-method, that can tell us how many SNMP numbers have been created.
  • Write a separate file to add unit-tests