subject

Make a file called rectangle. java. in this file, create the following methods: //ask the user for the length of the rectangle. public static double getlength(scanner keyboard) //ask the user for the width of the rectangle public static double getwidth(scanner keyboard) //calculate the area of the rectangle public static double getarea(double length, double width) //display the information about the rectangle public static void displaydata(double length, double width).

demo 5 content:

import org. w3c. dom. css. rect;

import java. util. scanner;

public class demo5
{
public static void main(string[] args)
{
scanner keyboard = new scanner(system. in);
double length = rectangle. getlength(keyboard);
double width = rectangle. getwidth(keyboard);
double area = rectangle. getarea(length, width);

system. out. printf("you entered: %.1f, %.1f, and %.1f\n", length, width, area);

rectangle. displaydata(length, width);
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Nims is applicable to all stakeholders with incident related responsibilities. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 15:20
This os integrated the processing power of windows nt with the easy-to-use gui of windows 98. windows 2000 windows 3.11 windows for workgroups windowa millennium edition
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
You know the right answer?
Make a file called rectangle. java. in this file, create the following methods: //ask the user for...
Questions
question
Mathematics, 29.01.2021 01:00
question
Mathematics, 29.01.2021 01:00
question
Mathematics, 29.01.2021 01:00
Questions on the website: 13722361