Question: WRITE IN JAVA, please include comments and explain what you did Write a program which will accept a string from the keyboard, Java is fun!
WRITE IN JAVA, please include comments and explain what you did
Write a program which will accept a string from the keyboard, Java is fun! Your program must determine the capacity of the string. Then, append a second string, I love it! to the first string. At this point you will enter a string Yes, and insert this string so that the output of the entire string will display Java is fun. Yes, I love it!
Directions
Create a class called Builder.
Using the StringBuilder class, write a program which will accept a string from the keyboard, Java is fun!
Your program must determine and display the capacity of the string.
Append a second string, I love it! to the first string.
Require the user to enter a string Yes,
Insert the string, Yes at the correct location, such that the output of the entire string will be Java is fun. Yes, I love it!
Display your output using clear and appropriate messages.
Grading
| Task | Points |
| iClass created and named | 1 |
| String variables declared and initialized | 2 |
| Appropriate use of StringBuilder | 2 |
| Appropriate use of string methods | 3 |
| Appropriate messages displayed | 1 |
| Proper documentation / Pseudocode | 1 |
| Total | 10 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
