Think-Design-Write Test-Code
10 Days
- Description
During your explorations of arrays and maps you discovered many items that looked like method calls of objects as well as some explicit statements that JavaScript is object oriented. Specifically, you noticed the sort method of arrays. You decide to dive more directly into JavaScript objects in order to make your code more modern in structure and easier to create and maintain.
You report to your boss at the end of your exploration of JavaScript objects. She then gives you an assignment to work with a production team. Your job is to model plant types sold by a client that is a large nursery company. This company, Plant Place, groups their plant inventory using the following structure. Non-plant inventory will have a different structure.

Inventory organization for the Plant Place nursery.
Each entry in the inventory is to be tracked by common name, such as ‘Blue Spruce’. Other information regarding the inventory would be items such as the date the plant was received from the supplier, it’s size, and the supplier name.
Each inventory entry must be grouped by the type of plant so you decide to create classes that represent each type of plant in the inventory.
- Deliverables
- A working solution that stores plants by type and can display inventory based on object type and parent type. This should include a Nursery object as well as the objects representing the different types of plants.
- A test matrix that shows inputs and the expected output for those inputs for the Nursery Object.
- Resources