CS 2110 Midterm: CS 2110 Cornell 2012 Fall Examsp1 Fall 09

18 views9 pages
31 Jan 2019
Course
Professor

Document Summary

There are 9 questions on 9 numbered pages. Check now that you have all the pages. Use the back of the pages for workspace. The exam is closed book and closed notes. Grader: (8 points) tell us what the following two java programs will print. class a { A a = new a(); b b = new b(); a ab = new b(); System. out. format("%d %d %d %d %d %d", a. x, b. x, ab. x, a. y, b. y, ab. y); int x = 2; int y = 100; A() { this(3); } class b extends a { int y = 200; B() { super(4); } (4 pts) output of a. main(): class d { public static void main(string[] args) { D d = new d(); e e = new e(); 5 : 6; } class e extends d { int m() { return 100 + super. m(); } (4 pts) output of d. main(): 1: (20 points) true or false? a.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents