subject
Computers and Technology, 21.12.2021 14:00 oof5221

Using your preferred IDE or this online IDE, perform the following steps. Create a public class named Party. (If you are using the recommended online IDE, remove 'public'.)
Declare a private int variable named numGuests.
Declare two (2) methods named getNumGuests (of int type) and setNumGuests. The getNumGuests method shall return the value of numGuests. Below is the code for setNumGuests.
public void setGuests(int numGuests) {
this. numGuests = numGuests;
}
Declare another method named displayMessage with a println statement saying "Enjoy the party!"
Create another class named BirthdayParty. This class should be a subclass of the Party class.
In the main method, create a BirthdayParty object named bday.
Declare an int variable to accept the number of guests attending the birthday party.
Use the setNumGuests method on bday to store the value of that variable .
Display the number of guests by calling getNumGuests then call displayMessage.
Sample output:

Enter number of guests: 40

40 guests have been invited.

Enjoy the party!

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 21:30
How do you take a green screen out of the video while editing?
Answers: 2
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Which of the following would you find on a network
Answers: 3
question
Computers and Technology, 23.06.2019 02:00
Read this excerpt from helen keller’s autobiography, the story of my life. have you ever been at sea in a dense fog, when it seemed as if a tangible white darkness shut you in, and the great ship, tense and anxious, groped her way toward the shore with plummet and sounding-line, and you waited with beating heart for something to happen? i was like that ship before my education began, only i was without compass or sounding-line, and had no way of knowing how near the harbour was. "light! give me light! " was the wordless cry of my soul, and the light of love shone on me in that very hour. . the morning after my teacher came she led me into her room and gave me a doll. the little blind children at the perkins institution had sent it and laura bridgman had dressed it; but i did not know this until afterward. when i had played with it a little while, miss sullivan slowly spelled into my hand the word "d-o-l-l." i was at once interested in this finger play and tried to imitate it. when i finally succeeded in making the letters correctly i was flushed with childish pleasure and pride. running downstairs to my mother i held up my hand and made the letters for doll. i did not know that i was spelling a word or even that words existed; i was simply making my fingers go in monkey-like imitation. in the days that followed i learned to spell in this uncomprehending way a great many words, among them pin, hat, cup and a few verbs like sit, stand and walk. based on this excerpt, which words best describe helen keller?
Answers: 2
You know the right answer?
Using your preferred IDE or this online IDE, perform the following steps. Create a public class na...
Questions
question
English, 21.04.2020 22:25
question
Mathematics, 21.04.2020 22:26
question
Mathematics, 21.04.2020 22:26
question
Geography, 21.04.2020 22:26
Questions on the website: 13722367