I'm doing an assignment in Java that calculates the commission for a salesperson. It's very simple, and could be coded all in the main method, but because I want to get more comforatble working with classes and objects, I made a SalesPerson class and a Calculator class. I have two questions.
Question 1. I have no need to instantiate multiple objects for these classes. The Calculator class only serves to provide 2 methods and some variables, and I don't need to keep track of multiple sales people. Because I don't need more than one instance of these classes, I was thinking about making them contain all static methods and variables. Is it OK to have a class when you don't intend to instantiate it at all?
Question 2. The SalesPerson class only contains variables and no methods (name, commission, totalPay). The only reason I made it into it's own class was to separate functionality. I know in C++ there is the structure data type. I would have used a structure, but Java doesn't have it. Again, I could just put these variables in my main method, but my intention was to separate out the functionality. Is it OK to have a class that contains no methods just for the purpose of making your code 'cleaner' (or the other way around: having a class that contains just methods)?
Thanks.