Lab Task
Lab Task
Write a Menu Driven JAVA program that creates a string array by taking input from user and
perform following tasks by displaying menu to user, the menu operations are implemented using
methods:
Question – 2: ______
Write a function capitalize(lower_case_word) that takes the lower case word and returns the word
with the first letter capitalized. Eg., System.out.println(capitalize(“word”)) should print the word
Word.
Then, given a line of lowercase ASCII words (text separated by a single space), print it with the first
letter of each word capitalized using the your own function capitalize().
Question – 3:
Write a program that prompts the user to enter the year and first day of the year, and displays the first
day of each month in the year. For example, if the user entered the year 2013, and 2 for Tuesday,
January 1, 2013, your program should display the following output:
...
Question – 4:
Write a method that returns the area of a pentagon using the following header:
public static double area(double side)
Write a main method that prompts the user to enter the side of a pentagon and displays its area
Sample Run
Enter the side: 5.5
The area of the pentagon is 52.04444136781625