Question: Create a program that will model a guestlist, which a user may use to keep track of guests they will invite to a party. Using
"Create a program that will model a guestlist, which a user may use to keep track of guests they will invite to a party.
Using jGRASP, write a Java program named LastnameFirstnamejava, using your last name and your first name, that does the following:
Call a method named createGuestlist, which will ask the user for information about the guests name favorite food, if the guest has an dietary restrictions then store that information into an array not an ArrayList of Guest objects that represent each guest. Return the guestlist array after it is completed. Limit your guestlist to people because of covid restrictions. :p
Use Guest objects to represent each guest, and store the following information:
Name
Favorite food
If the guest has any dietary restrictions store this as a boolean value
In the main method, call methods: printGuests, printMenu, printDiet
The printGuests method lists the names of the guests.
The printMenu method lists the favorite foods of the guests.
The printDiet method counts how many people have dietary restrictions. If guests have dietary restrictions, print a message saying that no guests have dietary restrictions. Otherwise, print how many guests have dietary restriction QO s
Each method may have or parameter no more than this.
Your program MUST:
Have descriptive output so the user is clearly aware of what the program is doing and what is required of the user to do
Implement conce like conditionals, loops, arrays, methods, etc if possible, to make code more efficient
Actively use inline comments stating what each section of code does.
Use trycatch if and only if necessary.
Your program must conform to the Java coding standards reviewed in class during Week
Your program should not use codeconce we have not yet covered. You must demonstrate that you have mastered the conce covered in class.
Remember to always begin your code with the following documentation comments:
Short description of the program.
@author Last Name, First Name
@assignment ICS Assignment XX
@date Today's Date
@bugs Short description of bugs in the program, if any.
Expected Output:
This is an example of what your program should output:
jGRASP exec: java ManuelNikki
Woo hoo! It's Thanksgiving! Time for a party!
Let's prepare the guestlist!
Enter guest's name: Tiffany
Enter Tiffany's favorite Thanksgiving food: cranberry sauce
Does Tiffany have any dietary restrictions?
Please type yes or no: yes
Enter guest's name: Edward
Enter Edward's favorite Thanksgiving food: dinner rolls
Does Edward have any dietary restrictions?
Please type yes or no: yes
Enter guest's name: Mike
Enter Mike's favorite Thanksgiving food: roast turkey
Does Mike have any dietary restrictions?
Please type yes or no: yes
Enter guest's name: Blanca
Enter Blanca's favorite food: pumpkin pie
Does Blanca have any dietary restrictions?
Please type yes or no: no
Enter guest's name: Pete
Enter Pete's favorite food: stuffing
Does Pete have any dietary restrictions?
Please type yes or no: no
Alright! Let's get ready for this party!
Here's the list of guests:
Tiffany
Edward
Mike
Blanca
Pete
We're gonna have TONS of food, including:
cranberry sauce
dinner rolls
roast turkey
pumpkin pie
stuffing
guests have dietary restrictions though!
We better make sure the menu includes things they can eat! :)
jGRASP: operation complete."
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
