1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tensa zangetsu [6.8K]
3 years ago
5

Write a program that can print a banner with rotated letters, such that they can be read from top to bottom. Specifically, each

letter in the message should be printed using multiple lines composed of * symbols. The code to print each letter should go into a separate method just for that letter (no parameters, no return value). Don’t worry, you don’t need to make 26 different methods, just 8: the seven letters in the message "Hello World" (D, E, H, L, O, R, and W) and a space. In your main method, you should ask the user to type a message. Then, loop through each character in the message and, for each character, if you have a corresponding method, call the method to print out the letter to the screen, ignoring any other characters. To help get you started, here is an example method for the letter D:
Computers and Technology
1 answer:
My name is Ann [436]3 years ago
4 0

Answer:

package Lab6Problema;

import java.util.Scanner;

public class Lab6Problema{

public static void H() // prints H

{

System.out.println();

System.out.println("** **");

System.out.println("** **");

System.out.println("******");

System.out.println("** **");

System.out.println("** **");

}

 

public static void E()//prints E

{

System.out.println();

System.out.println("******");

System.out.println("** ");

System.out.println("******");

System.out.println("** ");

System.out.println("******");

}

 

public static void L()//prints L

{

System.out.println();

System.out.println("* ");

System.out.println("* ");

System.out.println("* ");

System.out.println("* ");

System.out.println("******");

}

 

public static void O()//prints O

{

System.out.println();

System.out.println("******");

System.out.println("* *");

System.out.println("* *");

System.out.println("* *");

System.out.println("******");

}

 

public static void W()//prints W

{

System.out.println();

System.out.println("* *");

System.out.println("* *");

System.out.println("* ** *");

System.out.println("* ** *");

System.out.println("** **");

}

 

public static void R()//prints R

{

System.out.println();

System.out.println("***** ");

System.out.println("** **");

System.out.println("***** ");

System.out.println("** **");

System.out.println("** **");

}

 

public static void D()//prints D

{

System.out.println();

System.out.println("**** ");

System.out.println("* * ");

System.out.println("* *");

System.out.println("** * ");

System.out.println("**** ");

}

public static void blank() //prints blank space

{

System.out.println();

System.out.println();

System.out.println();

}

public static void main(String[] args) {

//just enter "Hello World" as input as specified

System.out.println("Enter a Message");

Scanner scan=new Scanner(System.in);

String myMessage=scan.nextLine(); // read msg using scanner

int numOfCharacters=myMessage.length();// calculate message lenth

for(int i=0;i<numOfCharacters;i++) // loop through each chracter in msg

{

// gets character at position i, and switch accordingly

switch(myMessage.charAt(i))

{

// if character is 'H' or 'h', call method H(). Similarly for other

// Hecharacters in message.

case 'H':

case 'h':H();break;

case 'E':

case 'e':E();break;

case 'L':

case 'l':L();break;

case 'O':

case 'o':O();break;

case 'W':

case 'w':W();break;

case 'R':

case 'r':R();break;

case 'D':

case 'd':D();break;

case ' ':blank();break;

}

}

}

}

Explanation:

You might be interested in
Are lenovo margins expected to be stable in the china operations
lisov135 [29]

Yes

Lenovo Group Limited is the world’s number 3 PC brand. It has gained the operating margins at the perfect levels. Lenovo has attained this steady growth and it expects to maintain or improve its gross margin in China operations now and in the future.

3 0
4 years ago
Read 2 more answers
What quantities are measured by the following sensors:
grigory [225]

Answer:

D

Explanation:

3 0
3 years ago
After reading his e-mail messages, Orlando became very frustrated. Many of the messages he received did not conform to netiquett
Art [367]

Answer:

We need to talk about the project, please call me.

Explaination:

edge 2021

8 0
3 years ago
While an image is still being editing, it is best to save it as a PDF. Group of answer choices True False
Readme [11.4K]

Answer:

f

Explanation:

6 0
3 years ago
Read 2 more answers
What is the most important difference between generic software product development and custom software development? What might t
Andreyy89

Answer:

In the case of generic software development, the developer has the control of all the decisions while with custom software development, the client is responsible of the decisions about the characteristics of the software.

This means for users of generic software products that they don't have control over the product.

Explanation:

-A generic software development refers to the creation of a product by a software development organization that will own it and sell it to customers. This software is created for the open market and is designed to solve a problem for many customers.

-A custom software development refers to the creation of a product by a software development organization for a client.  This product is created according to the customer's needs and specifications in order to solve a specific problem of the client.

4 0
4 years ago
Other questions:
  • Technician A says that if the coefficient of friction is too low, the brakes will grab.
    12·1 answer
  • When an online auction site increases its number of users, then the value of the site increases for everyone. This is an example
    8·1 answer
  • Which event occurs when the user clicks on an html element?
    9·1 answer
  • An artificial satellite in which people can live and work for long periods is called a
    15·2 answers
  • If a small monster collector:- Has 16 small monster containment devices and intends to use all of them.
    10·1 answer
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • Judy forgot where she saved a certain file on her computer. Therefore, she searches for all files with a .jpg file extension. Wh
    7·2 answers
  • Write a program with the total change amount as an integer input, and output the change using the fewest coins, one coin type pe
    13·1 answer
  • A small company with 100 computers has hired you to install a local area network. All of the users perform functions like email,
    9·1 answer
  • What is a program answer these question<br>of grade-6​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!