Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

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

Students also viewed these Databases questions

Question

how would you have done things differently?

Answered: 1 week ago