In the project folder, there is a file called CMakeList.txt and on it are the files that are part of the project. I tried to add the file GradeBook.cpp to add_executable line, but still did not work. However, when I replaced the file names in lower case, and turn modify the line that I described, everything worked properly. I'm not sure what is the mistake if the file name has no upper or similarly if I add it to this list exactly as it is called.
Then, I renamed files gradebook.h and gradebook.cpp and added gradebook.cpp to add_executable line.