Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Figure 7.8 contains an array of survey responses thats hard coded into the program. Suppose we wish to process survey results that are stored in

Figure 7.8 contains an array of survey responses thats hard coded into the program. Suppose we wish to process survey results that are stored in a file. This exercise requires two separate programs. First, create an application that prompts the user for survey responses and outputs each response to a file. Use a Formatter to create a file called numbers.txt. Each integer should be written using method format. Then modify the program in Fig. 7.8 to read the survey responses from numbers.txt. The responses should be read from the file by using a Scanner. Use method nextInt to input one integer at a time from the file. The program should continue to read responses until it reaches the end of the file. The results should be output to the text file "output.txt".

Submit StudentPoll.java - that takes input from keyboard and writes results directly to a file - this is our raw data and the file name is numbers.txt, it is literally a file of numbers between the values of 1 - 5.

Submit PollProcessed.java that takes numbers.txt as input - processes the results by tallying the responses and writes to a file named output.txt. output.txt should be similar to the example file in fig 7.8 of the book where the raw data has been tallied and summarized for all 5 possible ratings.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

b. Will there be one assigned leader?

Answered: 1 week ago