Assignment 7, due Oct 13
Part of
the homework for CS:2820, Fall 2017
|
Assignments are to be turned in on paper. On every assignment, write your name, course and section number at the top. Write your name as it appears in your university records! Use the section number for which you are registered! We will not do detective work to figure out who did what. Work must be legible. Homework is due on paper in discussion section, usually at the start except when the assignment indicates that time to work on the assignment will be provided in class. Exceptions will be made only by advance arrangement with your TA (excepting "acts of God" outside your control). Never push homework under someone's door!
a) If a is an array, you can write a[i] to select the ith element of the array. How do you select the ith element of the list x? (0.5 points)
b) When you type the shell command java Roadnetwork 2>somefile what does the 2>somefile at the end of the command do? (0.5 points)
A question: What is that lambda expression used for? (0.5 points)
a) Write code to schedule a call to System.exit(0) at time 100.00 using the first framework. (0.5 points)
b) Write code to schedule a call to System.exit(0) at time 100.00 using the second framework. (0.5 points)
c) Rewrite the code from part b without using lambda notation, anonymous subclasses or anonymous variables. (0.5 points)