Koofers

Past Exam for CMSC 433 - PROG LANG TECH & PDGMS at Maryland (UMD)

Exam Information

Material Type:Exam 1
Professor:Staff
Class:CMSC 433 - PROG LANG TECH & PDGMS
Subject:Computer Science
University:University of Maryland
Term:Spring 2002
Keywords:
  • Lexicographic
  • Differences
  • Definitions
  • String Object
  • Implementation
  • Following Statements
  • Short Answers
  • In Front Of
  • In Front (of)
  • Programming
Login / Sign Up to View Document
Preview Page 1Preview Page 2Preview Page 3Preview Page 4Preview Page 5Preview Page 6

Sample Document Text

CMSC 433 Exam 1: March 7, 2002 1. Java dynamic dispatch (20 points) Given the following Java class definitions: public class A { A() { System.out.println("A.A()"); } public void f(A arg) { System.out.println("A.f(A)"); } public void g(A arg) { System.out.println("A.g(A)"); } }; public class B extends A { B() { System.out.println("B.B()"); } public void f(B arg) { System.out.println("B.f(B)"); } public void g(A arg) { System.out.println("B.g(A)"); } public static void h(A arg) { System.out.println("B.h(A)"); } } public class C extends B { C() { System.out.println("C.C()"); } public void f(A arg) { System.out.println("C.f(A)"); } public void f(B arg) { System.out.println("C.f(B)"); } public void g(B arg) { System.out.println("C.g(B)"); } public static void h(A arg) { System.out.println("C.h(A)"); } } What are the effects of each of the following statements executed in sequence (e.g., prints xxx, causes a run-time exception to be thrown, gives a compile-time error, etc.)? AF A a = new A();...

Related Documents

Lexicographic Exam
Provided That Exam
Complicated Exam
Complicated Exam
Singleton Pattern Exam
Singleton Pattern Exam
Work Centers Notes
Double Value Notes
Double Value Notes
Assumptions Exam
Participants Notes
The Economy Exam
The Economy Exam
The Independent Exam
Following Traversals Exam
The Message Exam
155, "/var/app/current/tmp/"