CHALLENGE 19.16.2: Name song. АCTIVITY Modify songVerse to play "The Name Game" (OxfordDictionaries.com), by replacing "(Name)" with userName but without the first letter. Ex: If userName = "Kaitlin"...


Modify songVerse to play "The Name Game" (OxfordDictionaries.com), by replacing "(Name)" with userName but without the first letter.



Ex: If userName = "Kaitlin" and songVerse = "Banana-fana fo-f(Name)!", the program prints:

Banana-fana fo-faitlin!


Ex: If userName = "Kaitlin" and songVerse = "Fee fi mo-m(Name)", the program prints:

Fee fi mo-maitlin


Note: You may assume songVerse will always contain the substring "(Name)".


CHALLENGE<br>19.16.2: Name song.<br>АCTIVITY<br>Modify songVerse to play

Extracted text: CHALLENGE 19.16.2: Name song. АCTIVITY Modify songVerse to play "The Name Game" (OxfordDictionaries.com), by replacing "(Name)" with userName but without the first letter. Ex: If userName = "Kaitlin" and songVerse = "Banana-fana fo-f(Name)!", the program prints: Banana-fana fo-faitlin! Ex: If userName = "Kaitlin" and songVerse = "Fee fi mo-m(Name)", the program prints: Fee fi mo-maitlin Note: You may assume songVerse will always contain the substring "(Name)". 365076.2342078.qx3zay7 3 public class NameSong { public static void main (String 0 args) { Scanner scnr = new Scanner(System.in); String userName; String songVerse; 4 5 7 8 userName = scnr.nextLine(); userName = userName.substring(1); // Remove first character 9 10 11 12 songVerse = scnr.nextLine(); 13 14 // Modify songVerse to replace (Name) with userName without first character 15 16 * Your solution goes here */ 17 18 Svstem.out.println(sonaVerse):

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here