demonstrate File I/O, user input, and output manipulation

时间:2022-03-11 09:18:35
【文件属性】:

文件名称:demonstrate File I/O, user input, and output manipulation

文件大小:38KB

文件格式:RAR

更新时间:2022-03-11 09:18:35

c++ cs120 uvm File I/O

demonstrate File I/O, user input, and output manipulation Design Consider the following questions: - What input will you prompt from the user? - What potentially bad input could the user enter? - What will you read and write to files? - How will you display the output to the console? Some examples: - Ask the user for a year (within a reasonable range of years). Read from a file that contains the hit songs from that year and display the artist, song, number of weeks on the charts, etc. Write the user’s year choice to a file so that you can keep track of the most requested years. - Ask the user to choose a sports team. Read from a file and display the team players with their stats. Ask the user for their favorite player and write their response to a file. - Ask the user to input 10 numbers. Display stats on the numbers (min, max, median, mean) and write the data and stats to a file. Give the user an option to search past numbers and read them in from a file, printing them to the console. - Complete a Mad Libs - style word game. Read from a file the sentence and the parts of speech of the words needed (noun, adjective, etc.), ask the user to input the words and display the resulting silly sentences to the console and to a file. Implement You must receive input from the user, including at least one numerical value. You must check for bad user input (for all numerical inputs). You must read from a file and write to a file (they can be the same file, if appropriate). You must use at least four different types of output manipulations you learned in class. You must submit via Blackboard your .cpp file(s) and your file(s) to read/write. Test Make sure you test your program thoroughly, catching and dealing with any possible input from the user.


【文件预览】:
代码
----main.cpp(3KB)
----readFile.h(261B)
----Project1.pdf(39KB)
----readFile.cpp(1KB)
----myFile.txt(39B)

网友评论