Question: With aimensions that are given as inputs to the program. Inis program snoula de completea in 4 parts. Part 1 - Area of a Wall

With aimensions that are given as inputs to the program. Inis program snoula de completea in 4 parts.
Part 1- Area of a Wall Given Height and Width
In Part 1 you will write code to prompt the user to enter the height and the width of a wall (in feet). Then your code will compute and output the area of that wall.
For this part, you will need to declare some variables to store the height and width of the wall, as well as the area of the wall. These three variables should be int variables.
After you have declared and initialized your variables, write a Java statement to prompt the user to input a wall's height. Then write a statement to collect the user's input and store it in your height variable.
Now, write a Java statement to prompt the user to input a wall's width. Then write a statement to collect the user's input and store it in your width variable.
Next, write Java statement to compute the area of a wall with the given height and width, and store this value \( n \) your area variable.
Finally, write a line of code to output the area of the wall.
Hint: You can use printf with a so format specifier to format the output of the Wall area, like this:
System.out.printf("Wall area : \%d square feetln", area);
Or you can use String concatenation to accomplish the same thing, like this:
System.out.println("Wall area : "+ area +" square feet");
Here is an example of what the user should see when the program runs.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!