Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Debugging Exercise 8-4 LT Instructions >_ Terminal Debug Eight4.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. | Grading When you
Debugging Exercise 8-4 LT Instructions >_ Terminal Debug Eight4.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. | Grading When you have completed your program, click the Submit button to record your score. Debug Eight4.cs + 1 // Program demonstrates overloaded methods 2 // that display an int, an amount of money, or a string 3 // decorated with an argument character 4 // or a default character 'X' 5 using System; 6 using static System.Console; 7 using System. Globalization; 8 class DebugEight4 9{ 10 static void Main() 11 { 12 FancyDisplay (33); 13 FancyDisplay (44, "@"); 14 FancyDisplay (55.55); 15 FancyDisplay (77.77, '*'); 16 FancyDisplay("hello"); 17 FancyDisplay("goodbye", '#'); 18 } 19 public static void FancyDisplay(int num, char decoration = 'X') 20 { 21 WriteLine("{0}{1}{2} {1} {0}{1}{2} ", 22. decoration, num); 23 } 24 public static void FancyDisply(double num, char decoration = 'X') 25 { 26 WriteLine("{0}{0}{0} {0}{0}{0} ", 27 decoration, num.ToString("C", CultureInfo.GetCulture Info("en-US")); 28 } 29 public static void FancyDisplay(word, char decoration = 'X') 30 { 31 WriteLine("{0}{0}{0}{1} {1}{0}{0} ", 32 decoration, word); 33 } 34 35 ) 36
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started