Skip to content

This Java console app prompts the user for the width and height of a rectangle, calculates the area, and displays the results. It includes a Rectangle class with methods to set dimensions, compute the area, and print the values. A test class demonstrates the functionality.

Notifications You must be signed in to change notification settings

Wiiifiii/Rectangle-Dimensions-Calculator-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RectangleDimensionsApp: Java Console Application

Project Overview

This Java console application prompts the user for the width and height of a rectangle, calculates the area, and displays the results. It includes a Rectangle class with methods to set dimensions, compute the area, and print the values. A test class demonstrates the functionality.

Features

  • User Input: Prompts the user to input the width and height of a rectangle.
  • Area Calculation: Computes the area of the rectangle based on user input.
  • Result Display: Displays the calculated area to the user.
  • Rectangle Class: Encapsulates the properties and methods related to rectangle dimensions and area calculation.
  • Test Class: Demonstrates the functionality of the Rectangle class.

Project Structure

Main Components:

  1. Java Source Files: Located in the src folder.
    • Rectangle.java: Contains methods to set dimensions, compute the area, and print the values.
    • RectangleTest.java: Demonstrates the functionality of the Rectangle class.
  2. Dependencies: Managed in the lib folder.
  3. Compiled Output: Generated in the bin folder by default.

Getting Started

Prerequisites:

  • Visual Studio Code (latest version)
  • Java Development Kit (JDK)

Steps to Run the Project:

  1. Open the Project:

    • Open Visual Studio Code.
    • Select File > Open Folder.
    • Navigate to the RectangleDimensionsApp folder and open it.
  2. Run the Project:

    • Open a Java file from the src folder.
    • Click the Run button in the top-right corner of the editor or press F5.

Dependency Management:

  • Use the JAVA PROJECTS view in Visual Studio Code to manage your dependencies. More details can be found here.

License

This project is licensed under the MIT License.

About

This Java console app prompts the user for the width and height of a rectangle, calculates the area, and displays the results. It includes a Rectangle class with methods to set dimensions, compute the area, and print the values. A test class demonstrates the functionality.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages