// Uses DisplayWebAddress method three times using System; public class DebugSev
ID: 3530818 • Letter: #
Question
// Uses DisplayWebAddress method three times using System; public class DebugSeven1 { public static void Main() { DisplayWebAddress(); Console.WriteLine("Shop at Shopper's World"); DisplayWebAddress(address); Console.WriteLine("The best bargains from around the world"); DisplayWebAddress(address); } public static DisplayWebAddress() { Console.WriteLine("------------------------------"); Console.WriteLine("Visit us on the web at:"); Console.WriteLine("www.shoppersworldbargains.com"); Console.WriteLine("******************************"); } }Explanation / Answer
//corrected
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Uses DisplayWebAddress method three times
public class DebugSeven1 {
public static void Main() {
DisplayWebAddress();
Console.WriteLine("Shop at Shopper's World");
DisplayWebAddress();
Console.WriteLine("The best bargains from around the world");
DisplayWebAddress();
Console.ReadLine(); Console.ReadLine(); //stall compiler from closing for 2 line reads
}
public static void DisplayWebAddress() {
Console.WriteLine("------------------------------");
Console.WriteLine("Visit us on the web at:");
Console.WriteLine("www.shoppersworldbargains.com");
Console.WriteLine("******************************");
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.