Modify the class named FormLetterWriter that includes two overloaded methods named displaySalutation(). The first method takes one String parameter that represents a customer’s last name, and it displays the salutation Dear Mr. or Ms. followed by the last name. The second method accepts two String parameters that represent a first and last name, and it displays the greeting Dear followed by the first name, a space, and the last name. After each salutation, display the rest of a short business letter using the displayLetter method: Thank you for your recent order. public class FormLetterWriter { public static void main(String[] args) { displaySalutation("Kelly"); displayLetter(); displaySalutation("Christy", "Johnson"); displayLetter(); } public static void displaySalutation(String lastName) { // Write your code here } public static void displaySalutation(String firstName, String lastName) { // Write your code here } public static void displayLetter() { // Write your code here } }
I need help!
Modify the class named FormLetterWriter that includes two overloaded methods named displaySalutation(). The first method takes one String parameter that represents a customer’s last name, and it displays the salutation Dear Mr. or Ms. followed by the last name. The second method accepts two String parameters that represent a first and last name, and it displays the greeting Dear followed by the first name, a space, and the last name. After each salutation, display the rest of a short business letter using the displayLetter method: Thank you for your recent order.
public class FormLetterWriter {
public static void main(String[] args) {
displaySalutation("Kelly");
displayLetter();
displaySalutation("Christy", "Johnson");
displayLetter();
}
public static void displaySalutation(String lastName) {
// Write your code here
}
public static void displaySalutation(String firstName, String lastName) {
// Write your code here
}
public static void displayLetter() {
// Write your code here
}
}

Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images









