Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Give me that answer in ruby Your objective in this assignment is to create a program that uses data within files t o display a

image text in transcribed
Give me that answer in ruby
Your objective in this assignment is to create a program that uses data within files t o display a list of a given team has won the Major League baseball World Series winners and tell the user how many times World Series over its history. Records exist from 1903 through 2017. The data is stored in two text files that accompany the assignment. The first file, teams.txt, contains an alphabetical list of teams who have won at least once. 1903 that won in 2017. Note that the World Series was not played in 1904 and 1994.) The second file, winners.txt, contains a chronological list of the winning teams from through 2017. (The first line shows the team that won in 1903, and the last line shows the team Your program should bring up a menu with the three choices shown below: 1. Show Major League winners 2. Show number of wins for a team 3. Exit The menu options should operate as follows: 1. The first choice simply shows the list of winning teams in alphabetical order. 2. The second choice asks the user for a team and, if valid, displays the number of times the team has When the user selects a team, an algorithm should step through the array counting the number of times array. the selected team appears. 3. The menu should continue to appear until the user selects the third choice, which will terminate the program. Use your knowledge of Ruby and build the program in a file named Asg11.rb. Download the dita files from Blackboard and put them in the same folder. Build a list of comments that constitute an algorithm, and then write the code to implement it. Make sure you document your program and consistently follow style guidelines, which include blank spaces between functional sections of code, naming variables properly, and adding comments where the purpose of a line of code is not immediately obvious by itself Submit your Asg11.rb file. You do not need to send me the data files; do not send any zip files in. Just nd me the one file named Asg11.rb and I will use my own data fil

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

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions