1. Engineering
  2. Computer Science
  3. 1andnbspandnbspandnbspandnbsp create a class namedandnbsppersonandnbspthat holds the following fields twoandnbspstringandnbspobjects...

Question: 1andnbspandnbspandnbspandnbsp create a class namedandnbsppersonandnbspthat holds the following fields twoandnbspstringandnbspobjects...

Question details

1.     Create a class named Person that holds the following fields: two String objects for the person’s first and last name. Create a class named Couple that contains two Person objects. Create a class named Wedding for a wedding planner that includes a String for the date of the wedding, the names of the Couple being married, and a String for the location. Provide constructors for each class that accept parameters for each field, and provide get methods for each field. Then write a program that creates two Wedding objects and in turn passes each to a method that displays all the details. Save the files as Person.java, Couple.java, Wedding.java, and TestWedding.java.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution