Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

4. Develop an application that inputs a name and an address, and prints out a fo

ID: 3762107 • Letter: 4

Question

4. Develop an application that inputs a name and an address, and prints out a form letter. The letter should begin with the address, including the person?s full name. Then it should use the salutation Dear , where is the person?s first name. Within the letter, the text should address the person by his or her first name at least once. You can use the Name class to represent the name, and develop your own class to represent the address. You get to make up the content of the form letter, which can be as serious or silly as you like.

Explanation / Answer

package com.example.sträng.main; import java.util.Scanner; public class Application { public static void main(String[] args) { String firstName, lastName; //Create scanner to obtain user input Scanner scanner1 = new Scanner( System.in ); //obtain user input System.out.print("Enter your first name: "); firstName = scanner1.nextLine(); System.out.print("Enter your last name: "); lastName = scanner1.nextLine(); //output information System.out.print("Your first name is " + firstName + " and your last name is "+ lastName); } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote