Question
Create a class named Person that holds the following fields: two String objects for the persons first and last name and a LocalDate object for
Create a class named Person that holds the following fields: two String objects for the persons first and last name and a LocalDate object for the persons birth date. Create a class named Couple that contains two Person objects. Create a class named Wedding for a wedding planner that includes the date of the wedding, the Couple being married, and a String for the location.
Provide constructors for each class that accept parameters for all fields where the argument variables are the same names as the instance variables, and the "this" variable is used, and provide get methods for each field.
Create a program (or demo class) called WeddingDemo that utilizes the Person, Couple, and Wedding classes. It should have a test() method to create 2 Wedding objects (and the required Person and Couple objects as well) and then displays the wedding information. It should have a display() method to display information about the wedding, and an askUser() method to prompt the user for information to create a Wedding object, and then display that information back to the user. For basic credit (100%), you may hardcode the birthdates and wedding date in the askUser() method.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started