You are a teacher or professor so you must be professional in your work. The present generation is very smart they want to learn but when they will be provided with some extra which they do not know. If you are teaching them the topics which they already know, they will not give full attention. I will suggest you the following things:
1. Prepare lesson plan before going to class. It is very necessary or a must thing for a teacher.
2. Try to add some interesting fact, examples, presentation which can attract students.
3. Make every student active in the class by questioning between your lecture.
4. Use digital medium or smart class to give your lectures.
5. Give them projects after the lecture which should be related to their main subject. By this way, they will take the interest. For example, if you have taught them power points then give them the project of physics, chemistry or any other main subject to present using power points slides.
6. Always try to make a friendly relation with the students so that they can talk you without any hesitation. By this tactics, you would be able to understand the problems which they are facing.
7. The theory portion of the computer is not interesting and most of the time student get bored by theory. So, try to concentrate on practical more. If you want to give theoretical lecture give it in between the practicals. You can give the topic of theory to them for typing.
8. Studnet generally needs email and internet in present days. So, start with these interesting subject why making their emails and other interesting things. Try to start HTML and then tell them that they have to know basic computer knowledge before HTML. By this tactics, you would be able to teach them basic computer knowledge.
9. Try to make your lecture as much interesting as possible.
By following above tips you would be able to become a good teacher and student will certainly concentrate in your class. These are my personal experience as a popular teacher.
Honesty is the best policy.