* Capsulated the training-related logic into the NeuralNetwork class