Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Can anyone whip up a code for this?

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Can anyone whip up a code for this?

    It's finals week and I'm overloaded. I would greatly appreciate it if someone could code this for me. Shouldn't be too hard for someone with experience (something I don't have).

    This program will allow you to select Powerball numbers. For the first 5 numbers you
    will be requested to enter a number that is greater than zero and less than or equal
    to 59. However, there’s a catch! Each number must be different.

    When any of the first five numbers is less than 0 or greater or equal to 59 the user will receive a message to this effect and will be asked to re-enter the number. You will create a code that will display one message when a number less than 1 is entered and a different message if a number greater than 59 is entered.

    If the number is the same as any number entered before it (with the exception of the powerball number) the user will receive a message to the effect asking to re-enter the number. This is the same for the 2nd through 5th numbers

    When entering the powerball number, if the number entered IS NOT between 0
    and 39 then the user will receive a message to this effect and asked to reenter the
    number. One message will display if the number is less than 1, and a different if
    the number is greater than 39.

    The following MUST be included in the program:
    • You must have multiple classes. One that contains the accessor and mutator
    methods, a readInput() method and a writeOutput() method. You will not
    use the mutator methods but include them anyway to show that you know
    how to write them. Name this first program “Powerball.java”.
    • The second program is to be named “PowerballTest.java” and will be
    responsible for creating a Powerball object and calling the writeOutput() and
    readInput() methods from the Powerball class.
    Submit both the following programs in zip format. You will not be asked to
    resubmit if you forget to include one of the files in your submission. Points will
    simply be deducted accordingly.

    Powerball.java
    Powerball.class
    PowerballTest.java
    PowerballTest.class

    I just need the 2 .java file codes. I will turn them in to .class myself.


  2. #2
    Member Fendaril's Avatar
    Join Date
    Nov 2008
    Posts
    54
    Thanks
    7
    Thanked 6 Times in 5 Posts

    Default Re: Can anyone whip up a code for this?

    Hey. I will write a code for this. Can you tell me how many numbers in total you enter? It only says first five numbers. it doesnt say how many numbers to take. Is it any amount of numbers?

  3. #3
    Senile Half-Wit Freaky Chris's Avatar
    Join Date
    Mar 2009
    Posts
    834
    My Mood
    Cynical
    Thanks
    7
    Thanked 105 Times in 90 Posts

    Default Re: Can anyone whip up a code for this?

    No. We will not complete a final assignment for you.

    Regards,
    Chris

  4. #4
    Member Fendaril's Avatar
    Join Date
    Nov 2008
    Posts
    54
    Thanks
    7
    Thanked 6 Times in 5 Posts

    Default Re: Can anyone whip up a code for this?

    Can I at least write part of the code. Just the class to get him started?

  5. #5
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,895
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Can anyone whip up a code for this?

    What, you want to write this?

    public class PowerBall
    {
    }

    public class PowerBallTest
    {
    }

    Zexbar, you'll never get experience if you always have someone write code for you. That's how everyone gets it: by doing stuff for themselves, sometimes failing miserably at it, but keeping at it until they learn.
    Last edited by helloworld922; December 8th, 2009 at 09:06 PM.

  6. #6
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Can anyone whip up a code for this?

    Chris is right. You need to atleast try and write some code youself. Post what you have and we will happily take it from there.

    I'm sure Fendaril will lend a helping hand.
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  7. #7
    Junior Member
    Join Date
    Jan 2010
    Posts
    7
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Re: Can anyone whip up a code for this?

    Quote Originally Posted by Freaky Chris View Post
    No. We will not complete a final assignment for you.

    Regards,
    Chris
    HA... he is well on his way to management... they know what they want.. just no idea how to do it!

  8. #8
    Junior Member
    Join Date
    Feb 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Can anyone whip up a code for this?

    Quote Originally Posted by zexbar View Post

    Powerball.java
    Powerball.class
    PowerballTest.java
    PowerballTest.class

    I just need the 2 .java file codes. I will turn them in to .class myself.
    do you need any payment from us for doing such a tough task?