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 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 11:20
Http is the protocol that governs communications between web servers and web clients (i.e. browsers). part of the protocol includes a status code returned by the server to tell the browser the status of its most recent page request. some of the codes and their meanings are listed below: 200, ok (fulfilled)403, forbidden404, not found500, server errorgiven an int variable status, write a switch statement that prints out the appropriate label from the above list based on status.
Answers: 2
question
Computers and Technology, 23.06.2019 19:50
Which feature is selected to practice and save the timing of a presentation
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
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
English, 24.09.2019 14:30
question
Mathematics, 24.09.2019 14:30