logo

Crowdly

Browser

Add to Chrome

Яка стрічка з наведено фрагменту програмного коду не компілюється у JVM: cla...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Яка стрічка з наведено фрагменту програмного коду не

компілюється у

JVM:

class Box {

     private double width;

     private double height;

     private double depth;

    

     Box (Box ob){

           width = ob.width;

           height = ob.height;

           depth = ob.depth;

     }

    

     Box (double w, double h, double d){

           width = w;

           height = h;

           depth = d;

     }

}

 

public class BoxWeight extends Box {

     double weight;

 

           BoxWeight(BoxWeight ob) {

           super(ob);

           weight = ob.weight;

     }

 

     BoxWeight(double w, double h, double d, double m) {

           super(w, h, d);

           weight = m;

}

}

 

public class BoxWeightDemo

{

 

     public static void main(String[] args) {

           BoxWeight mybox1 = new BoxWeight(10, 20, 15, 34.3);

           BoxWeight mybox2 = new BoxWeight();

           BoxWeight mycube = new BoxWeight(3, 2);

           BoxWeight myclone = new BoxWeight(mybox1);

}

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on virt.ldubgd.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome