Need Psuedo-code and java program code (not python) for following problem: (Please make the psuedo-code as simple as possible to understand)
Design a modular program using pseudo-code which prompts a user for their first name, followed by their last name; then displays a "Hello" salutation which concatenates their first name with their last name.
Sample output:
Please enter your first name: John
Please enter your last name: Smith
Hello, John Smith!
Your program must include a main module and one function; this function prompts the user for either their first name or last name, using a prompt which is a String parameter passed to the function. You must use correct and consistent indentation and alignment, meaningful variable names, named constants, descriptive comments, and an ID header.
Psuedo-code:
Working code and Comments for better understanding:
import java.util.Scanner; //Import using Scanner class to read
user input
class Main{
public static void main(String args[]){
function();
}
private static void function(){
String firstname, lastname; //Declare string variables
//Declare the object with any name(name in this program) and initialize with predefined standard input object.
Scanner name = new Scanner(System.in);
System.out.println("Please enter your first name:"); //Prompt user asking for first name
firstname = name.nextLine(); // String input firstname
System.out.println("Please enter your last name:"); //Prompt user asking for last name
lastname = name.nextLine(); // String input of lastname
String s="Hello, "+firstname+" "+lastname+"!"; // concatenate both names and adding "Hello" to the first "!" to the last.
System.out.println(s); //Printing output of string s
}
}
Code Screenshots:

Output Screenshots:
Hope
this helps, if you like my answer, give it a thumbs
up.
Need Psuedo-code and java program code (not python) for following problem: (Please make the psuedo-code as...