QUESTION3. The program will ask the user to enter the width and length of a rectangle, and then display the rectangle's area. The program calls the following methods, which have not been written: •...


Note: Write a Java Program..


QUESTION3. The program will ask the user to enter the width and length of a<br>rectangle, and then display the rectangle's area. The program calls the following<br>methods, which have not been written:<br>• getLength()-This method should ask the user to enter the rectangle's length,<br>and then return that value as a double*<br>• getWidth()-This method should ask the user to enter the rectangle's width,<br>and then return that value as a double.<br>• getArea() -This method should accept the rectangle's length and width as<br>arguments, and return the rectangle's area. the area is calculated by multiplying<br>the length by the width.<br>diaplayData() –This method should accept the rectangle's length, width, and<br>area as arguments, and display them in an appropriate message on the screen.<br>

Extracted text: QUESTION3. The program will ask the user to enter the width and length of a rectangle, and then display the rectangle's area. The program calls the following methods, which have not been written: • getLength()-This method should ask the user to enter the rectangle's length, and then return that value as a double* • getWidth()-This method should ask the user to enter the rectangle's width, and then return that value as a double. • getArea() -This method should accept the rectangle's length and width as arguments, and return the rectangle's area. the area is calculated by multiplying the length by the width. diaplayData() –This method should accept the rectangle's length, width, and area as arguments, and display them in an appropriate message on the screen.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here