Question: C++ Programming, C++!!! sample output file Properties.txt: Note: Write a class TextFile and name your main exactly hw3.cpp, and the rest being textfile.h and textfile.cpp.

C++ Programming, C++!!!

C++ Programming, C++!!! sample output file "Properties.txt": Note: Write a class TextFile

sample output file "Properties.txt":

and name your main exactly hw3.cpp, and the rest being textfile.h and

Note: Write a class TextFile and name your main exactly hw3.cpp, and the rest being textfile.h and textfile.cpp.

Problem 1: Using good coding practices, write a program that compares the contents of two .txt" files and then saves the properties of the files in another Properties.txt file. The properties of the each file should include the name of the file, the number of characters, the number of words, and a sentence stating if one file has more lines than the other or the same amount of lines. Your program should prompt the user for the name of the files. Use operator overload- ing to write functions that compare both files by the amount of lines such that ( file1 > file2 ) returns true if file1 contains more lines than file2 and false otherwise. Similarly ( file1 == file2 ) returns true if the files contain the same amount of lines. Figure 1 shows a sample output for the given file1 and file2. Properties - Notepad File Edit Format View Help File Name: JEMAbstract.txt Number of characters: 338 Number of words: 46 File Name : PhysicaDAbstract.txt Number of characters: 221 Number of words: 29 The file named "JFMAbstract.txt" has less lines than "PhysicaDAbstract.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!