<script> //Whorehouse class definition function Whorehouse(name,madam,location,price,girls,boys,animals) { this.madam=madam; //"this" refers to the current object this.name=name; //"this" refers to the current object this.addr=location; this.cost=price; this.girls=girls; this.boys=boys; this.animals=animals; this.picture="null"; //we don't set this when we create an instance //notice this is not in the parameter list // Define methods. This is so Whorehouse object knows about them. // The actual methods are defined below this.PoliceRaid=PoliceRaid; this.Turnover=Turnover; this.Inflation=Inflation; this.addUrl=addUrl; this.profileWhorehouse=profileWhorehouse; } function PoliceRaid(newLocation) { this.addr=newLocation; } function Turnover(newGirls) { this.girls=newGirls; } function Inflation(newPrice) { this.cost=newPrice; } function addUrl (picture) { this.picture=picture; } //print out attributes of the Brodkin object function profileWhorehouse() { document.writeln("<pre>"); //html tag to format document.writeln("Whorehouse: " + this.name); document.writeln("Madam\'s name is " + this.madam); document.writeln("Confidential Location is " + this.addr); document.writeln("Cost for Regular Visit is " + this.cost); document.writeln("Available Professional Women are " + this.girls); document.writeln("Available Professional Men are " + this.boys); document.writeln("Extra Curricular Animals: " + this.animals); if (this.picture != "null") { //Notice I use single quote so I can use double quotes in my string document.writeln('<img src="' + this.picture +'" >'); } else { document.writeln("Visuals unavailable"); } document.writeln("</pre><br><br>"); } var Julies = new Whorehouse("Julie\'s","Julie","237 Fremont Blvd.","$100","Jen, Barb, Steph & Frizzy","Bob, Long Joe, Tall Tim & Tiny Willy","sheep"); //the "Julies" instance of the Whorehouse class has now been created var Bonnys = new Whorehouse("Bonny\'s","Bonny","12 BuckleMyPants Lane","$200","Slim, Flabby, Flirty & Dirty","Rough, Ready, Hardly & Phil","Donkeys, Hoover Vacuums"); //the "Bonnys" instance of the Whorehouse class has now been created Bonnys.addUrl("http://www.cs.unc.edu/~seth/sam/sisters.jpg"); var Flutters = new Whorehouse("Flutter\'s","Madam Butterfly","ICU2","$500","Freaky, Dolly, Tootsie & Twit","Moe, Larry, Curly & Shemp","What do you take us for??!!"); //the "Flutters" instance of the Whorehouse class has now been created Flutters.addUrl("http://www.dschneider.com/Images/butterfly.gif"); Julies.profileWhorehouse(); Bonnys.profileWhorehouse(); Bonnys.PoliceRaid("111 FindANew Lane"); Bonnys.profileWhorehouse(); Bonnys.Turnover("Jan, Finch, Eddie, Muscles & Legs oh, and Dirty is still out back"); Bonnys.Inflation("$500"); Bonnys.profileWhorehouse(); Flutters.profileWhorehouse(); Flutters.Inflation("$1.50"); Flutters.profileWhorehouse(); </script> Click here to run this assignment