Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am confused why the tests are not working. I tried to also use a scanner to see if having user putting an input would

I am confused why the tests are not working. I tried to also use a scanner to see if having user putting an input would make a difference and it hasnt work either. image text in transcribed
image text in transcribed
0 X Programming Exercise 4-1 Tasks VE A-Z O out of 4 checks passed. Review the results below for more details. O Checks FormLetter Writerjev > Terminal Iblic class Formletterwriter 3 public static void main(String[] args) sandbox $ rm of ..class sandbox $ sandbox $ 4 displaySalutation" Kelly"); sandbox $ javac FormLetterWrit displayette(): 5 er.java displaysalutation("Christy", "Johnson); sandbox s java FormletterWrite displayletter(); I Dear Mr. or Ms. Kelly Thank you for your recent orde 10 11 public static void displaysalutation(String lastNane) Dear Christy Johnson 12 System.out.println("Dear Mr. or Ms.lastName); Thank you for your recent orde 13 I. 14 sandbox $ | 15 public static void displaySalutation(String firstName, stName) 15 Systenout.println("Der firstNane last 17) 10 public static void displayetter() { 10 Systen.out.println("Thank you for your recent order Unit Test complete diapluysalutation "John") Unit Testing displaySalutation("Maria") Unit Test Incomplete displaySalutation("Greta", "Gerwig") Unit Test complete displaysalutation("Hayao "Hiyazaki) > > 21 22 The Fornette Writer program displays the correct message 10.00 e Run checks Submit 20% Search this course CENGAGE MINDTAP Programming Exercise 4-1 Instructions A-Z 5/> Modify the class named Fornl.ette Writer that includes two overloaded methods named displaySalutation). The first method takes one string parameter that represents a customer's last nameand 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. Formbetter Writer java > Terminal Iublic class FormetterWriter : 2 public static void main(String[] args) { sandbox $ rm of ..class sandbox $ sandbox $ displaySalutation" Kelly"); 5 displayletter(): sandbox s javae Fornletterwit er.java diaplaySalutation("Christy", "Johnson"); sandbox s java FornletterWrite 7 displayLetter(); Dear Mr. or Ms. Kelly Thank you for your recent orde 1. public static void displaysalutation(String lastName>Dear Christy Johnson 12 System.out.println("Dear Mr. or Ms. lastName); Thank you for your recent orde 13) 24 Handbox $ [ 10 puble statie voldotuplaystation(String firstine, Istane) 10 Systen.out.printin-Dear firstName * lost 12) 16 public static void diaplayletter) 19 System.out.println("Thank you for your recent order 21 22 An example of the program is shown below: Dear Mr. or Mo. Kelly, Thank you for your recent order. >> Dear Christy Johnson Thank you for your recent order

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

Beginning ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions