Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 0 . 1 P | Fix it - Sort Records Challenge ( D ) Submissions Description data.txt fix _ it . rb 1 0
P Fix it Sort Records
Challenge
D Submissions
Description
data.txt
fixitrb
P Fix it Sort Records
In this task you will build on the debugging skills developed in your other Pass and Tutorial tasks.
TIP: There are errors in the code two are typing syntax errors, one is a logic error.
Your program should produce the following output:
useresahara $ ruby fix fic,rb
first line:
Line read: Fred
Line read: Jill
Line read: Johnny
Line read: Sam
Line read: Sam
Class MyRecord
attraccessor :name, :age
def initializename age
aname name
@age age
end
end
def compare direction
if direction
else
end
end
def sort direction
ount arr. length
Spaces:
Console
Terminal
Run
Mark
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started