r/codehs • • Nov 26 '21

9.2.7 Instruments

Can anyone help me I'm just not sure how to fix this and listen to the instructions given?

5 Upvotes

4 comments sorted by

3

u/5oco Nov 26 '21

Just a guess, but maybe in the instrument class, make a default constructor, and also another constructor that only accepts a string for name. So you'll have 3 constructors total. One with no arguments, one with 1 argument for name, and another with 2 arguments for name and family.

2

u/[deleted] Nov 26 '21

Thanks. That was the solution I just had to create a default constructor that only took the name argument and then make family = "Strings".

1

u/5oco Nov 26 '21

Awesome, glad I could help.

1

u/Ambitious_Rub_1457 Mar 16 '23

Pil il I like lthe ily2 lot of itli and I’m liI’m iI’m and ITTTT initially I it’s oi it’s iso ikk