Download presentation
Presentation is loading. Please wait.
1
(Assignment due: Wed. Feb. 04, 2004)
1.(10) What does the "plateform independence" mean? How is it implemented in Java? 2.(10) Summarize the basic concepts used in Java, such as class, method, variable, Constructor, ... (as many as possible) 3.(25) Write a program that reads in an integer number and prints the following output as long as the number is odd and greater than 0 and less than 10. For example, if the number entered is 9, print: 1 3 3 3
2
(Assignment due: Wed. Feb. 04, 2004)
4.(25) Write a recursive method called computeFN which computes the following function for values of N: f(N) = 3*f(N-3) + 4*f(N-2) - 5*f(N-1) where f(0) = 1, f(1) = 1, f(2) = 3. 5.(30) Implement ”quick sort" and sort a sequence containing 20 integers: 3, 4, 6, 1, 10, 9, 5, 20, 19, 18, 17, 2, 1, 14, 13, 12, 11, 8, 16, 15. Trace 10 steps of the computation.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.