I recently started studying Java and OOP. I am currently creating a class that writes text to a file in a particular format. I have 'finished' it, and it works, but I am unsure as to the quality of the implementation.
This is how it works:
* First of all: the class has no attributes, just a method... Is this correct?
* Second: the method receives three parameters one word, another word and a sentence. The first word is supposed to be a word in one language, the second would be its ranslation into another one, and the third is a comment regarding the word. All of them are strings
* Third: the method in question is the one that creates three variables (String) to write them to a file.
Is this OK? Should I make a constructor and have the user provide the three strings?
This class is intended to be instantiated by another program (the GUI), this program will collect the three string from graphical user input. My idea is that it takes the input as variables and then passes these variables to the objects mehotd so it can write in the file.
I guess it's poorly designed, any ideas?