subject
Computers and Technology, 26.06.2020 15:01 bigb290

import java. util. Scanner; public class AreaAndPerimeterApp { public static void main(String[] args) { System. out. println("Welcome to the Area and Perimeter Calculator"); System. out. println(); Scanner sc = new Scanner(System. in); String choice = "y"; while (choice. equalsIgnoreCase("y")) { // get input from user System. out. print("Enter length: "); double length = Double. parseDouble(sc. nextLine()); System. out. print("Enter width: "); double width = Double. parseDouble(sc. nextLine()); // create the Rectangle object Rectangle r = new Rectangle(length, width); // format and display output String message = "Area: " + r. getAreaNumberFormat() + "\n" + "Perimeter: " + r. getPerimeterNumberFormat() + "\n"; System. out. println(message); // see if the user wants to continue System. out. print("Continue? (y/n): "); choice = sc. nextLine();

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
In microsoft word, you can change the look of paragraphs by:
Answers: 1
question
Computers and Technology, 21.06.2019 22:30
Aprovides legal protection for something an individual has created
Answers: 1
question
Computers and Technology, 22.06.2019 00:20
What’s resistance in an electrical circuit ?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
Which of the following is not a symptom of chronic fatigue syndrome
Answers: 2
You know the right answer?
import java. util. Scanner; public class AreaAndPerimeterApp { public static void main(String[] args...
Questions
question
Mathematics, 24.09.2019 14:10
question
Mathematics, 24.09.2019 14:10
Questions on the website: 13722367