Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Do it in ruby please Create a Ruby class Book1. Each book is cheracterized by the instance variables auhor and rurdie this class create the
Do it in ruby please
Create a Ruby class Book1. Each book is cheracterized by the instance variables auhor and rurdie this class create the initializer and the method show1 that displays the instance variables of tihe h BookI Create the class Book2 that inherits properties from the class Book1 and adds a new inst variables publisher and price. Write the following Book2 methods and ritte. For . read2 that prompts the user and reads from the keyboard all data for Book2. . show2 that displays all instance variables of the class Book , and then Write a main program that reads from the keyboard an array of 3 books (objects of Book2) displays all of them using show2Step 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