Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help me with the following Java programming project questions, I hope to get a correct answer as a reference, thank you very much. I
Please help me with the following Java programming project questions, I hope to get a correct answer as a reference, thank you very much.
I need to finish two tasks in this exercise:
Read a line of text from the user after finishing one line the program will read another line until the user enters 'bye' as the input
Convert the 'emoji letters' to emojis
If c equals to h or H change it to a happy emoji: :
If c equals to a or A change it to an angry emoji:
If c equals to s or S change it to a sad emoji: :
Here is part of the code.
Please complete this code on the basis of the following incomplete code, and try not to modify the framework that has already been set:
import java.util.Scanner;
public class AsciiToEmoji
The starting point of the program.
public static void mainString args
Task : Prepare a scanner for user input handling
The input line
String line ;
A temporary character as buffer
char ch ;
Keep asking for the input until it is equal to "bye"
do
System.out.printPlease enter a line of text enter 'bye' to quit the program: ;
Task : Read a line from the scanner object
Task : Convert the emoji letters to emojis
while false;
Here is an example output of the finished progam.
Please enter a line of text enter 'bye' to quit the program: What?
W:t
Please enter a line of text enter 'bye' to quit the program: Someone changed my text!
:omeone c:nged my text!
Please enter a line of text enter 'bye' to quit the program: Oh
Please enter a line of text enter 'bye' to quit the program: bye
bye
Step 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