Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am able to get the answer, but I am getting a result with a message: Test: ` ClassifiedAd ` class test Reason: Unable to

I am able to get the answer, but I am getting a result with a message:
Test: `ClassifiedAd` class test
Reason: Unable to run tests.
Error : str - AssertionError
Can some one assist me please.
using System;
using static System.Console;
using System.Globalization;
class TestClassifiedAd
{
static void Main()
{
ClassifiedAd ad_C = new ClassifiedAd();
ad_C.Category = "Used Cars";
ad_C.NumWords =100;
ClassifiedAd ad_H = new ClassifiedAd();
ad_H.Category = "Help Wanted";
ad_H.NumWords =60;
WriteLine("The classified ad with {0} words in category {1} costs {2}", ad_C.NumWords, ad_C.Category, ad_C.Price.ToString("C", CultureInfo.GetCultureInfo("en-US")));
WriteLine("The classified ad with {0} words in category {1} costs {2}", ad_H.NumWords, ad_H.Category, ad_H.Price.ToString("C", CultureInfo.GetCultureInfo("en-US")));
}
}
public class ClassifiedAd
{
public string Category { get; set; }
public int NumWords { get; set; }
public double Price
{
get { return NumWords *0.09; }
}
}

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

Intranet And Web Databases For Dummies

Authors: Paul Litwin

1st Edition

0764502212, 9780764502217

More Books

Students also viewed these Databases questions

Question

What lessons in intervention design, does this case represent?

Answered: 1 week ago