Your program should use at least the three variables


Write a Java application program called Largest.java that inputs a series of 10 single-digit numbers and determines and prints the largest of the numbers. Except main() method, no other user-defined method is required. Your program should use at least the following three variables:

a) counter: A counter to count to 10 (that is, to keep track of how many numbers have been input and to determine when all 10 numbers have been processed);

b) number: The current digit input to the program;

c) largest: The largest number found so far. 

STEP 2: Palindrome (15 points)



A palindrome is a sequence of characters that reads the same backward as forward. For example, each of the following five-digit integers is a palindrome: 12321, 55555, 45554 and 11611. Write an application called Palindrome.java that reads in a five-digit integer and determines whether it is a palindrome. If the number is XXXXX five digits long, display an error message dialog indicating the problem to the user. When the user dismisses the error dialog, allow the user to enter a new value.

Your program will have the following four methods:

main() method, which controls the execution of the program

retrieveInput() method, which prompts and retrieves the input values

check() method, which determines whether it is a palindrome

display() method, which displays the result.

STEP 3: Diamond (15 points)



Write a program called Diamond.java that uses a method diamondOfAsterisks() that displays a diamond (the row number of a diamond must be odd) of asterisks whose row is specified in an integer parameter row. For example, if row is 7, the method displays the pattern of asterisks at the top of the next page. 

*

***

*****

*******

*****

***

*

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Your program should use at least the three variables
Reference No:- TGS0111653

Expected delivery within 24 Hours