02 • User can draw dots on the Screen • User select Cluster or Line Box • User click the “Run” button • Computer Calculate either o A line that connect all dots using the “nearest neighbor” algorithm o Divide the dots in TWO groups (clusters). Some dots became red, and others became blue –team Blue and team Red • Show results on the screen
class MainApp { public static void Main(String []a){ // Constructor is protected -- cannot use new Singleton s1 = Singleton.getInstance(); Singleton s2 = Singleton.getInstance(); // Test for same instance if (s1 == s2){ // true - Objects are the same instance } } }
• Draft of Project 02 is due Monday before our lecture. • The midterm exam will be Tuesday instead of Monday. • The final version of Project 02 is due Monday midnight. I will answer questions during the lecture on Monday. • A correct solution is not only a solution that “compiles and runs”; but a solution that matches the design we have agreed on.