This assignment uses functins files and strings Enough flexi

This assignment uses functins, files, and strings. Enough flexibility is provided for you to apply your knowledge of C++ programing to develop your solution.

Develop a functional flowchart and then write a C++ program to solve the following problem.

Create a text file named course.txt and write the ELET in the file. You will be reading the name of the file from the keyboard as a string, using the string class. Your program will also read the course from the keyboard. The process of the file creation (name of the file, mode for opening the file, and testing the open success is done in a user-defined function. The function communicates the status of file open to the calling function).

Create a text file named number.txt and write the course number 2300 in the file. You will be reading the name of the file from the keyboard as a string, using the string class. Your program will also read the course number from the keyboard. The process of the file creation (name of the file, mode for opening the file and testing the open success is done in a user-defined function. The function communicates the status of file open to the calling function)

Create a text file named e2300.txt and write the course from the file course.txt, and the course number from the file number.txt into the newly created file. You will be reading the name of the file from the keyboard as a string, using the string class. The process of the file creation (name of the file, mode for opening the file and testing the open success is done in a user-defined function. The function communicates the status of file open to the calling function)

At this time, each file will have one line of text in it.

Prepare the files for reading.

Display the results of the three files in the order shown below:

course.txt                              the course as written in the file (ELET)

number.txt                            the course number as written in the file (2300)

cnumber.txt                          the course and number as written in the file (ELET 2300)

Note that there is a single space between the course and the course number when you display the contents of the file cnumber.txt. There is a blank line between each line of output.

You will use a user-defined function to display all the files at once or one at a time.

Close all the files. You will use a user-defined function that closes each file separately or all at once.

Run the program again and use your choice of the filenames, and different names, different than what you used above and repeat the process.

The programs in the book and sample programs show you how to read file names as strings and how to convert the strings to the C string, if needed.

Grading:

                                System Flowchart                                10 points                              

                                Documentation                                    10 points – problem statement, other documentation

                                Proper use of functions, files and strings         45 points

                                Program completeness                       15 points, this includes program correctness, efficient programming, using right constructs for the solution, and proper use of coding as emphasized in class

                                Sample correct outputs                      10 points              

Notes:(please read very carefully)

1. Make sure your files are VIRUS FREE! (A grade of 0 will be given for infected files). Use Technology lab PCs for the test.

2. Comment your program.

3. Use meaningful prompts.

3a. You need to review “how to submit your homework” document. Incomplete submissions will not be graded.

4. Provide a brief description of the problem being solved.

5. Be sure to include a header file at the beginning of your program as shown in the course syllabus.

6. NO global declarations of VARIABLES allowed in any program that you develop in this course.

6a. The program uses many user-defined functions as stated in the assignment. You may use additional functions to facilitate your solution. At no time you are allowed to change the essential parts of the problem. Your function arguments cannot be more than five.

7. On the due date, submit your H8 containing the components of the program specified in the guidelines. Create a Word file that contains the header, the flowchart, the list of your .cpp file, and the sample runs of the program. Name this file H8NAME.docx. The source file for H8NAME.cpp and the Visio 2013 file H8NAME.vsdx will be uploaded as well. Unrelated files should not be present when you upload them to the Blackboard. Homework must be uploaded to Blackboard by 9PM of the due date and late homework will not be accepted. NAME is your last name.

8. Use Microsoft Visual Studio Enterprise 2015 compiler using default compiler settings.

9. Use Microsoft Visio 2013 to develop your flowchart.

9a. Illegal inputs must be handled properly without terminating the program.

10. Adherence to the ANSI C++ required.

11. Do not use <stdio.h> and <conio.h> in this assignment and all other assignments.

12. Do not use any #define in your program until the time that is required for class declaration header files.

13. No goto statements allowed in any program that you develop in this course.

14. Non-compliance with these notes will cost you points.

15. No collaboration on this assignment and all other assignments allowed. If you violate this policy, your grade for the course will be F.

16. You need to show us your flowchart before we can help you with your code.

17. When copying and pasting code into a Word document, please use the Courier New font with a font size no more than 10.

18. Late homework will not be accepted.

Solution

Enter the name of the file you want to write the course name
course.txt
Enter the course name
ELET
Enter the name of the file you want to write the course number
number.txt
Enter the course number
2300
Enter the name of the file you want to put both course name and number
cnumber.txt
course.txt ELET
number.txt 2300
cnumber.txt ELET 2300

This assignment uses functins, files, and strings. Enough flexibility is provided for you to apply your knowledge of C++ programing to develop your solution. De
This assignment uses functins, files, and strings. Enough flexibility is provided for you to apply your knowledge of C++ programing to develop your solution. De

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site