Expand the wedding class to include six weddings

Assignment Help JAVA Programming
Reference no: EM131590996

Expand the wedding class to include six weddings. Submit your heavily commented code and a test run of all six weddings. Describe the programming strategy you used and cite sources.

import java.time.*;

public class TestWedding

{

public static void main(String[] args)

{

LocalDate date1 = LocalDate.of(1986, 12, 14);

LocalDate date2 = LocalDate.of(1984, 3, 8);

LocalDate date3 = LocalDate.of(1991, 4, 17);

LocalDate date4 = LocalDate.of(1992, 2, 14);

LocalDate date5 = LocalDate.of(2016, 6, 18);

LocalDate date6 = LocalDate.of(2016, 6, 25);

Person bride1 = new Person("Kimberly", "Hanson", date1); // Create New person

Person groom1 = new Person("Mark", "Ziller", date2); // Create New person

Person bride2 = new Person("Janna", "Howard", date3); // Create New person

Person groom2 = new Person("Julius", "Nemo", date4); // Create New person

Couple couple1 = new Couple(bride1, groom1); // Create New couple

Couple couple2 = new Couple(bride2, groom2); // Create New couple

Wedding wedding1 = new Wedding(couple1, date5, "Mayfair Country Club");

// create a wedding and send it couple1, date5 and a place

Wedding wedding2 = new Wedding(couple2, date6, "Oceanview Park");

// create a wedding and send it couple1, date5 and a place

displayWeddingDetails(wedding1); // display wedding1 details

displayWeddingDetails(wedding2); // display wedding2 details

}

public static void displayWeddingDetails(Wedding w)

{

Couple couple = w.getCouple();

LocalDate weddingDate = w.getWeddingDate();

String location = w.getLocation();

Person bride = couple.getBride();

Person groom = couple.getGroom();

String firstBride = bride.getFirstName();

String lastBride = bride.getLastName();

LocalDate brideBDate = bride.getBirthDate();

String firstGroom = groom.getFirstName();

String lastGroom = groom.getLastName();

LocalDate groomBDate = groom.getBirthDate();

System.out.println("n" + lastBride + "/" + lastGroom + " Wedding");

System.out.println("Date: " + weddingDate + " Location: " +

location);

System.out.println("Bride: " + firstBride +

" " + lastBride + " " + brideBDate);

System.out.println("Groom: " + firstGroom +

" " + lastGroom + " " + groomBDate);

}

}


import java.time.*;

public class Person

{

private String firstName;

private String lastName;

private LocalDate birthDate;

public Person(String first, String last, LocalDate date)

{

firstName = first;

lastName = last;

birthDate = date;

}


public String getFirstName()

{

return firstName;

}

public String getLastName()

{

return lastName;

}

public LocalDate getBirthDate()

{

return birthDate;

}

}


import java.time.*;

public class Couple

{

private Person bride;

private Person groom;


public Couple(Person br, Person gr) // couple contructor

{

bride = br;

groom = gr;

}


public Person getBride()

{

return bride;

}

public Person getGroom()

{

return groom;

}

}


import java.time.*;

public class Wedding

{

private Couple couple;

private LocalDate weddingDate;

private String location;

public Wedding(Couple c, LocalDate date, String loc) // wedding constructor

{

couple = c;

weddingDate = date;

location = loc;

}


public Couple getCouple()

{

return couple;

}

public LocalDate getWeddingDate()

{

return weddingDate;

}

public String getLocation()

{

return location;

}

}
--------------
Can you explain the steps in expanding a java program also?

Reference no: EM131590996

Questions Cloud

Discuss field interrogations on gun crime hot spots : In the NIJ Kansas City Gun Experiment, police focused traffic enforcement and field interrogations on gun crime hot spots
How does theory relate to the practice of psychology : Define theory and explain its function. How does theory relate to the practice of psychology?Define hypothesis and provide an example.
What is a setter and what is a getter in java programming : What is a setter and what is a getter in java programming? Also what is an object and how do you use and create it? Please explain with simple examples.
What empirical evidence impact on crime created by police : What empirical evidence (if any) is there of any impact on crime created by police storefronts
Expand the wedding class to include six weddings : Expand the wedding class to include six weddings. Submit your heavily commented code and a test run of all six weddings. Describe the programming strategy
Evaluate the issues related to the audit of satyam computer : Evaluate the issues related to the audit of Satyam Computer Services Limited. Analyze whether PWC neglected to sufficiently test transactions.
Calculate the magnitude of the average force : Calculate the magnitude of the average force on a bumper that collapses 0.240 m while bringing a 910-kg car to rest from an initial speed of 1.9 m/s.
Build a prototype for a marks management system : COIT20258 SOFTWARE ENGINEERING ASSIGNMENT - In this assignment, you are to build a prototype for a marks management system according to the design document
Analyze the current uses of http and https : Identify the various uses for HTTP and HTTPS, and justify the use of one over the other. Include two examples to demonstrate the use of each protocol.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd