Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var Estate = (function () {
- function Estate(name, area, location, isFurnitured) {
- this.setName(name);
- this.setArea(area);
- this.setLocation(location);
- this.setIsFurnitured(isFurnitured);
- }
- Estate.prototype.getName = function() {
- return this._name;
- };
- Estate.prototype.setName = function(name) {
- Object.prototype.validateIsNullOrEmpty(name);
- this._name = name;
- };
- Estate.prototype.getArea = function() {
- return this._area;
- };
- Estate.prototype.setArea = function(area) {
- Object.prototype.validateIsNumber(area);
- this._area = area;
- };
- Estate.prototype.getLocation = function() {
- return this._location;
- };
- Estate.prototype.setLocation = function(location) {
- Object.prototype.validateIsNullOrEmpty(location);
- this._location = location;
- };
- Estate.prototype.getIsFurnitured = function() {
- return this._isFurnitured;
- };
- Estate.prototype.setIsFurnitured = function(isFurnitured) {
- Object.prototype.validateIsBoolean(isFurnitured);
- this._isFurnitured = isFurnitured;
- };
- Estate.prototype.toString = function () {
- return 'Name: ' + this.getName() + 'Area: ' + this.getArea() + 'Location: ' + this.getLocation() + 'IsFurnitured: ' + this.getIsFurnitured();
- };
- return Estate;
- }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement