Skip to content

Area and Perimeter

Area and Perimeter Application

  1. Create a class and call it AreaAndPerimeterApp

    • ▾ 📂 src
    • ▾ 📦 (default package)
      • 📄 AreaAndPerimeterApp.java

      • 📄 InvoiceApplication.java

      • 📄 InvoiceApplicationV1.java

  2. Write the code so that the program takes in a width and length as input and calculates the perimeter and the area. Sample output shown below.

Console Output:

Welcome to the Area and Perimeter Calculator

Enter length: 5
Enter width: 6
Area: 30.0
Perimeter: 22.0


AreaAndPerimeterApp.java