From 7fc3f81546836be9d46c5d4616a5fea554a8b022 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 23 Oct 2026 08:49:26 +0200 Subject: aura --- src/main/java/com/example/BoxModel.java | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 src/main/java/com/example/BoxModel.java (limited to 'src/main/java/com/example/BoxModel.java') diff --git a/src/main/java/com/example/BoxModel.java b/src/main/java/com/example/BoxModel.java new file mode 100644 index 0000000..0dd4e65 --- /dev/null +++ b/src/main/java/com/example/BoxModel.java @@ -0,0 +1,48 @@ +package com.example; + +public class BoxModel { + private double width; + private double height; + private double depth; + + private double area; + private double volume; + + public BoxModel(double width, double height, double depth) { + this.width = width; + this.height = height; + this.depth = depth; + } + + public double getWidth() { + return width; + } + + public void setWidth(double width) { + this.width = width; + } + + public double getHeight() { + return height; + } + + public void setHeight(double height) { + this.height = height; + } + + public double getDepth() { + return depth; + } + + public void setDepth(double depth) { + this.depth = depth; + } + + public double getVolume(){ + return this.width * this.height * this.depth; + } + + public double getArea(){ + return 2 * (this.width * this.height + this.width * this.depth + this.height * this.depth); + } +} -- cgit v1.2.3