Question: So I am having trouble with this computer programming problem. The question is Create a class named FormLetterWriter that includes two overloaded methods named displaySalutation().

So I am having trouble with this computer programming problem. The question is Create a 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 : "Thank you for your recent order." Write a main() method that tests each overloaded method. Save the file as FormLetterWriter.java. Below is my answer. However, I am receiving multiple errors such as FormLetterWriter.java:13: error: '(' expected private static void display Salutation(String firstName, String lastName) ^ FormLetterWriter.java:17: error: '(' expected private static void display Salutation(String lastName); //Program Exercise #1 public class FormLetterWriter { public static void main(String[] args) { String lastName = "Rucker"; displaySalutation(lastName); System.out.println("Thank you for your recent order."); String firstName = "Jennifer"; displaySalutation(firstName,lastName); System.out.println("Thank you for your recent order."); } private static void display Salutation(String firstName, String lastName) { System.out.println("Dear " + firstName +" " +lastName); } private static void display Salutation(String lastName); { System.out.println("Dear Mr. or Ms."+lastName); } }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!