Concept explainers
List of variables:
CENTIMETERS_IN_INCH: Stores centimeter to inches conversion factor,i.e,. 2.54.
userInput: Takes string input from user.
inch: Store inches value
centi: Store converted value in centimeter
List of functions used:
Write(): To display instructions in string to user,
ReadLine(): To read input from user in string format.
double.TryParse(): To convert the entered string into double.
ReadKey(): To end the program after reading a random variable.
Summary Introduction:
Program will use Main () method to prompt the user to enter a value in inches. This value is then converted to centimeter using CENTIMETER_IN_INCH variable which stores a constant value of 2.45(conversion factor).The converted value is displayed to user on console.
Program Description:
Purpose of program is to take value in inches and display it in centimeters.
Trending nowThis is a popular solution!
Chapter 2 Solutions
Microsoft Visual C#
- _____________ are controls through which a user can enter input data in a GUI application. a. Labels b. Tags c. Tickets d. TextBoxesarrow_forwardIn Chapter 2, you created an interactive application named GreenvilleRevenue, and in Chapter 3 you created a GUI version of the application named GreenvilleRevenueGUI. The programs prompt a user for the number of contestants entered in this years and last years Greenville Idol competition, and then they display the revenue expected for this years competition if each contestant pays a $25 entrance fee. The programs also display a statement that compares the number of contestants each year. Now, replace that statement with one of the following messages: If the competition has more than twice as many contestants as last year, display The competition is more than twice as big this year! If the competition is bigger than last years but not more than twice as big, display The competition is bigger than ever! If the competition is smaller than last years, display, A tighter race this year! Come out and cast your vote!arrow_forwardFor each of the following exercises, you may choose to write a console-based or GUI application, or both. Write a program for The Carefree Resort named ResortPrices that prompts the user to enter the number of days for a resort stay. Then display the price per night and the total price. Nightly rates are $200 for one or two nights; $180 for three or four nights; $160 for five, six, or seven nights; and $145 for eight nights or more.arrow_forward
- Visual Studio Program 1. Charges in a Luxury Resort (Nr 6, Page 410)Create an application that calculates the total cost of a hotel stay. The daily accommodation charge is $550. The hotel also provides other services like restaurant and bar, spa, car rental, and medication and rehabilitation. The application should accept the following input: The number of days spent in the hotel The restaurant charges including VAT The amount accrued from spa and health treatments The amount accrued in car rental The amount accrued in medical and rehabilitation servicesCreate and use the following value-returning methods in the application: CalcStayCharges() – Calculates and returns the base charges for the hotel stay. This is computed as $450 times the number of days in the hotel. CalcMiscCharges() – Calculates and returns the total of the food bill, spa charges, car rental, and medication and rehabilitation charges. CalcTotalCharges() – Calculates and returns the total of all charges.arrow_forwardWrite a Visual Studio 2019 Windows Forms Application that allows a user to input five daily Fahrenheit temperatures that must range from −30 to 130; if a temperature is out of range, require the user to reenter it. If no temperature is lower than any previous one, display a message Getting warmer. If every temperature is lower than the previous one, display a message Getting cooler. If the temperatures are not entered in either ascending or descending order, display a message It’s a mixed bag . Finally, display the average of the temperatures. Use the Controls that you think are best for each function. Label items appropriately, and use fonts and colors to achieve an attractive design. Include a Close button to exit the application.arrow_forwardWrite a Visual Studio 2019 Windows Forms Application that allows a user to input five daily Fahrenheit temperatures that must range from −30 to 130; if a temperature is out of range, require the user to reenter it. If no temperature is lower than any previous one, display a message Getting warmer. If every temperature is lower than the previous one, display a message Getting cooler. If the temperatures are not entered in either ascending or descending order, display a message It’s a mixed bag . Finally, display the average of the temperatures. Use the Controls that you think are best for each function. Label items appropriately, and use fonts and colors to achieve an attractive design. Include a Close button to exit the application. use C# languagearrow_forward
- create the following gui app using Python tkinter library when the user enters a number (ex: 80) and presses the "convert" button, it displays the following output: 80.0 Fahrenheit = 26.67 celsius when user presses the "reset" button, it resets both the text field as well as the label/resultarrow_forwardFor this Mini-project, you need to create an application that allows the user to input two decimal numbers. The application should also have buttons that allow the user to request that the numbers are added, subtracted, multiplied, or divided. In addition, give an option to complete all 4 calculations or to clear the input and output (i.e., reset the page to its starting state). The program is written in C# in Visual Studio using the Web Form Design. Thank you!arrow_forwardVisual C# Blank App (Universal Windows) Create a program that prompts for a numeric value and then calculate the square root of this number. Need to display the result. The user interface must include a TextBox, Button, and two Label controls on the main window. Calculate square roots, do not use Math.Sqrt or any square root method (or any math library) or another Math method of the .NET Framework on this assignment. See the Picture attached to test the application using the dataarrow_forward
- Needs to be done in C# Microsoft Visual Studio in Window Form App (.Net Frameworks) please specifiy the design names used: label = label1, button = convert_button, groupbox = groupbox1, etc.. for each one! As a test to verify your input and output. Make sure to try entering 23 inches and convert to yards. Then take the yards and convert them back to inches. thank you.arrow_forwardDraw the flowchart for an application that will request the user to enter the radius of a circle. The radius of a circle is the distance between the centre of the circle and the edge of the circle (indicated by the red line in the diagram below). Calculate and display the area of the circle. The formula for calculating the area of a circle is: A = 3.14x (rxr) A = area r = radius π = 3.14 (which is called PI)arrow_forwardYou can use a(n) __________ control to display a graphic image on a form. a. Graphics b. PictureBox c. Drawing d. ImageBoxarrow_forward
- Microsoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage