Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a . Create a class named Person that holds two String objects for the person's first and last name. Include a constructor that requires an
a Create a class named Person that holds two String objects for the person's first and last name. Include a constructor that requires an argument lor cach field, Include get methods for each ficld. Save the file as Person.java.
b Create a class named Couple that contains two Person objects that represent a bride and a groom. Include a constructor that requires two Person objects. Include two get methods that each return a Person. Save the flle as Couplejava.
c Create a class named Wedding for a wedding planner. The class includes the date of the wedding, the names of the couple being married, and a String for the location for example, Smallown VFW Hall Provide a constructor that requires a couple, a LocalDate, and a String that contalis data about a Tedding event. Include get methods that return the Couple, the LocaIDate, and the String that represents the location. Save the file as Wedding.java.
d Write a program that prompts the user for data, creates a Wedding object, and displays all the details. Save the file as TestWedding. Java.
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