You are also expected to be on time for class. An occasional tardy is not a concern, but consistently being late for class is disruptive and disrespectful. You are expected to do your own work. When you use books or other references, such as web sites, you must document those sources. This is true whether you use source code verbatim or adapt it to your needs.
Academic dishonesty is a very serious offense and the punishment is severe.
If you are caught cheating, you will receive a failing grade for the course. It doesn't matter if it is a homework, program or exam, you will fail. I expect to cover material in chapters 1 through 10 as a minimum.