Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

If a program must use a file several times, is it better to open and close it each time or keep it open for the

If a program must use a file several times, is it better to open and close it each time or keep it open for the duration of the program?

In Exercise 3 earlier in this chapter, what did you discover about the size difference of files that held the same contents but were created using different software (such as Word and Notepad)? Why do you think the file sizes are so different, even though the files contain the same data?

Exercise 3

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 wordprocessing program such as Word. Save the file as quote.doc. Write an application that displays the sizes of the two files as well as the ratio of their sizes to each other. Save the file as FileStatistics2.java.

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

Step: 3

blur-text-image

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

The Core Ios Developer S Cookbook Core Recipes For Programmers

Authors: Erica Sadun ,Rich Wardwell

5th Edition

0321948106, 978-0321948106

More Books

Students also viewed these Programming questions

Question

=+b) What were the treatments?

Answered: 1 week ago

Question

If f(c) 0 20 0 17 0 40 0 30 0 22 5c2 20m + 24, find lim

Answered: 1 week ago