IFSC 3300 Web Client Applications

Shorter HW 15 (this one is a 50 pt. HW)

Due Wednesday, Dec. 4, 2024, instead of a final exam. Please email the answers to IFSC3300HW@gmail.com.

 

1. 𝔻eclare an object with at least 4 properties and a method. Print the values of the properties, the value of the method (which looks like source code because a metɥod is a property, a property whose value is code instead of a number, a boolean, a string or whatever), and the result of running the method (i.e. its returned value).

2. 𝔻eclare a constructor function (which by convention starts with a capital letter). Make it able to create objects with the same properties and method as above. Create three of the objects. Print the property values, method code, and method return value of one of the objects.

If 1,000 objects needed to be created (as elements of an array, for example), using a constructor function is a lot better than trying to declare each object individually!

3. 𝔻eclare a class that does the same thing as the constructor function above. Make an object from the class. Print out the property values, method code, and method return value of the object.