CSC 1351 : OLD CSC FINAL

14 views5 pages
15 Mar 2019
School
Course
Professor

Document Summary

Csc1351, final exam, spring 2012, 05/07/2012, page 1 of 5. Question 1: write a complete example of an anonymous inner class that implements the zort interface. The zort interface looks like: public interface zort { Question 2: write a regular expression to match an url. Use backreferences to capture the scheme name (e. g. http, https), the host (e. g. name (e. g. http, https), the host (e. g. lsu. edu), and the directory. Http://www. lsudining. com/menus/detail/6/ the scheme name is http , the host is. Question 3: re-write this iterative function as a recursive one: public static void main(string[] args) { for(int i=0;i<10;i++) Csc1351, final exam, spring 2012, 05/07/2012, page 2 of 5. Question 4: please write the function facstring function using recursion. Facstring returns a string that describes a factorial. Question 5: write the name of each sorter. Csc1351, final exam, spring 2012, 05/07/2012, page 3 of 5. Question 6: if an algorithm completes in a number of seconds equal to: