首页 新闻 聚焦 科技 财经 创业 综合 图片 视频

IT界

旗下栏目: 行业 生态 IT界 创新

代写PIC 10B课程、program编程代写

来源:互联网 发布时间:2021-02-19
代写PIC 10B课程、program编程代写
PIC 10B Homework 3 Due Wednesday, Feb 17
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 overloading
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.
Figure 1: Homework 3 sample console, input files “JFMAbstract.txt” and “PhysicaDAbstract”,
and resulting output file “Properties.txt”
Due Wednesday, Feb 17 Homework 3 PIC 10B
Good Coding Practices:
❼ think about cross-platform. Don’t use Windows or Mac only commands. For example,
pause == cin.get() twice, Write many \n vs. system(clear) or system(’cls).
❼ passing objects by reference & or const & when possible
❼ using field initializer list when possible in all constructors
Instructions for submission:
❼ Name your filse Exactly hw3.cpp, textfile.h and textfile.cpp.
❼ You may not use #include "stdafx.h".
❼ Add code description in the comment at the beginning of the file.
A sample description may look like:
/*
PIC 10B 2A, Homework 1
Purpose: Tic-tac-toe game
Author: Hanqin Cai
Date: 10/10/2019
*/
❼ Submit your header files and Source codes to CCLE in separate files. Only .h and .cpp
files should be uploaded.
 
如有需要,请加QQ:99515681 或WX:codehelp
  免责声明:珠穆朗玛网对于有关本网站的任何内容、信息或广告,不声明或保证其正确性或可靠性,用户自行承担使用网站信息发布内容的真假风险。
责任编辑:珠穆朗玛网