help please , Java , I will upvote.
Posted: Fri Apr 29, 2022 7:07 am
help please , Java , I will upvote.
package shapes public class Triangle { double breadth; protected double height; 6 8 10 public Triangle (double height, double breadth) { this.height = height; this.breadth = breadth; } public void setBreadth (double breadth) { this.breadth = breadth; } public double getBreadth() { return breadth; } public double perimeter () { return breadth * 3; } 14 16 18 20 } In which of the following classes will the variable height in the Triangle be accessible. Choose all that apply (Note that there is negative marking for this question): package shapes public class Triangle { double breadth; protected double height; 8 10 public Triangle (double height, double breadth) { this.height = height; this.breadth = breadth; } public void setBreadth (double breadth) { this.breadth = breadth; } public double getBreadth() { return breadth; } public double perimeter () { return breadth 3; } 14 16 18 20} In which of the following classes will the variable height in the Triangle be accessible. Choose all that apply (Note that there is negative marking for this question): a. A class that extends a subclass of Triangle that is in the package drawing. b. A class that does not extend Triangle that is in the package drawing, OC. A class that does not extend Triangle that is in the package shapes. d. A class that extends a subclass of Triangle that is in the package shapes. . oe. A class that extends Triangle that is in the package shapes. O f. A class that extends Triangle that is in the package drawing.
package shapes public class Triangle { double breadth; protected double height; 6 8 10 public Triangle (double height, double breadth) { this.height = height; this.breadth = breadth; } public void setBreadth (double breadth) { this.breadth = breadth; } public double getBreadth() { return breadth; } public double perimeter () { return breadth * 3; } 14 16 18 20 } In which of the following classes will the variable height in the Triangle be accessible. Choose all that apply (Note that there is negative marking for this question): package shapes public class Triangle { double breadth; protected double height; 8 10 public Triangle (double height, double breadth) { this.height = height; this.breadth = breadth; } public void setBreadth (double breadth) { this.breadth = breadth; } public double getBreadth() { return breadth; } public double perimeter () { return breadth 3; } 14 16 18 20} In which of the following classes will the variable height in the Triangle be accessible. Choose all that apply (Note that there is negative marking for this question): a. A class that extends a subclass of Triangle that is in the package drawing. b. A class that does not extend Triangle that is in the package drawing, OC. A class that does not extend Triangle that is in the package shapes. d. A class that extends a subclass of Triangle that is in the package shapes. . oe. A class that extends Triangle that is in the package shapes. O f. A class that extends Triangle that is in the package drawing.