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!
Answers: 2
Computers and Technology, 21.06.2019 22:10
Is the following an example of social media viral marketing? indicate your response by selecting yes or no. when you sign onto your favorite social networking website, you get messages from friends who have seen a television show they thought was a "must see! "
Answers: 1
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
Using your preferred IDE or this online IDE, perform the following steps.
Create a public class na...
Mathematics, 12.09.2019 23:30
Mathematics, 12.09.2019 23:30
Mathematics, 12.09.2019 23:30
History, 12.09.2019 23:30
Biology, 12.09.2019 23:30
Chemistry, 12.09.2019 23:30
History, 12.09.2019 23:30
History, 12.09.2019 23:30
Mathematics, 12.09.2019 23:30
Mathematics, 12.09.2019 23:30
History, 12.09.2019 23:30