Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Box {
- double width;
- double height;
- double depth;
- public Box() {
- }
- public Box(double width, double height, double depth) {
- this.width = width;
- this.height = height;
- this.depth = depth;
- }
- double volume() {
- return this.width * this.height * this.depth;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement