The second assignment

Some flaws exist because the code is not as neat as I want.