Skip to content

yogeshkumarsaini/BMI-Calculator-Health-Indicator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 BMI Calculator

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.


📌 What is BMI?

Body Mass Index (BMI) is a health indicator calculated using height and weight.

Formula:

BMI = weight (kg) / (height × height) (m²)

🚀 Features

  • 📋 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

🖥️ Menu Options

  1. Calculate BMI
  2. View BMI History
  3. Exit

📊 BMI Categories

BMI Range Category
< 18.5 Underweight
18.5 – 24.9 Normal weight
25 – 29.9 Overweight
≥ 30 Obese

🧠 Concepts Used

  • Object-Oriented Programming (OOP)
  • Encapsulation
  • Class separation
  • Exception handling (try-catch)
  • Loops & conditional statements
  • ArrayList and List
  • User input validation

📁 Project Structure

BMI-Calculator/
│
├── Person.java
├── BMIRecord.java
├── BMICalculator.java
├── BMIMainApp.java
└── README.md

▶️ How to Run

  1. Clone the repository
    git clone https://github.com/yogeshkumarsaini/BMI-Calculator.git
    
  2. Compile the program
    javac *.java
    
  3. Run the application
    java BMIMainApp
    

🎯 Use Cases

  • Java beginner practice
  • College mini-project
  • OOP learning
  • Interview preparation
  • Console application demo

🔮 Future Enhancements

  • 💾 Save BMI history to a file
  • 🕒 Add date & time to BMI records
  • 🧪 Unit testing
  • 🖥️ GUI using JavaFX or Swing
  • 🌐 REST API using Spring Boot

About

Menu-driven BMI Calculator built in Java using OOP principles. Calculates BMI using height (cm/m) and weight, displays health status, stores BMI history, and handles invalid inputs gracefully.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages