Question
a. Generate a class named Person that holds two String objects for the person first and last name. Include a constructor that requires an argument
a. Generate a class named Person that holds two String objects for the person first and last name. Include a constructor that requires an argument for each field. Include get methods for each field. Save the file as Person.java
b. Generate a class named couple that contains two Person objects that represents a bride and a groom. Include a constructor that requires two Persons objects. Include two get methods that each return a person. Save the file as Couple.java
c. Generate 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 Smalltown VFW Hall). Provide a constructor that requires a Couple, a LocalDate, and a String that contains data about the Wedding event. Include get methods that return the Couple, the LocalDate, and the String that represents the location. Save the file as Wedding.java
d. Generate a program that prompts the user for the 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