Write a program that accepts a person’s weight and displays the number of calories the person

needs in one day. A person needs 19 calories per pound of body weight, so the formula expressed in
Java is
Calories = bodyweight * 19;

Writeacher,, yup programming

Sure! Here's a step-by-step guide on how to write a Java program that calculates the number of calories a person needs in one day based on their weight:

Step 1: Import the necessary Java classes for input and output.
```java
import java.util.Scanner;
```

Step 2: Create a Scanner object to read input from the user.
```java
Scanner scanner = new Scanner(System.in);
```

Step 3: Prompt the user to enter their weight and store the value in a variable.
```java
System.out.print("Enter your weight in pounds: ");
double weight = scanner.nextDouble();
```

Step 4: Calculate the number of calories using the formula: Calories = bodyweight * 19.
```java
double calories = weight * 19;
```

Step 5: Display the calculated number of calories to the user.
```java
System.out.println("Number of calories you need in one day: " + calories);
```

Step 6: Close the scanner object to release any system resources.
```java
scanner.close();
```

Putting it all together, here's the complete code:

```java
import java.util.Scanner;

public class CalorieCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);

System.out.print("Enter your weight in pounds: ");
double weight = scanner.nextDouble();

double calories = weight * 19;

System.out.println("Number of calories you need in one day: " + calories);

scanner.close();
}
}
```

That's it! The program will prompt the user to enter their weight, calculate the number of calories needed, and display the result.

To create a program that accepts a person's weight and displays the number of calories the person needs in one day, you can follow these steps:

1. Write a Java program and create a class called "CalorieCalculator" or any other suitable name.

2. Set up a method to read the weight input from the user. You can use the `Scanner` class to accomplish this. Here's an example:

```java
import java.util.Scanner;

public class CalorieCalculator {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter your weight in pounds: ");
double weight = scanner.nextDouble();
scanner.close();

// Calculate the calories
double calories = weight * 19;

// Display the result
System.out.println("Number of calories needed per day: " + calories);
}
}
```

In the code above, we use the `Scanner` class to read the weight input from the user. We then multiply the weight by 19 to calculate the number of calories needed per day.

3. Compile and run the program. When prompted, enter the weight in pounds. The program will calculate and display the number of calories needed per day.

Now, when you run the program and enter the weight, it will display the corresponding number of calories needed per day using the formula `Calories = bodyweight * 19`.