Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A) Create a class named Person that holds two String objects for the persons first and last name (firstName and lastName). Include a blank

Part A) Create a class named Person that holds two String objects for the persons first and last name (firstName and lastName). Include a blank constructor that takes no parameters and an overloaded constructor that requires an argument for each field. Add the firstName and lastName data fields to the Person class. Include a blank constructor that takes no parameters and an overloaded constructor that requires an argument for each field. Include a blank constructor and an overloaded constructor. Include get methods for each field. Add get methods for each data field in the Person class.

Part B) Create a class named Couple that contains two Person objects that represent a bride and a groom (bride and groom). Add the bride and groom data fields to the Couple class. Include a default constructor that takes no parameters and an overloaded constructor that requires two Person objects. Include a blank constructor and an overloaded constructor for the Couple class. Include two get methods that each return a Person object. Include get methods for each data field in the Couple class..

Part C) Create a class named Wedding for a wedding planner. The class includes the date of the wedding as weddingDate, the names of the couple being married as a Couple object, and a String for the location as location (for example, Smalltown VFW Hall). Add the couple, weddingDate, and location data fields to the Wedding class. Provide a default constructor that takes no parameters and an overloaded constructor that requires a Couple, a LocalDate, and a String that contains data about a Wedding event. Include a blank constructor and an overloaded constructor for the Wedding class. Include get methods that return the Couple, the LocalDate, and the String that represents the location. Include get methods for the couple, weddingDate, and location data fields of the Wedding class.

Part D)

Write a program called TestWedding that prompts the user for data, creates a Wedding object, and displays all the details.

An example of the program is shown below:

Enter month of wedding 9 Enter day of wedding 13 Enter year of wedding 2023 Enter first name of bride >> Jane Enter last name of bride >> Doe Enter first name of groom >> John Enter last name of groom >> Smith Enter location of wedding >> 567 Main St. Doe/Smith Wedding Date: 2023-09-13 Location: 567 Main St. Bride: Jane Doe Groom: John Smith

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

Explain the Neolithic age compared to the paleolithic age ?

Answered: 1 week ago

Question

What is loss of bone density and strength as ?

Answered: 1 week ago

Question

4 How the market system adjusts to change and promotes progress.

Answered: 1 week ago