Question: In the file Dril 1 2 . java, add the following class definitions ( you can copy / paste them from here ) : class

In the file Dril12. java, add the following class definitions (you can copy/paste them from here):
class C1{
C2 other;
C1( C2 other){
this. other = other;
}
}
class C2{
int x;
double y;
C2(int x, double y){
this. x=x;
}
this. y=y;
}
Then add a class definition called Drill2 with the following fields:
A field named first of type C2 with its x field equal to 10, and y field should be 3.5
A field named second of type C1. It's value should be a reference to a C1 object with its other field set to any C2 object other than the one stored in first (you can create another C2 object for this).
A field named third of type C1. It's value should be a reference to a C1 object with its other field the same C2 object as the one stored in the first field.
 In the file Dril12. java, add the following class definitions (you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!