I'm having trouble with this. I'm not even sure where to start. What goes in the Class .cpp and what goes in the Class .h file? Thanks in advance.
Design and define a class called FileIO to do simple file I/O using streams. You can add other attributes and/or methods other than what is defined below, if you deem them necessary.
1. Class FileIO should contain the following as a minimum:
a. A default constructor and destructor.
b. An overloaded constructor, with default values for each argument.
c. Setters and getters for public-facing attributes.
d. Other methods:
d1. bool open(string filename, string mode) // mode = "read" or "write"
d2. void close()
d3. void write(string data)
e. Attributes:
e1. File name - a string for the file name
e2. Open mode - something that indicates how the file is to be opened - read or write
e3. An fstream
2. In main:
a. Use the FileIO class to open a file for writing and write 3 lines of data to it.
Submit a zip file of your visual studio project.