Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a file that contains your favorite movie quote. Use a text editor such as

ID: 1267786 • Letter: C

Question

Create a file that contains your favorite movie quote. Use a text editor such as Notepad and save the file as Quote.txt. Copy the file contents and paste them into a word-processing program such as Word. Save the file as Quote.doc. Write console 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 a statement such as the following, where FILE_NAME is a string that contains the name of the file:

Explanation / Answer

Create the two files as described.
Use FileInfo to get the the size of each file.
Display the file name and it's size.
Calculate the ratio of the sizes (either txt/doc or doc/txt, your choice). Be aware that int/int will not result in a good ratio, so convert the values to doubles first.
Display the ratio, making sure you tell which of the above you choose.
It's about 6 lines of code.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote