Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a class called RockGuitars) that has attributes: guitarist and guitar. It has a constructor with three parameters, selr, guitarist and guitar. The default value
Write a class called RockGuitars) that has attributes: guitarist and guitar. It has a constructor with three parameters, selr, guitarist and guitar. The default value of guitarist and guitar should be empty string. The class should have str- method to return a string for output using this fomat: 1 20s) (:20s). Lastly, it has the following method to add guitarist and guitar . add_entryguitarist, guitar: both guitarist and guitar are string with detault value of Example g.obj - RockGuitars) g.objadd entryl Jimmy Page. 'Gibson Les Paul Standard'] Lobj - RockGuitars() f objadd entryl'Angus Young, "Jaydee SG] printg) print f) Jinny Page Angus Toung Gibson Les Paul Standard Jaydee SG
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