Final Version of the programming assignment A