Week 15: Lab #30

User Created Object Instances

DUE: Thursday, 5/4 @ 4:30pm



Create a page that allows a user to input property values and create new instances of a class. Print results to the screen. You will need to design a class to hold data about a subject of your choosing that has a minimum of 5 different properties.

Your page should have:
  1. Five (5) text input fields to allow the user to create a new class instance (so if we are doing dogs we could have breed, name, weight, color, and age).
  2. A drop-down menu listing the properties of your custom class, allowing the user to select what to sort by.
  3. A submit button to save newly entered data as a new class instance within an array.
  4. An empty div to which you will write the results with the id "results".

When the submit button has been pressed, the behavior of your JavaScript should:
When the user changes the property to sort on from the drop-down menu, it should trigger a "change" event and re-sort the array and print them out to the page replacing any previous results.

Upload your completed lab by the due date specified above and make sure that you add a working link to it on your class page, otherwise it will not be reviewed and you will not receive credit.