Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm having difficulty adjusting this debugging program to output EXACTLY to the screenshot. Any help would be appreciated. using System; using static System.Console; using System.IO;

I'm having difficulty adjusting this debugging program to output EXACTLY to the screenshot. Any help would be appreciated.

using System; using static System.Console; using System.IO;

namespace Program { class Program { static void Main() { string directory = ""; string path; string[] files; const string END = "end";

Write("Enter a directory >> "); directory = ReadLine(); while (directory != END) { if (Directory.Exists(directory)) { files = Directory.GetFiles(directory); if (files.Length == 0) WriteLine("{0} directory is empty.", directory); else { for (int x = 0; x > "); directory = ReadLine(); path = directory; } } else { WriteLine("Directory " + directory + " does not exist"); } } } } }

The results should look EXACTLY like the screenshot:

image text in transcribed

C:AWINDOWS system32\cmd.exe Enter a directory CUsers\Admin\Documents SWDV110\Chapter14\Chapter14_Debugging C: \Users Admin\Documents \SWDV11e\Chapter14\Chapter14_Debugging contains the following files C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_Debugging\DebugFourteen1.cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_Debugging\DebugFourteen2.cs C: \Users\Admin\Documents\SWDV110\Chapter14\Chapter14. Debugging\DebugFourteen3cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_Debugging\DebugFourteen4.cs Enter another directory or type end to quit >> C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14. Code1nFigures C: \Users Admin\Documents \SWDV11e\Chapter14\Chapter14_CodeInFigures contains the following files C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\BusinessLetter.txt C: \Users Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures \Data.ser C: \Users\Admin\Documents\SWDV110\Chapter14\Chapter14-Code1nFigures\DirectoryInformation. cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\EmployeeData.txt C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\FileStatistics.cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\FindEmployees.cs C: \Users\Admin\Documents\SWDV110\Chapter14\Chapter14-CodelnFigures\ReadSequent ial File. cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\SerializableDemonstration.cs C: \Users\Admin\Documents\SWDV110\Chapter14\Chapter14-Code1nFigures\SomeText . txt C: \Users\Admin\Documents\SWDV110\Chapter14\Chapter14-CodelnFiguresWriteSequentialFile.cs C:\Users\Admin\Documents\SWDV110\Chapter14\Chapter14_CodeInFigures\WriteSomeText.cs Enter another directory or type end to quit > quit Directory quit does not exist end Enter another directory or type end to quit Press any key to continue

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_2

Step: 3

blur-text-image_3

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

What are the values and risks of self-disclosing communication?

Answered: 1 week ago

Question

Discuss the Hawthorne experiments in detail

Answered: 1 week ago

Question

Explain the characteristics of a good system of control

Answered: 1 week ago

Question

State the importance of control

Answered: 1 week ago

Question

What are the functions of top management?

Answered: 1 week ago