COMP 1020 Study Guide - Final Guide: Quicksort, Selection Sort, Merge Sort

304 views22 pages
lavenderbeaver188 and 10 others unlocked
COMP 1020 Full Course Notes
12
COMP 1020 Full Course Notes
Verified Note
12 documents

Document Summary

Instructions: answer all questions on this paper in the spaces provided, no aids, including calculators, are permitted, the total number of marks is 72. Part 1 short answer 32 marks. What would be the output of the following code? int [] arraya = {1,3}; int [] arrayb = {1,2}; false arrayb[1]++; A friend of yours likes robots, and built a robot class as part of a project. Help your friend out by completing the clone() method. class robot { private int serialnum; private int servocount; public robot(int serialnum, int servocount) { this. serialnum = serialnum; this. servocount = servocount; public robot clone() { Using the syntax for array literals (such as {1,3,4}), and not the word new, write the declaration statement that would give exactly the same results as int[][] x = new int[3][2]; Using the syntax for array literals (such as {1,3,4}), write the declaration statement that would give a.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents

Related Questions