Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are required to develop a JAVA program to analyze data collected from a survey. In the survey, the respondents are required to enter their

image text in transcribed

You are required to develop a JAVA program to analyze data collected from a survey. In the survey, the respondents are required to enter their personal information. Then, they are required to answer 5 questions. For each question, the respondents need to answer them using the following rating: Strongly Disagree Undecided Agree Strongly Disagree Agree (1) (2) (3) (4) (5) The text file below shows the example of the survey data collected. M;19;3;5;2;1;3 F;25;4;4;5;4;4 M;22;4;3;5;5;3 M;35;3;2;3;1;1 F;41;5;1;2;3;2 survey.txt The data contains 7 columns. The first column is the gender of the respondent (M-Male, F- Female), followed by age and rating to all 5 questions. Write a JAVA program that will do the following task: Read the text file survey.txt and produce the following output: # Gender Avg Score 1 M 2 F 3 M 4 M 5 F 2.8 4.2 4.0 2.0 2.6 Average score for Q1: 3.8 Average score for Q2: 3.0 Average score for 23: 3.4 Average score for 24: 2.8 Average score for 25: 2.6 summary.txt Print the number of male and female respondents using standard output. Use Exception handling to deal with the file input-output errors

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

Step: 3

blur-text-image

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions