Creates and implements a JK flip-flop class.