OC userin Computer Science·15 Dec 201723. In a file system the term refers to the assurance that data remains accurate and consistent over its entire life cycle, and particularly in the case of system crashes and failures. a) Data longevity b) Data security c) Data integrity x d) Fragmentation e) All of the above
OC userin Computer Science·17 Dec 201711. How many times does the letter K get printed in the following code? for (int i = 0; i < 5; i++) System.out.println("K"); for (int j = 0; j
OC userin Computer Science·17 Dec 20175. Inside a class, you can declare multiple methods with the same name, provided that all such methods have different input arguments. (A) FALSE (B) TRUE
OC userin Computer Science·13 Dec 201716. What does the following program print? void setup() { int x = 10; it = x; printit(); it = 20; printit(); printit(); int it; void printit() { println (it); it = 0;
OC userin Computer Science·12 Dec 201719. How many times does the letter C print in the following code? for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { for (int k = 0; k < 2; k++) { System.out.println("C"); System.out.println("C"); System.out.println("C"); (D) 36 (E) 18
OC userin Computer Science·13 Dec 2017Longer multiple choice questions (3 points each) Coding Question - Fibonacci sequence You are to write a method named "Fibo" that takes as input an integer n, and returns the nth number in the Fibonacci sequence. If Fibo (n) denotes the nth number in the Fibonacci sequence, then recall for n > 2, Fibo (n) = Fibo (n-1) + Fibo (n-2), and Fibo (1) = 1 and Fibo (2) = 1. You are to assume that the user is always going to enter an input greater than 2. For example Fibo (4) = 3. Use the 7 following questions to "write" your code. Pay close attention to how your answers group together with each other. 26. Line 1 (A) public static int Fibo (int n) { (B) public static void main(String[] args) { (C) public static int Fibo () { (D) public static void Fibo (Double input) { (E) public static void Fibo (int n) {
OC userin Computer Science·11 Dec 201753. Line 1 (A) public static void Triangle (int height) { (B) public static void Triangle() { (C) public static int Triangle (int height) {
OC userin Computer Science·11 Dec 201740. Provide the content of the getter method for the calories property (line 15). To make people feel better, the method should return only 90% of the actual calorie value of the cookie. (A) return int 0.9 + calories; (B) return (int) (0.9 * calories); (C) return 0.9 * (double) calories; (D) return 0.9 * calories; (E) return calories;
OC userin Computer Science·10 Dec 201729. Recall that some IP addresses are reserved for private use (e.g., in a home, small business, or portions of a larger network). An example are addresses 10.0.0.0 to 10.255.255.255, used for private networks. All IP packets have a source IP address and a destination IP address. Then a Network Address Translation (NAT) is used so that a) Packets passing from private network to public network have their destination addresses modified. b) Typically packets passing from the private network to the public network have their source addresses modified while packets passing from the public network back to the private network have their destination addresses modified. x c) Packets passing from public network to private network have their source addresses modified. d) Typically packets exchanged between private and public networks have both their source and destination addresses unchanged. e) All of the above
OC userin Computer Science·9 Dec 2017(1) LILI T W IIIL LI , 28. Line 3 (A) int temp = 0; int counter = 2; (B) while (fibi temp) { (C) None of these statements are useful when paired with other questions, leave blank. (D) int temp = fib1+fib2; (E) int temp, counter;{