Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The java code is correct but the checks do not work as you can see. Please help me solve the issue. Please help only if

image text in transcribedimage text in transcribed

The java code is correct but the checks do not work as you can see. Please help me solve the issue. Please help only if you can I don't want to waste the question.

Modiy the Class 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. An example of the program is shown below: Tasks O out of 4 checks passed. Review the results below for more details. Checks Unit Test Incomplete displaySalutation("John") 1 public class FormLetterWriter { 2 3 public static void main(String[] args) { 4 displaySalutation ("Kelly"); 5 displayLetter(); 6 displaySalutation ("Christy", "Johnson"); 7 displayLetter(); 8 } 9 10 public static void displaySalutation(String lastName) { 11 System.out.println("Dear Mr. or Ms. " + lastName); 12 } 13 14 public static void displaySalutation(String firstName, String lastName) { 15 System.out.println("Dear " + firstName + + lastName); 16 } 17 18 public static void display Letter() { 19 System.out.println("Thank you for your recent order."); 20 } 21 } 22 > Unit Test Incomplete displaySalutation ("Maria") > Unit Test Incomplete displaySalutation("Greta", "Gerwig") > Unit Test . Incomplete displaySalutation("Hayao", "Miyazaki")

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions