--- Begin Message ---Correct. This is a exercism task.and yes, there are no variables given but that does not in my oponion means that I cannot add a instance or a class variable I myself was thinking about adding two instance variables named digits which hold the first 9 characters and a variable named controlDigitCan I do it then this way1) Check if the string is empty , if so return false otherwise made a new object like this in IsValidIsbnisValidIsbn: aString if aString isEmpty ifTrue: [False] ifFalse: [ self new digits := something. controlDigit := something.] I can also do what I think you are describing isValidIsbn: AString if aString isEmpty ifTrue: [ ^false] ifFalse: [ISBN isValidIsbn10]and then as you describe so have a isValidISBN10 method in the class side where I do the check there so the class ISBN has the two instance variables digits and controlDigitRoelof
--- End Message ---
Re: [Pharo-users] Can it do this way ?
Roelof Wobben via Pharo-users Wed, 02 Sep 2020 03:48:57 -0700
- [Pharo-users] Can it do this way ? Roelof Wobben via Pharo-users
- Re: [Pharo-users] Can it do this way ? Richard O'Keefe
- Re: [Pharo-users] Can it do this wa... Roelof Wobben via Pharo-users
- Re: [Pharo-users] Can it do this wa... Richard O'Keefe
- Re: [Pharo-users] Can it do thi... Roelof Wobben via Pharo-users
- Re: [Pharo-users] Can it do this way ? jtuc...@objektfabrik.de
- Re: [Pharo-users] Can it do this wa... Richard O'Keefe
- Re: [Pharo-users] Can it do thi... Roelof Wobben via Pharo-users