Hello,
I have a small project and it's hard to understand what the requirements
are.
Basically I need to read a text file and identify titles and attributes with
their values.
I have to remove leading and trailing spaces in the titles and attribute
lines. That is OK as
I found a way of using only stringbuilder objects.
But I find it difficult to understand the following:
The class should support:
- Get an integer value associated with a given title and attribute names.
- Set an integer value for a given title and attribute names, writing the
new file to disk.
Here is the structure of the input file.
<title1>
attribute1:value1
attribute2:value2
<title2>
attribute3:value3
attribute4:value4
attribute5:value5
attribute6:value6
I created a class GetText which has a method for parsing the text:
ParseText. It reads a whole line and after processing it, it writes to the
output file.
GetText myParser;
myParser.ParseText();
But I do not understand the purpose of the Get and Set in this context.
Thanks