Question: write a program that reads in the file and finds all years when the percent of women graduates was greater than a given value. Ask

write a program that reads in the file and finds all years when the percent of women graduates was greater than a given value.

  1. Ask the user to enter the name of the data file.
  2. Read the data from the file into four lists:
  • Year, Total #CS Grads, #Men CS Grads, #Women CS Grads
  1. Ask the user to enter the percent of women they are interested in.
  2. Print a list of years in which the percent of female CS graduates was greater than the given number.

few things to note when working on this program:.

  1. test that the file entered by the user exists and catch the error with exception handling.
  2. test that the percent entered by the user is a valid number.
  3. program should have at least these functions:
  • getData - read data from the data file
  • findYears - finds the years when the percent of women students was was higher than the given value
  • printResults - print the list of years that were returned by findYears
  • main - calls the other functions

I may need other functions as well to handle exceptions.

Need some help constructing this code, and any help is much appreciated.

write a program that reads in the file and finds all years

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!