This document contains code for two Java classes:
1) A Box class that defines a constructor to set the height, width, and depth of a box object based on user input, and includes a getVolume method to return the volume of the box.
2) A Calculator class with static powerInt and powerDouble methods that use Math.pow to calculate integer and double powers and return the results.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
28 views1 page
Java Assignment 3
This document contains code for two Java classes:
1) A Box class that defines a constructor to set the height, width, and depth of a box object based on user input, and includes a getVolume method to return the volume of the box.
2) A Calculator class with static powerInt and powerDouble methods that use Math.pow to calculate integer and double powers and return the results.