Answered step by step
Verified Expert Solution
Question
1 Approved Answer
# 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
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
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