Due 1:00 PM, Wednesday, 28 March 2018 CPSC 101b Homework #6 Programming Decision-Trees REMINDER: When discussing an assignment with other students, you may write on a board or a piece of paper, but you may not retain any written or electronic record of the discussion. Moreover, you must engage in a full hour of mind- numbing activity (e.g., watching back-to-back episodes of Gilligan's Island) before you work on the assignment again. This ensures that you can reconstruct what you learned from the discussion, by yourself, using your own brain. The same rule applies to nonstudents and on-line sources. 1. (4 points) Create a decision tree for some domain of interest to you; e.g., to identify the author of a text (written by one of five famous authors), an unknown chemical element (one of the six inert gases), or a president of the United States (one who served between 1980 and 2018). Your tree must * use questions with Y/N answers (denoting YES and NO); * have at least two distinct outcomes for each possible answer to the first question; and * have at least five distinct outcomes. 2. (12 points) Write a JavaScript program (called decision.html) implementing the decision tree that you created in Problem 1. Run it enough times to reach every possible outcome and verify that the result is correct in each case. Your program should accept either "Y" or "y" as YES and either "N" or "n" as NO; use alert() to give an error message if some other answer is given; and use document.write() to write the final outcome (e.g., the name of the author or element or president) to the browser window. Hint: See fancy.html (from the first JavaScript handout) and veryrobust.html (from the second JavaScript handout) for ideas on how to reduce the amount of code required. These handouts are available on the class web page. Note: Submit a listing of your decision.html with the rest of your work and send a copy as an attachment to a message to sce@cs.yale.edu by the time+date above. The subject line should contain the phrase "CPSC 101". 3. (1 point) How many hours did it take you complete the first three problems? CPSC-101b-03/08/18