Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Visual Studio 1.list and identify all errors that you find. Specify which file had the errors, what the error was and state what you did

Visual Studio

1.list and identify all errors that you find. Specify which file had the errors, what the error was and state what you did to fix the error.

2.Use the Error List window to find and correct any syntax errors that display when you try to run the app. Be sure to write down the errors as you encounter them. Put comments in your code to help you keep track of the errors.

3.Use the Internal Server Error page and its stack trace to find and correct any unhandled exceptions that occur when you run the app.

4.Set a breakpoint in the model class and step through its code to find the error that leads to the app calculating an incorrect tip amount.

5.Use the Developer Tools (as shown below) to find and correct the CSS issue that prevents the label elements from displaying with the expected width.

tipcalculator.cs:

using System.ComponentModel.DataAnnotations;

namespace TipCalculator.Models { public class Calculator { [Required(ErrorMessage = "Please enter a value for cost of meal.")] [Range(0.0, 10000000.0, ErrorMessage = "Cost of meal must be greater than zero.")] public double? MealCost { get; set; }

public double CalculateTip(double percent) { if (MealCost.HasValue) { var tip = MealCost.Value / percent; return tip } else { return 0; } } } }

site.css:

body { padding: 1em; font-family: Arial, Arial, Helvetica, sans-serif; }

h1 { margin-top: 0; color: navy; }

label { display: inline-block; widht: 10em; padding-right: 1em; }

div { margin-bottom: .5em; }

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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions