Assignment 2: Prototype-based Inheritance and Virtual Dispatch in JavaScript


Monday, August 15 at 11:59 PM

Goals for This Assignment

By the time you have completed this work, you should be able to:

Provided files:

Step-by-Step Instructions

Step 1: Get JavaScript Working

For this assignment, you'll be using JavaScript. It's possible to make this assignment work in any Web browser, though it may require some modification to make the output reasonable. It's recommended to use Node.js as your implementation, which can be installed on all major platforms. Node.js can also be run directly in the browser here, if you prefer.

Step 2: Implement a Singly-Linked List

A significant of code has been provided in list.js, including a test suite of significant size. Your goal with this assignment is to get all the tests passing, without modifying any of the testing code. The comments in the file provide further details. Note that the tests themselves are a rich source of information, both in terms of defining what you need to implement (i.e., they serve as a specification), and how JavaScript works.

Step 3: Turn in Your Code Using Canvas

Log into Canvas, and go to the COMP 333 class. Click “Assignments” on the left pane, then click “Assignment 2”. From here, you need to upload the following files:

In addition, if you collaborated with anyone else, be sure to download collaborators.txt and write the names of the people you collaborated with in the file, one per line. Please submit this file along with the other files.

You can turn in the assignment multiple times, but only the last version you submitted will be graded.