Package Public Class Protected Double Public Double This

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Shape.

java lundi 30 octobre 2023 20:11

1 package exercice1;
2
3 public abstract class Shape {
4
5 protected double height;
6
7 public Shape(double height) {
8 this.height=height;
9 }
10
11 /*public void setValue(double height) {
12 this.height=height;
13 }*/
14
15 public double getHeight() {
16 return height;
17 }
18 public abstract void display();
19
20
21 }
22

Page 1

You might also like