8:06 PM T 22% AT&T; faculty washington.edu 2. Write the Java program Assignlajav
ID: 3564126 • Letter: 8
Question
8:06 PM T 22% AT&T; faculty washington.edu 2. Write the Java program Assignlajava las specified below) Write a program, put it in the class called Assignlajava, to output the lyrics to the Lennon McCartney song "I Want To Hold Your Hand Use print and printin commands, but remember to use method calls Gas discussed in class and lab to reduce the number of repeated prints and printins Here are the song lyrics: I'll tell you something I think youll understand When I say that something want to hold your hand I want to hold your hand I want to hold your hand Oh please say to me you'll let me be your man and please say to me you'll let me hold your hand Now, let me hold your hand I want to hold your hand And when I touch you I feel happy inside It's such a feeling that my love I can't hide I can't hide I can't hide Yeah, you got that something I think youll understand When I say that something I want to hold your hand I want to hold your hand I want to hold your hand And when touch you I feel happy inside It's such a feeling that my love can't hide I can't hide I can't hide Yeah, you got that something I think youll understand When say that something I want to hold your hand I want to hold your hand I want to hold your handExplanation / Answer
public class Assign1a
{
public static void main(String[] args)
{
System.out.println("I'll tell you something");
System.out.println("I think you'll understand");
System.out.println("When I say that something");
printthrice("I want to hold your hand");
System.out.println("Oh please say to me");
System.out.println("you'll let me be your man");
System.out.println("and please say to me");
System.out.println("you'll let me hold your hand");
System.out.println("Now let me hold your hand");
System.out.println("I want to hold your hand");
System.out.println();
printpara1();
printpara2();
printpara1();
printpara2();
}
public static void printthrice(String line)
{
System.out.println(line);
System.out.println(line);
System.out.println(line);
System.out.println();
}
public static void printpara1()
{
System.out.println("And when I touch you");
System.out.println("I feel happy inside");
System.out.println("It's such a feeling that my love");
printthrice("I can't hide");
}
public static void printpara2()
{
System.out.println("Yeah, you got that something");
System.out.println("I think you'll understand");
System.out.println("When I say that something");
printthrice("I want to hold your hand");
}
}
Output :
I'll tell you something
I think you'll understand
When I say that something
I want to hold your hand
I want to hold your hand
I want to hold your hand
Oh please say to me
you'll let me be your man
and please say to me
you'll let me hold your hand
Now let me hold your hand
I want to hold your hand
And when I touch you
I feel happy inside
It's such a feeling that my love
I can't hide
I can't hide
I can't hide
Yeah, you got that something
I think you'll understand
When I say that something
I want to hold your hand
I want to hold your hand
I want to hold your hand
And when I touch you
I feel happy inside
It's such a feeling that my love
I can't hide
I can't hide
I can't hide
Yeah, you got that something
I think you'll understand
When I say that something
I want to hold your hand
I want to hold your hand
I want to hold your hand
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.