In one of my required undergraduate courses, my professor has given a mandatory assignment. He has indicated that he will use our code from the assignment for his research. He has not mentioned attributing it, nor asked our permission to use the code.
I'm not opposed to him using the code for his research, but I want to guarantee that if he does, I will be attributed. Is there a good way to go about this? Furthermore, is it acceptable for a professor to use student code from required class projects for research?