Java Constructors or new class
<p>Hey I am new java so forgive me if what I am about to ask is obvious, but I will try to explain as best as I can. </p>

<p>Its just a project that has been set for university so its not in a serious manner. </p>

<p>I have a class called MarsRoom which holds the attributes say for all the dimensions of the room like the totalheight and width of the walls in order to calculate the heat loss that the room will suffer in order to adjust the amount of solar energy that is needed to keep the room at the room temperature set. </p>

<p>The problem I am having is what is better practice or solution, to pass the attributes of the size of the room in a constructor(but this could get quite long in size, as the ones below are not only the ones that I may need) or create a whole different class specifically for that room like ROOM TYPE U? and set the attributes in there. </p>

<p>As it stands I can create a whole new room just by instantiating the room with the new values, but its going to get a little long, whereas I would rather not create a whole new class for a different room which may only differ from another room by a few meters on one of the walls!.</p>

<p>So what I am really trying to get at it, is is it ok to pass that many attributes to the constructor on instantiation?</p>

<pre><code>//the instantiation in the runnable
MarsRoom room1 = new MarsRoom("RoomU", 40, 40, 20, 20, 8, 2, 4);

//the constructor in the MarsRoom class
public MarsRoom(String roomname, int windowsH, int windowsW, int wallsH, int wallsW, int windowC, int heaters, int lights){
    name = roomname;
    TotalWindowHeight = windowsH;
    TotalWindowWidth = windowsW;
    TotalWallHeight = wallsH;
    TotalWallWidth = wallsW;
    windowCeiling = windowC;
    numheaters = heaters;
    numlights = lights; 
    roomheaters = new Heaters[numheaters];
}
</code></pre>
