To help organize your thoughts, how about:
display a prompt to get the file name
read the filename from the console
display a prompt to get the mode (read/write)
read the mode from the console
if read-mode, open the file for read, while not eof, read the line, display it; when eof close the file.
if write-mode, open the file for write, get from the user the number of numbers to read, read each one and write it to the file, close the file.
Something like that. fstream would work, but so would fopen/fgets/fputs. no classes are needed, but maybe part of the assignment is to make a class to do some/all of this?
Good luck! Post some code if you get stuck.