Code of assignment5 in Objeted-Oriented Programming course