Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2011
    Posts
    3
    Rep Power
    0

    Default Anyone wanna take a shot at this quick exercise...

    Write two Java classes, one called OhioLottery and the other called OhioLotteryDemo.
    The OhioLottery Java class will have three private fields, one for a winnerís first name, one for a winnerís last name, and one for a winning dollar amount. Create a constructor for the OhioLottery Java class that initializes the winnerís first name, the winnerís last name, and the winnerís Ohio Lottery dollar amount. In addition, create both public getter (or accessor) methods and public setter (or mutator) methods for the winnerís first name, the winnerís last name, and the winnerís Ohio Lottery dollar amount. Do not put a main method in the OhioLottery Java class.
    The OhioLotteryDemo Java class will have a main method. In the main method enable the user to enter values for a winnerís first name, a winnerís last name, and a winnerís Ohio Lottery dollar amount.
    Input Validation: Only allow a positive dollar amount to be entered for a winnerís Ohio Lottery amount. Validate negative or zero Ohio Lottery dollar amounts with a loop.
    Then pass the three values in the constructor for the OhioLottery Java class and create at least 11 different OhioLottery objects. Once the 11 different OhioLottery objects have been created, store them in an ArrayList named arrayList. Finally use a loop to display the contents of each object in the ArrayList.
    There should first be a heading to the display that looks like this:
    Last Name, First Name Ohio Lottery Amount
    When displaying each winnerís name and Ohio Lottery dollar amount, display each objectís full name and Ohio Lottery dollar amount on a separate line as:
    last name, first name Ohio Lottery dollar amount


    Post your completed work in comments in .zip file so others can view.

  2. #2
    mwr1976 is offline Senior Member
    Join Date
    Oct 2011
    Posts
    106
    Rep Power
    0

    Default Re: Anyone wanna take a shot at this quick exercise...

    Do you actually think anyone here is dumb enough just to do your homework for you? If you have a specific problem most will be willing to help, but if you take this kind of approach most will go out of their way not to help you.(just for future reference, of course)

  3. #3
    Join Date
    Nov 2011
    Posts
    3
    Rep Power
    0

    Default Re: Anyone wanna take a shot at this quick exercise...

    Bro, Im not even in school. I found this as a recent question on justanswer.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,310
    Blog Entries
    7
    Rep Power
    20

    Default Re: Anyone wanna take a shot at this quick exercise...

    Quote Originally Posted by JohnnyDickerson View Post
    Bro, Im not even in school. I found this as a recent question on justanswer.
    Still then; this is not how the forums work; you do the work and if you get stuck ask a specific question and we'll help you out. Dumping just an assignment question is considered a nono.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default Re: Anyone wanna take a shot at this quick exercise...

    Quote Originally Posted by JohnnyDickerson View Post
    Bro, Im not even in school. I found this as a recent question on justanswer.
    So then post a link to that site with a message such as "try yourself here". Anything else says "this is my homework (or some assignment/task received/taken in any other way shape or form) do it for me".

    Edit: P.S. This is also duplicated in the "advanced" forum.

  6. #6
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Anyone wanna take a shot at this quick exercise...

    Quote Originally Posted by JohnnyDickerson View Post
    Bro, Im not even in school. I found this as a recent question on justanswer.
    Whatever, we've heard it all before. The answer is unchanged: find someone else to do your work or drop the course.

  7. #7
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default Re: Anyone wanna take a shot at this quick exercise...

    Hey bra, I finished, whats my prize?

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,310
    Blog Entries
    7
    Rep Power
    20

    Default Re: Anyone wanna take a shot at this quick exercise...

    Quote Originally Posted by sunde887 View Post
    Hey bra, I finished, whats my prize?
    Men ... don't you call a lady a 'bra' you, you, you ... old sock!

    kindest regards,

    Loretta ;-)
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Anyone wanna take a shot at this quick exercise...
    By JohnnyDickerson in forum Advanced Java
    Replies: 3
    Last Post: 11-21-2011, 09:59 AM
  2. Wanna see my website?
    By ktcreator in forum Reviews / Advertising
    Replies: 0
    Last Post: 08-20-2011, 04:38 AM
  3. Take a screen shot
    By oasis in forum New To Java
    Replies: 0
    Last Post: 05-24-2008, 07:57 PM
  4. Wanna make 5 quick bucks?
    By GodiaN in forum Java Applets
    Replies: 5
    Last Post: 01-21-2008, 07:15 PM

Posting Permissions

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