Last active
February 10, 2016 00:27
-
-
Save jredh/ec12a3508ac54a2d98e1 to your computer and use it in GitHub Desktop.
Just adding a parameter to the Constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class House { | |
private int houseBedrooms; | |
private int houseBathrooms; | |
private int houseSquareFeet; | |
private int houseWindows; // added! | |
private String houseName; | |
public House( int _i, String _s, int _i2, int _i3, int _windows ){ | |
houseBedrooms = _i; | |
houseName = _s; | |
houseBathrooms = _i2; | |
houseSquareFeet = _i3; | |
houseWindows = _windows; // added! | |
} | |
/** | |
* Returns the dollar value of the House. | |
*/ | |
public int appraise(){ | |
return houseBedrooms * houseBathrooms * houseSquareFeet * houseWindows; // added! | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment