Write a program, Triangle1.java, that reads three edges for a triangle and determines whether the
input is valid. The input is valid if the sum of any two edges is greater than the third edge.
For example: If your input for three edges is 1, 2, 1, the output should be:
If your input for three edges is 2, 2, 1, the output should be:
Modify the program so that if the edges are valid, it should compute the perimeter of the triangle.
Ask the user whether to repeat the task or not.
5. Write a program, Triangle2.java, by modifying Triangle1.java to change the prompt from “(1)
to continue : (0) to exit” to “C to Continue : E to exit”.
Write a program that reads student scores, assigns a passing score and then display a summary. The
program prompts the user to enter the total number of score and create an array of integer based on
the number of score, then prompts the user to enter all of the scores to be stored in the array, and
concludes by displaying the summary shown below.
Write a Java program that reads the name of a student from the keyboard. Then read
ten test scores in the range of (1-10) from the keyboard and place them in an array.
And Compute the followings.
the total score
the highest score
the lowest score
the average score
Then use the total score which should be less than a hundred to identify a letter grade
90 to 100 is A
80 to 89 is B
70 to 79 is C
60 to 69 is D
0 to 59 is F
Then display the output of the name of the student, total score, highest score, lowest score,
average score and the letter grade as shown below.
Write a Java program that prompts the user to make a choice of a pizza size, (Small, Medium,
Large, Extra Large) and a quantity of the pizza – then displays the total price of the order. The
prices are $6.99, $8.99, $12.50, $15.00 for size S, M, L, and XL respectively.
a. Create an array to store prices.
b. The price should be identified when the user enters a size (1, 2, 3 or 4). If the size
is 1, then the price is in the index 0 of the array. If the size is 2 then the price is in
index 1 of the array, and so on. Use the index to refer to the price of the pizza’s
size and calculate the total with quantity identified by the user.
c. The program should repeat the process until the user selects to terminate.
d. At the end of the program, the total sale should be displayed.
e. Save the file as PizzaChoice.java
Here are sample runs.
Purchase answer to see full