help please , Java , I will upvote.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

help please , Java , I will upvote.

Post by answerhappygod »

help please , Java , I will upvote.
Help Please Java I Will Upvote 1
Help Please Java I Will Upvote 1 (187.08 KiB) Viewed 26 times
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply