Thread: Coding in Bluej
View Single Post
Coding in Bluej
Old
  (#1)
anti is Offline
2nd Lieutenant
 
Posts: 3,609
Join Date: Jun 2004
   
Default Coding in Bluej - 09-16-2004, 09:01 PM

i dont know what it is but im snagged on this problem:

Exercise 2.48: add a further field, refnumber to the book class. this field can store a reference number for a library, for example. it should be a type string and initialized to the zero length string ("") in the constructor as its initial value is not passed in a parameter to the constructor. instead, define a mutator for it with the following signature:

public void setRefNumber (String ref)

the body of this method should assign the value of the paramter to the refNumber field. Add a corresponding getRefNumber accessor to help you check that the mutator works correctly.


  
Reply With Quote