#Attr Methods

# I worked on this challenge [by myself]

# I spent [1] hours on this challenge.

class NameData

  attr_reader :name

  def intialize(name)
    @name = Farman
  end
end


class Greetings

  attr_accessor :name

  def intialize(name)
    @name = Farman
  end

  def greet(name)
    puts "Hello #{name} How wonderful to see you today."
  end
end

farman = Greetings.new
farman.greet("Farman")




 # puts "Hello Student! How wonderful to see you today."

# Reflection
#RELEASE 1
#What are these methods doing?

#All the methods are within a class for Profile. The initialie method creates the instance variables used throughout the program. Each instance variable defines specific variables such as name, age, and occupation. The print_info method goes through each of the instance variables from the intialize method and prints out what is called: age, name, and occupation. The what_is_age method will call out the age called out into the initialize method. The change_my_age method changes the instance age to a new one that is called which is stored into a new variable, new_age. This is ditto for the variables new_name and new_occupation and change_my_name method and change_my_occupation.

#How are they modifying or returning the value of instance variables?

#The change_my_age method changes the instance age to a new one that is called which is stored into a new variable, new_age. This is ditto for the variables new_name and new_occupation and change_my_name method and change_my_occupation. At the end of all the methods, we call out all these methods by creating a new variable called instance_of_variables and set that to Profile.new so that it calls out the instance variables in the Class Profile.

#RELEASE 2
#What changed between the last release and this release?

#Change_my_age was removed

#What was replaced?

#change_my_age was replaced with attr_reader and attr_writer for age

#Is this code simpler than the last?

#Based on what I have read about reader methods, I don't think this has made it a whole lot simpler, but it's trying to simplify it more with the reader methods.

#RELEASE 3
#What changed between the last release and this release?

#Change_my_age was removed

#What was replaced?

#change_my_age was replaced with attr_reader and attr_writer for age

#Is this code simpler than the last?

#Based on what I have read about reader methods, I don't think this has made it a whole lot simpler, but it's trying to simplify it more with the reader methods.


#What is a reader method?

#A reader method is used to give Ruby the action to simply read an instance variable

#What is a writer method?

#A writer method is used to give Ruby the action to make changes to an instance variable

#What do the attr methods do for you?

#Attr methods are different ways to help read and write assignments for variables.

#Should you always use an accessor to cover your bases? Why or Why not?

#Accesor methods should only be used when you want to BOTH read and write for an instance.


#What is confusing to you about these methods?

#I'm still not sure why I need to use them since it's pretty easy to do tasks without them in the first place. I don't see the need to utilize them yet but I'll just have to wait and see.