Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

13, Create an instance of the following Person class, set its name attribute to any value you like, and use its instance variable to complete

image text in transcribed
13, Create an instance of the following Person class, set its name attribute to any value you like, and use its instance variable to complete the greeting method. 1 class Person 2 attr_accessor Charlie 3 def greeting # @name puts "hi, my name is #{main}" 6 end 7 end Run 9 some_person 'main' 10 some_person.name 'main' some person. '(main)' Reset

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

The Structure Of The Relational Database Model

Authors: Jan Paredaens ,Paul De Bra ,Marc Gyssens ,Dirk Van Gucht

1st Edition

3642699588, 978-3642699580

More Books

Students also viewed these Databases questions

Question

15. Act inferior to other members?

Answered: 1 week ago

Question

e. What do you know about your ethnic background?

Answered: 1 week ago

Question

b. Why were these values considered important?

Answered: 1 week ago