Question: Create the following programs in Java. (Do not use Arrays etc, keep it simple) a. Write one program named PartA that does the following: Write

Create the following programs in Java. (Do not use Arrays etc, keep it simple)

a. Write one program named PartA that does the following:

  • Write a method named printText that prints a simple thank you for your business style message for a company. The method takes no arguments.

  • Write a method named mathHelp that takes two arguments: two integers. The integers are then squared, added and the result printed on the screen.

  • Write a method named printChar that takes three arguments: a character and two integers. The character is to be printed using a nested loop. The first integer specifies the number of times that the character is to be printed on a line, and the second integer specifies the number of lines that are to be printed.

b. Write a program name CatAndMice that uses 2 methods to print: Three blind mice Three blind mice See how they run See how they run They all run after the farmer's wife. One method, named mice, prints the phrase "Three blind mice" and is invoked twice. The other method, named run, prints the phrase "See how they run" and is invoked twice. Produce the output shown above by calling your methods in the main method. The last line is a literal print in main.

c. Write a program named Address that utilizes two methods. The first method, named symbols, prints 30 $-symbols horizontally (you must use a loop for this!). The second method, named address, prints your name, address, and city, state, zip on three separate lines. The program will invoke the methods in main in such a manner as to produce two lines of $-symbols, followed by your personal information, followed by three more lines of $-symbols.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!