CSE 14 Study Guide - Midterm Guide: Multiplication Table, Array Data Structure

65 views6 pages
15 Oct 2018
School
Course
Professor

Document Summary

Read this first: this is a closed note, closed book exam. There are 8 questions worth a total of 110 points + 1 extra credit question. If you are asked to write code, declare all variables that you use but do not define the class or (unless asked) the method; just provide the relevant lines of code. Write legibly any answer i cannot read is incorrect: given the following javadoc specification: static int add(int a, int b) Do not call any other methods in your method. boolean issqrt(double x, double s) : [10 points] given the following numbered lines of code, write the numbers of the lines that constitute the scope of each variable. 21 : [10 points] what does this program print out? class testprogram{ public static void main(string[] args){ static int foo(int x, int y) { int a = 1, b = 2;