I am looking for help in determining if the class model that I am building can be improved upon. The class that I am building is a simple Product class with a few attributes.
class clsProducts
{
private string _name;
private double _productionRate;
//Constructor
public clsProducts()
{
_name = "null";
_productionRate = 0.0;
}
public clsProducts(string name, double productionRate)
{
_name = name;
_productionRate = productionRate;
}
//Properties
public string Name
{
get { return _name; }
}
public double ProductionRate
{
get { return _productionRate; }
}
}
What I would like to add is the ability to have the monthly forecasted values for each product in the class. I could add the following to do this
private double _janValue;
private double _febValue;
and so on, but this seems messy. I also considered creating a nested class called ForecastValues, such as
class clsProducts
{
...code here....
protected class ForecastValues
{
private string name;
private double forecastValue;
...other code.....
}
}
however, I am not sure that this idea would even work. Can any one suggest a way for me to handle this cleanly?
Thank you