Package com.example.demo.calorie
Class CaloriePrompts
java.lang.Object
com.example.demo.calorie.CaloriePrompts
Provides static methods for displaying prompts and reading user input from the console.
This class handles the basic command-line interface (CLI) for the application.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidfood()Prompts the user to enter the date and the name of the food or drink item to be logged.static intDisplays the main menu prompt (fromCalorieUtil.prompt) and reads the user's integer selection from the console.
-
Constructor Details
-
CaloriePrompts
public CaloriePrompts()
-
-
Method Details
-
promptSelector
public static int promptSelector()Displays the main menu prompt (fromCalorieUtil.prompt) and reads the user's integer selection from the console.Note: This code is just here for testing without turning on the front end
- Returns:
- The integer value representing the user's selection.
-
food
Prompts the user to enter the date and the name of the food or drink item to be logged.- Throws:
FileNotFoundException- If file operations were involved and it doesnt find it .
-