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
An engine you're servicing has electronically controlled cooling fans. Cooling fan 1 doesn't work but cooling fan 2 does. Which
Elanso [62]

It might because of many reasons:

  • Fan 1 is not connected to the Program (via Bluetooth, WIFI, or wired)
  • The code made to make Fan 1 start up has a bug or an error
  • Fan 1 has a hardware problem
  • Fan 1 is out of reach for the electronically controller to reach
  • Fan 1 is not connected to a power supply (tho)

<u><em>sorry if my answers don't help solve your problem </em></u>

4 0
3 years ago
Question # 6
insens350 [35]

Answer:

April 30, 1993

Explanation:

On April 30, 1993, four years after publishing a proposal for “an idea of linked information systems,” computer scientist Tim Berners-Lee released the source code for the world’s first web browser and editor.

4 0
2 years ago
What does hdtv stand for
Gnesinka [82]
High Definition Television
8 0
3 years ago
Read 2 more answers
Who here has an old (preferably 80s) Toyota Celica i just bought mine and want to know how you guys like yours because mine is f
Maurinko [17]

Answer:

Explanation:

The 1980 Toyota Celica is a great car, it was my first car and I loved it. It has many luxury features that you don't see much in cars of that year. It is also extremely reliable and can take lots of use before beginning to give problems. I used to use it to get to and from school on a daily basis and it never once left me stranded. It includes power steering, cruise control, AC, etc. Not much more you can ask for in a car, it is also a very beautiful looking car, especially a well taken care of one. Enjoy your car.

8 0
2 years ago
She wants to sort the list based on the names of the first four gas in ascending order. Which command group dose she navigate to
zubka84 [21]

<u>Best method to sort data:</u>

Best method to sort for data people use excel sheet.  If we have 4 quarter sales data of each select man wise.

1. Open the MS Excel

2. Create blank sheet

3. Create list of salesman and quarter sales in each cells from A1….

4. Select all whole worksheet and paste it the data

5. Once data is copied, custom list is created and select advanced options dialog box, select required field and sorting is achieved.

This is simple’s method for sort the list based on the names of the first four gas in ascending order.

7 0
3 years ago
Read 2 more answers
Other questions:
  • The groups_per_user function receives a dictionary, which contains group names with the list of users. Users can belong to multi
    11·1 answer
  • The ________ is(are) used to display information on the computer's screen.
    13·1 answer
  • "Simon Says" is a memory game where "Simon" outputs a sequence of 10 characters (R, G, B, Y) and the user must repeat the sequen
    12·1 answer
  • The set of appearance choices for files and folders is known as the
    7·1 answer
  • An is auditor reviewing a network log discovers that an employee ran elevated commands on his/her pc by invoking the task schedu
    10·1 answer
  • While the Internet is used to share many useful services and information, there are growing concerns about the way that the Inte
    8·1 answer
  • I don't know if this is supposed to go here or art but i need help with photoshop, basically you can create whatever you want bu
    7·1 answer
  • The physical layer of the OSI model is not foundational to any of the other layers. True or False
    8·1 answer
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
  • These 2 questions PLEASEEE (:
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!