Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A story about Not TooYoung: NOT TOO YOUNG is NTY. NTY\'s favorite color is red,

ID: 3608681 • Letter: A

Question

A story about Not TooYoung:

      NOT TOO YOUNG is NTY.
      NTY's favorite color is red, and NotY. is 23.
      The lucky number of N. T. Young is77.

importjava.util.Scanner;
public class cc
{
   public static void main(String[] args)
   {
      String fname;
      String mname;
      String lname;
      int age;
      int luckyn;
      String favo;

      Scanner keyboard = newScanner(System.in);

      System.out.print("Please enteryour first name here>> ");
      fname =keyboard.nextLine();

      System.out.print("Please enteryour middle name here>> ");
      mname =keyboard.nextLine();

      System.out.print("Please enteryour last name here>> ");
      lname =keyboard.nextLine();

      System.out.print("Please enteryour age here>> ");
      age = keyboard.nextInt();

      System.out.print("Please enteryour lucky number here>> ");
      luckyn =keyboard.nextInt();

      keyboard.nextLine();

      System.out.print("Please enteryour favorite color here>> ");
      favo =keyboard.nextLine();

     System.out.println("");

      System.out.println("A storyabout " + fname + " " + mname + " " + lname);

     System.out.println("");

     System.out.println("      " +fname.substring(0,1) + mname.substring(0,1) +

                        lname.substring(0,1)+ "'s favorite color is " + favo + ", and " +fname.substring(0,2) +

                        " " + lname.substring(0,1) + ". is " + age);

     System.out.println("      The lucky numberof " + fname.substring(0,1) + ". " +mname.substring(0,1)

                        + ". " + lname + " is " + luckyn);

Explanation / Answer

dear, u can do this by using toUpperCase and toLowerCase functions thatare present in String class. .i.e String s="HELLO"; s.toLowerCase() will be "hello" Thanks,

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote