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, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
How is a wan different than a lan? both connect computers, but only wan users don’t need the same operating system. both are peer-to-peer networks, but only a wan requires networking hardware. both network computers, but only a wan can cover larger geographical ranges. both connect computers to the internet, but only wan connects to the cloud.
Answers: 1
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, 28.04.2021 17:40
question
Mathematics, 28.04.2021 17:40
question
Mathematics, 28.04.2021 17:40
question
English, 28.04.2021 17:40
question
Mathematics, 28.04.2021 17:40
question
Chemistry, 28.04.2021 17:40
Questions on the website: 13722362