class Triangle{
public int base;
public int height;
public double area = 0;
public Triangle(int base, int height){
this.base = base;
this.height = height;
updateArea(); }
public void updateArea(){
double a = base*height/2;
area = a; }
public void setBase(int b){
base = b; updateArea(); }
public void setHeight(int h){
height = h;
updateArea(); } }
Which variables are not accessible from anywhere within given class code (except from where they are declared)?
Select 1 option
A. base, height, area
B. area, b, h
C. base, height
D. b, h, a
If you want to solve the questions together with the experts and understand the concepts better, please contact us using the contact form or WhatsApp numbers. Selected people get to do that without any additional charges.