DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004

    Help using BlueJ

    Hi everyone, im in a bind at the moment. Im using a program called BlueJ and im rather new tot he game. The teach gave the class an assignment to program some kind of number program but i have not idea what im doing cause he isnt exactly a great teacher.
    I created the class and stuff called "Tester" but now i come to a roadblock where i need to alter the base code inside the program.

    It says...
    Now implement the class "Tester". This class tests if an integer is positive, negative or zero.
    - The class has just one attribute "number" of int type, which is to store an integer.
    -The class has a construtor, which sets "number" to zero, and these two methods:
    -setNumber(int) sets "number" to the parameter value passed to setNumber(int)
    -printResult() displays the number and the appropriate message:
    " is positive." or
    " is negative." or
    " is zero."

    Compile the project and create an object and name it "mytester".

    Call the setNumber(int) method and provide a positive integer, then call the printResult() method to verify if your code works.

    Repeat steps with a negative integer and also with zero.

    *** Any help with this will be greatly appreciated. Its a shame this is such a problem to me... cause while uses our class time to teach us scientific notation, we arnt learning the important stuff... which is how to do this stuff. Anyway, please, any help would be awesome

  2. #2
    Join Date
    Mar 2003
    Everyone here will help you, but like TV show "Jeopardy", everything has to be in the form of a question!

    So, give us what you've written already and then ask a specific question.

  3. #3
    Join Date
    Sep 2004
    After a few hours of playing around with the crap, i managed to figure it out.... lol.
    BTW, does anyone ahve the BLUEJ disc with the chapter projects on it? Im missing my disc and severely need the chapter 3 Clock-display project.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center