Comp 151 Project 5:
Summary:In this lab you will write a program to merge two text files into one.
Due: Sunday Nov 7th at 11:59pm
This time you are given the freedom to design your
program on your own under the constraints given below. There will be no
UML to follow.
Your program must
- query the user about which two files the user wants to
copy into a new one,
- query the user about what file name the user wants to use as the output the program to.
- take the first line of the first input file and copy it into the output file
- then take the first line of the second input file and copy it into the output file
- contiue copying a line from each the first file and then a line
from the second file till you have copied all of the lines from both
- if one of the files has fewer lines than the other simply copy the remaining lines of the longer file into the output file.
To help you get in the habit of good program writing, I am imposing the following additional restrictions on your program.
- You may not have
more than three lines of code in the main method
- You must comment your code. We are starting to get to the point
where you are writing longer programs and doing more on your own. you
will need to start commenting your code so that both you and I know
what you are trying to do. To this end credit in the assignment will be
reservedfor grading your comments.
- Add a readme.txt file as a text file in your submission. Your readme file should contain
- your name
- a brief (one paragraph) description of how
you implemented the project,
- anything that is left undone in the project.
again zip up your project folder and submit it to me by email. Make sure that your submitted zip file
contains your first initial and last name as part of the zip file name.