Question: Create the following programs in Java {Java1 difficulty} [Please create as simple as possible] a. Ask the user to enter their favorite number and favorite

Create the following programs in Java {Java1 difficulty} [Please create as simple as possible]

a. Ask the user to enter their favorite number and favorite word. Pass both of these values to a method that will print the favorite word vertically the favorite number of times.

b. Ask the user to enter 2 integers. Pass the integers to 2 different methods: one method to add the integers and print the sum (from the method); the second method to multiply the integers and print the product (from the method).

c. Ask the user to enter their name. Pass the name to a method that will print each letter of the name on a separate line. Return to main and print goodbye to the user with the entire name printed on one line.

d. Ask the user for the amount (number) of days a library book is past due. Pass this value to a method that will calculate and print the late fee at 15 cents per day. Also, have the method print the message WAY OVERDUE if the book is more than 10 days past due.

e. Ask the user to enter an integer number. That number is passed to a method that adds the numbers from 1 to that number. Example: if the user enters 6, the method returns the sum of 1+2+3+4+5+6. Return this sum to main to be printed. Use a for loop and a summation in your method.

f. Calculate the areas of circles with radii of 1-10. Generate the radii with a for loop in main. Pass each radius to a method that calculates the area. Return the area to main and print it to the nearest tenth on the same line as the corresponding radius.

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!