Many students panic when an assignment deadline passes and their program still doesn't work. The temptation to rummage through a waste paper bin or to copy from a friend is very strong. It is not, however, worth the risk of failing the course. If you are placed in this position, please let your tutor know of your current difficulties via electronic mail. You should also attend a scheduled consultation for the course, who you may be able to get help.
The best advice, however, is to begin planning for an assignment as soon as the specifications are available; to be confident the design is logically correct before using the terminals; and never to underestimate the time needed to complete the work.