A menu-driven, console-based BMI Calculator built using Java and Object-Oriented Programming (OOP) principles.
This project calculates Body Mass Index (BMI), determines health status, supports multiple users, stores BMI history, and includes robust exception handling for invalid inputs.
Ideal for Java beginners, college mini-projects, and OOP practice.
Body Mass Index (BMI) is a health indicator calculated using height and weight.
Formula:
BMI = weight (kg) / (height × height) (m²)
- 📋 Menu-driven console UI
- 📏 Height input in meters or centimeters
- 👥 Calculate BMI for multiple users
- 🧾 View BMI calculation history
⚠️ Exception handling for invalid inputs- 🧠 Clean OOP-based design
- 📦 Beginner-friendly structure
- Calculate BMI
- View BMI History
- Exit
| BMI Range | Category |
|---|---|
| < 18.5 | Underweight |
| 18.5 – 24.9 | Normal weight |
| 25 – 29.9 | Overweight |
| ≥ 30 | Obese |
- Object-Oriented Programming (OOP)
- Encapsulation
- Class separation
- Exception handling (
try-catch) - Loops & conditional statements
ArrayListandList- User input validation
BMI-Calculator/
│
├── Person.java
├── BMIRecord.java
├── BMICalculator.java
├── BMIMainApp.java
└── README.md
- Clone the repository
git clone https://github.com/yogeshkumarsaini/BMI-Calculator.git
- Compile the program
javac *.java - Run the application
java BMIMainApp
- Java beginner practice
- College mini-project
- OOP learning
- Interview preparation
- Console application demo
- 💾 Save BMI history to a file
- 🕒 Add date & time to BMI records
- 🧪 Unit testing
- 🖥️ GUI using JavaFX or Swing
- 🌐 REST API using Spring Boot