Lab 1: Wrapping Paper Calcualtor

Due Date and Submission Requirements


The goal of this lab is:


Background and Directions

I am very bad at wrapping presents (proof), because I never know how much wrapping paper to use. In this assignment, you will write a program that will compute the surface area of a box (a rectangle prism), so that I can determine how much wrapping paper to use.

Given a length (l), width (w), and height (h) of a box, the surface area formula is:

A = 2(wl + hl + hw)

You will create a Java class, named Lab1.java (make sure you check the box for public static void main(String[] args) when you create your class). In your java class, you will need to prompt the user and get the length, width, and height of the box using the Scanner. After you gather the three inputs, you must compute the surface area (using the formula above), and then print out the answer to the screen.

Required Output

When you run your program, it should look very similar to the output seen in in this screenshot .

Hints

You can use .nextInt() with the Scanner to get the user input as an integer.

Assumptions

You can assume the user will enter a valid, non negative integer.

Grading (10 points)