From the course: Code Clinic: Ruby

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Overview of my solution

Overview of my solution

From the course: Code Clinic: Ruby

Start my 1-month free trial

Overview of my solution

I want to begin by giving you an overview and a demonstration of my solution. My solution to this challenge consists of five parts. First, accepting user input. As the problem states, this program should be able to retrieve data for any given range of dates for which there is data available. So we will need to ask the user for a start date, and an end date. And then we'll need to validate that those dates are valid, that they fall into the range of dates that are available on the Navy's website. Once we have a valid date range then we'll need to retrieve the data. We'll query the remote server and extract the results that we want from the returned page, so that we have data to work with. Third will be our calculations. We'll take the data that we've retrieved and run our statistical calculations on it, to determine the mean and the median of the values. And then we'll output the results. We can output the calculated results the the screen in a nicely formatted table. Now remember…

Contents