C# programming Chapter 14 question 1 Any help with input, output and comments of any sort would be very helpful.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
C# programming Chapter 14 question 1 Any help with input, output and comments of any sort would be very helpful.
**Chapter 14: Files and Streams**

### Exercises

#### Programming Exercises

1. **DirectoryInformation Program**:  
   Create a program named **DirectoryInformation** that allows users to continuously enter directory names until they type "end." If the directory name exists, display a list of the files in it; otherwise, display a message indicating the directory does not exist. Create as many test directories and files as needed to test your program.

2. **FileComparison Program**:  
   Create a program named **FileComparison** that compares two files. First, use a text editor like Notepad to save your favorite movie quote. Next, copy the file contents and paste them into a word processor like Word. Then, write the file-comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file’s size, you can create a `System.IO.FileInfo` object using statements such as:

   ```csharp
   FileInfo fileInfo = new FileInfo(FILE_NAME);
   size = fileInfo.Length;
   ```

3. **ShowFileInfo Project**:  
   Using Visual Studio, create a project named **ShowFileInfo** that contains a Form similar to the one in Figure 14-38. Specify a directory on your system, and when the Form loads, list the files the directory contains in a `ListBox`. Allow the user to click a file name, and then display the file’s creation date and time. Each time the user selects a new filename, update the creation date display. Create as many files as necessary to test your program.

**Diagram Explanation**:
- The image shows a screenshot of a Windows Form labeled "File Info."
- It includes a section where users can "Select a file:" from a list.
- Below the list, there is a section labeled "File information:" which displays the "Creation time:" followed by the date and time. In the image, the date and time shown are "2/25/2017 9:09:13 AM." 
- This setup helps users to select files and view their details in a clear, organized manner.
Transcribed Image Text:**Chapter 14: Files and Streams** ### Exercises #### Programming Exercises 1. **DirectoryInformation Program**: Create a program named **DirectoryInformation** that allows users to continuously enter directory names until they type "end." If the directory name exists, display a list of the files in it; otherwise, display a message indicating the directory does not exist. Create as many test directories and files as needed to test your program. 2. **FileComparison Program**: Create a program named **FileComparison** that compares two files. First, use a text editor like Notepad to save your favorite movie quote. Next, copy the file contents and paste them into a word processor like Word. Then, write the file-comparison application that displays the sizes of the two files as well as the ratio of their sizes to each other. To discover a file’s size, you can create a `System.IO.FileInfo` object using statements such as: ```csharp FileInfo fileInfo = new FileInfo(FILE_NAME); size = fileInfo.Length; ``` 3. **ShowFileInfo Project**: Using Visual Studio, create a project named **ShowFileInfo** that contains a Form similar to the one in Figure 14-38. Specify a directory on your system, and when the Form loads, list the files the directory contains in a `ListBox`. Allow the user to click a file name, and then display the file’s creation date and time. Each time the user selects a new filename, update the creation date display. Create as many files as necessary to test your program. **Diagram Explanation**: - The image shows a screenshot of a Windows Form labeled "File Info." - It includes a section where users can "Select a file:" from a list. - Below the list, there is a section labeled "File information:" which displays the "Creation time:" followed by the date and time. In the image, the date and time shown are "2/25/2017 9:09:13 AM." - This setup helps users to select files and view their details in a clear, organized manner.
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY