Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Instructions Write a Java console application that prompts the user to enter the first name and last name, then prints the welcome message. The
Java
Instructions Write a Java console application that prompts the user to enter the first name and last name, then prints the welcome message. The Console Output Please enter your first name: Jerry Please enter your last name: Zhou Hello, Jerry Zhou, Welcome to CIS 226. Extra Credit (5 points) Enhance your program to print error meesage if user doesn't enter first and/or last name. Please enter your first name: Please enter your last name: Sorry, you have to enter your name to enroll into CIS 226 Hint Download Assign2ex class and run it in a command window: java Assign2ex Write comments for extra credit per class coding conventions . Use String method isEmpty() to check if user didn't type any characters. . User if/else statement to decide print welcome message or error message. Use logical operator ll or &&to combine two conditions into one. If you did the extra credit part, just submit one copy of your code, i.e. Assign2ex java instead of Assign2 javaStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started