Answered step by step
Verified Expert Solution
Link Copied!

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 7:00 and 8:00, lunch between 12:00 and 13:00, and dinner between 18:00 and 19:00. Assume that the user's input will be formatted in 24-hour time as s:, or , And assume that each meal's time range is inclusive of the end points in the time range. For instance, whether it's 7:00,7:01,7:59, or 8:00, 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 24-hour format, to the corresponding number of hours as a float). For instance, given a time like -7:30-(i.e.,7 hours and 30 minutes), convert should return 7.5(i.e.,7.5 hours).
public static float convertilee(string 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 7:00 and 8:00, Lunch between 12:00 and 13:00, Dinner between 18:00 and 19:00
Output the appropriate message to the user.
End program
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Xxiv Special Issue On Database And Expert Systems Applications Lncs 9510

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Hendrik Decker ,Lenka Lhotska ,Sebastian Link

1st Edition

366249213X, 978-3662492130

More Books

Students also viewed these Databases questions

Question

If sin = -1/3 and Answered: 1 week ago

Answered: 1 week ago