The three files don't need changing at all. They're fine. If you wanted to then create an executable file from those three files, you need to do the following:
1) Compile the two *.cpp files into object files.
2) Link those object files into a single, new, executable file.
The link I pointed you at explains all this in some detail.
When you open your "project", Code::Blocks has the extra information that these files are all to be compiled together into a single executable. When you open the plain text files, Code::Blocks has not been told this, hence doesn't compile it in the way you hoped.
The reason we're having such trouble helping you is that you simply don't have the knowledge of how individual text files are turned into an executable, so when we ask you questions, it seems like we're talking about something else entirely.
As it is, if you want to drop having Code::Blocks do the compiling and linking for you, and do it yourself, you're going to have to identify what compiler you're using. If I had to guess, I'd guess that you're using a copy of Code::Blocks that came with the MinGW compiler included. However, that doesn't actually help your professor; you knowing how to manually create an executable on your machine with your tools might be useless to him, if he has different tools.
All this said, I think you might be overthinking it. If I were your professor, and you gave me those three text files, I would have no trouble in compiling and linking them myself in a matter of seconds using standard tools. In fact, I just did so. Took less than a minute.
The command I used to turn the three files into an executable (using the standard GCC compiler suite, which in this case handles compilation and linking for me) was:
g++ CatMain.cpp Cat.cpp
and here's me running the programme:
Has your professor asked you to provide the executable, or could you just provide the text files of code?