Create the logic for a program that accepts input values for the projected cost of a vacation and the number

of months until vacation. Both values must be greater than zero. Pass both values to a method named
displaySavingsAmt(cost, months) that displays the amount you must save per month to achieve your
goal.

To create the logic for the program, you can follow these steps:

1. Begin by defining a class for the program, let's call it "VacationSavingsCalculator".

2. Inside the class, define a static method named "displaySavingsAmt" that takes two parameters: "cost" and "months".

3. Before proceeding further, validate the input values to ensure they are greater than zero. If either of the values is less than or equal to zero, display an error message.

4. If both values are valid, calculate the amount that needs to be saved per month to achieve the goal. You can divide the projected cost by the number of months.

5. Display the result, either by printing it to the console or by returning a value from the method.

Below is an example implementation in Java:

```java
public class VacationSavingsCalculator {
public static void main(String[] args) {
// Accept input values for the projected cost and number of months
double cost = 2000.0;
int months = 12;

// Call the displaySavingsAmt method
displaySavingsAmt(cost, months);
}

public static void displaySavingsAmt(double cost, int months) {
// Validate the input values
if (cost <= 0 || months <= 0) {
System.out.println("Invalid input! Both cost and months must be greater than zero.");
return;
}

// Calculate the amount to save per month
double savingsAmt = cost / months;

// Display the result
System.out.println("To achieve your goal, you must save $" + savingsAmt + " per month.");
}
}
```

In the example above, we have initialized the `cost` variable with a value of 2000.0 and the `months` variable with a value of 12. You can modify these values according to your needs.