A 200-g block is attached to a horizontal spring and executes simple harmonic motion with a period of 0.250 s. If the total energy of the system is 2.00 J, find
(a) The force constant of the spring and
(b) The amplitude of the motion.