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 11:30
Awell-diversified portfolio needs about 20-25 stocks from different categories is this true or false?
Answers: 2
question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 11:00
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Enzo’s balance sheet for the month of july is shown. enzo’s balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzo’s net worth?
Answers: 1
You know the right answer?
Using your preferred IDE or this online IDE, perform the following steps. Create a public class na...
Questions
question
Biology, 26.05.2021 18:20
question
Biology, 26.05.2021 18:20
Questions on the website: 13722367