Question: # Ruby Basics Part 3 class BookInStock # YOUR CODE HERE end Question 2 1 pts Define a class called BooklnStock which represents a book

 # Ruby Basics Part 3 class BookInStock # YOUR CODE HERE

# Ruby Basics Part 3

class BookInStock # YOUR CODE HERE

end

Question 2 1 pts Define a class called BooklnStock which represents a book with an ISBN number variable nameisbn), and price of the book as a floating-point number (variable name->price), as attributes. Your first step is to create your getters and setters. Read A Beginner's Guide to Ruby Your second step is to create a constructor should accept the ISBN number (a string, since in real life ISBN numbers can begin with zero and can include hyphens) as the first argument and price as second argument. Read Ruby Constructors&for more information Run rspec in the terminal window to test. Once everything is passing, upload your screenshot to this question. Note: You should see "5 examples, O failures

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!