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 2 of 2

Thread: Hello can anyone help me code this im a begginner so please help me

  1. #1
    Junior Member
    Join Date
    Jan 2021
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Hello can anyone help me code this im a begginner so please help me

    1. Create two classes (java file) named BirthdayParty and Party.
    2. The Party class contains the main method. Instantiate an object of the class BirthdayParty named bday.
    3. The BirthdayParty class should contain the following:
    - A private variable of type int named as numGuests.
    - get and set methods for numGuests.
    - A method named displayMessage that will display a message "Enjoy the party!".
    4. Your program should be able to accept an input coming from the user for a number of guests.
    5. Followed by the confirmation of guest that will be attending. (see Sample output below).
    6. Lastly, call the method that will display a message.


    Sample output:

    Enter number of guests: 40

    40 guests have been invited.

    Enjoy the party!

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    24,110
    Thanks
    53
    Thanked 2,618 Times in 2,568 Posts

    Default Re: Hello can anyone help me code this im a begginner so please help me

    http://forums.codeguru.com/showthrea...ork-assignment
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. java begginner homework help
    By kiba in forum What's Wrong With My Code?
    Replies: 5
    Last Post: September 10th, 2014, 09:37 AM
  2. Please help am Begginner
    By KilasaMJ in forum What's Wrong With My Code?
    Replies: 2
    Last Post: August 7th, 2013, 08:41 AM
  3. I am new to Java and a begginner
    By rjohn1997 in forum Member Introductions
    Replies: 1
    Last Post: February 18th, 2012, 09:07 AM
  4. [SOLVED] (Total begginner) simple GUI program nt displayin
    By moneyman021 in forum What's Wrong With My Code?
    Replies: 11
    Last Post: January 10th, 2012, 06:26 PM
  5. Guessing Game begginner question
    By okupa in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 20th, 2010, 07:31 AM