Reference no: EM13940073
Given the following class definitions:
Public abstract class A2{
private int x;
public A2 (int a) {
this.x=a;
}
public int getX(){
return this.x;
}
public abstract double sameInfo();
}
public class B2 extends A2 {
private int y;
public B2 (int a, int b) {
super(a);
this.y = b;
}
public int getY () {
return this.y;
}
public double someInfo () {
return 100 * y;
}
}
public class C2 extends A2 {
private int z;
public C2 (int z){
super(5);
this.z=z;
}
public int getZ() {
return this.z;
}
public double sameInfo() {
return 100 * z * getZ();
}
}
public class D2 extends B2 {
public D2 (int D) {
super(10,20);
}
public double sameInfo () {
return 100 * getY() * getX();
}
}
You may assume that the following statements precede those in the table below:
A2 a1, a2 = new B2(2, 4);
B2 b1, b2 = new B2 (4, 6);
C2 c1, c2 = new C2 (5);
D2 d1, d2 = new D2 ();
1- The following statement:
b1= new A2(10);
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
2- The following statement:
b2 = new D2();
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
3- The following statement:
a2.getY();
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
4- The following statement:
a2.someInfo();
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
5- The following statement:
((D2)b2).getY();
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
6- The following statement:
d1 = new B2(5,6);
Answer
A. Produce no error
B. Produces a SYNTAX (or compile-time) error
C. Produces an EXCEPTION (or run-time error)
D. Produces a LOGIC error
Compute the order point
: Xander Company anticipates that usage of Component T will be 100 units daily, which equates to around 25,000 for the year. Compute the order point. Determine the most economical order quantity
|
Different stakeholders involved in this form of tourism
: Who are the different stakeholders involved in this form of tourism? For example consumers, communities, industry enterprises, governments, non-government organisations.
|
How many units must be sold to earn operating income
: How many units must be sold to earn operating income of $300,000? Compute the additional operating income that Rad-Brad's would earn if sales were $50,000 more than expected.
|
What is the difference between a union shop and agency shop
: What is the difference between a union shop and agency shop? How do these operate in a right-to-work state?
|
Find the errors in the code
: You may assume that the following statements precede those in the table below:
|
The anatomical theory of disease
: Write a 2-3 page paper and briefly describe and compare the following: the humoral concept of disease, the anatomical theory of disease, and the germ theory. How does each differ from the other? What is the historical significance of each on the c..
|
Variety of ethical dimensions to the responses
: There are a wide variety of ethical dimensions to the responses of individuals (such as scientists, politicians, environmental activists, journalists, and "normal" people) and organisations (e.g. Government, business and the media) to the inform..
|
What is the dollar amount of purchase of suits
: What is the dollar amount of purchase of suits? Each suit has a cost of $80.
|
Assuming that the salaries of production managers
: A sample of 9 production managers with over 15 years of experience has an average salary of $71,000 and a sample standard deviation of $18,000.
|