Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26

Thread: Little help...

  1. #21
    hotice1027 is offline Member
    Join Date
    Sep 2008
    Posts
    18
    Rep Power
    0

    Default

    Supamagier - yes, I corrected that!

    Hungleon88 - I will try that. Never used charAt before...

    Norm - I asked professor and was told that it is a one string. "The letter is made up of a list of thirty-five 1's and 0's"

    Thanks all!

  2. #22
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,513
    Rep Power
    25

    Default

    an array of thirty-five 0's or 1's
    I can see there would be confusion with this wording.
    I'd rephrase it to:
    an array of a String consisting of thirty-five 0's or 1's

    Ie. the array holds one String which has 35 chars.

    But why use an array if it only has one element?
    Oh well, the professor must be going to add to this assignment with other data that will require the array.

  3. #23
    hotice1027 is offline Member
    Join Date
    Sep 2008
    Posts
    18
    Rep Power
    0

    Default

    Yes, I guess so...

    I just want to find out one thing:
    Do I write class file and within that class file do I construct object that accepts a String array as a parameter?

  4. #24
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,513
    Rep Power
    25

    Default

    write class file and within that class file ...
    What is the purpose of the class? What data does it need to access?

  5. #25
    hotice1027 is offline Member
    Join Date
    Sep 2008
    Posts
    18
    Rep Power
    0

    Default

    The purpose of that class is to build the object that, I think, accepts the string of 0s and 1s, convert them into *s and spaces and print them out...

  6. #26
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,513
    Rep Power
    25

    Default

    That sounds like the program that you've been working on. Or is it something new? How does it fit with what you've been doing so far?

    Do you know how to write a method? A constructor for a class has the same syntax except there is no return value.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •