https://github.com/itsjomon/calorie-calculator
A simple Java-based console application that calculates your daily calorie needs based on your age, gender, weight, height, and activity level using the Basal Metabolic Rate (BMR) formula.
https://github.com/itsjomon/calorie-calculator
calorie-calculator java java-console-application java-mini-project java-scanner
Last synced: 2 months ago
JSON representation
A simple Java-based console application that calculates your daily calorie needs based on your age, gender, weight, height, and activity level using the Basal Metabolic Rate (BMR) formula.
- Host: GitHub
- URL: https://github.com/itsjomon/calorie-calculator
- Owner: itsjomon
- Created: 2025-04-15T11:30:33.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-15T12:00:00.000Z (2 months ago)
- Last Synced: 2025-04-15T12:28:27.010Z (2 months ago)
- Topics: calorie-calculator, java, java-console-application, java-mini-project, java-scanner
- Language: Java
- Homepage:
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calorie Calculator (Java Console Application)
A simple Java-based console application that calculates your daily calorie needs based on your age, gender, weight, height, and activity level using the **Basal Metabolic Rate (BMR)** formula.
## Features
- Calculates **Basal Metabolic Rate (BMR)** using gender-specific formulas
- Adjusts calorie needs based on activity level:
- Sedentary
- Moderate
- Active
- Validates all user inputs
- Easy-to-use console interface## Technologies Used
- Java
- Java `Scanner` for input
- Command-line interface## Getting Started
1. Clone this repository or copy the source code.
2. Make sure you have **Java installed** on your system.
You can check using:
```bash
java -version
```3. Compile the code:
```bash
javac App.java
```4. Run the compiled program:
```bash
java App
```
## Example Usage```
Calorie Calculator
Enter your gender (M/F): M
Enter your age (in years): 21
Enter your weight (in kilograms): 70
Enter your height (in centimeters): 175
Enter your activity level (sedentary/moderate/active): moderateYour Basal Metabolic Rate (BMR) is: 1723 calories per day.
Your estimated daily calorie needs are: 2671 calories per day.
```## Formula Reference
- **BMR for Men**:
`88.362 + (13.397 × weight in kg) + (4.799 × height in cm) − (5.677 × age in years)`
- **BMR for Women**:
`447.593 + (9.247 × weight in kg) + (3.098 × height in cm) − (4.330 × age in years)`
- **Activity Multipliers**:
- Sedentary: × 1.2
- Moderate: × 1.55
- Active: × 1.725
## 🌟 *Don’t Forget to Star!*
If you find this project useful, please consider giving it a star ⭐. It helps others discover it too!