Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Description: that prompts the user for a time and outputs whether it's breakfast thee, or Purpose: This application provides experience with user input and interaction
Description: that prompts the user for a time and outputs whether it's breakfast thee, or
Purpose: This application provides experience with user input and interaction in the Console, writing decision structures, and string operations in C#NET.
Requirements:
Project Name: MealTime
Target Platform: Console
Programming Language: C#
In your project, implement a program that prompts the user for a time and outputs whether it's Breakfast tine, Lunch tise, or Dinner tine, If it's not time for a meal, output Not tise
The meal times are breakfast between : and : lunch between : and : and dinner between : and : Assume that the user's input will be formatted in hour time as : or And assume that each meal's time range is inclusive of the end points in the time range. For instance, whether it's ::: or : or anytime in between, it's time for breakfast.
Your are to also create a function called that can be called by main that accepts one parameter, the string time the user entered, and converts time, a string in hour format, to the corresponding number of hours as a float For instance, given a time like :ie hours and minutes convert should return ie hours
public static float convertileestring time
Note: You do not need to implement exception handling in this program. We will implement that in a future program
Your Program Should
Prompt the user to enter the time.
Get the user response.
Send the user response to the convertTime function to convert the time to a floating point value.
Use the converted time to determine whether it is Breakfost time, Lunch time, or Dinner time.
Breakfast between : and : Lunch between : and : Dinner between : and :
Output the appropriate message to the user.
End program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started