Question
PLEASE DO THIS IN JAVA!! 1) Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints
PLEASE DO THIS IN JAVA!!
1) Design and implement a program (name it SumValue) that reads three integers (say X, Y, and Z) and prints out their values on separate lines with proper labels, followed by their average with proper label. Comment your code properly. Format the outputs following the sample runs below.
Sample run 1:
X = 3
Y = 2
Z = 4
Average = 3.0
Sample run 1:
X = 7
Y = 8
Z = 10
Average = 8.333333333333334
Sample run 1:
X = 7
Y = -3
Z = -5
Average = -0.3333333333333333
2) Design and implement a programming (name it SimpleMath) that reads two floating-point numbers (say R and T) and prints out their values, sum, difference, and product on separate lines with proper labels. Comment your code properly and format the outputs following these sample runs.
Sample run 1:
R = 4.0 T = 20.0 R + T = 24.0 R - T = -16.0 R * T = 80.0
Sample run 2:
R = 20.0 T = 10.0 R + T = 30.0 R - T = 10.0 R * T = 200.0
Sample run 3:
R = -20.0 T = -10.0 R + T = -30.0 R - T = -10.0 R * T = 200.0
3): Design and implement a program (name it Coins) that determines the values of coins in a jar. The program prints out the total dollars and cents in the jar. The program prompts the user to enter the number of coins (quarters, dimes, nickels, and pennies). Print out the number of coins entered for each coin type on separate lines followed by the total amount of money in the jar as dollars and cents as shown below.
Sample run 1:
Enter number of quarters: 2 Enter number of dimes: 2 Enter number of nickels: 2 Enter number of pennies: 2 You entered 2 quarters You entered 2 dimes You entered 2 nickels You entered 2 pennies Your total is 0 Dollars and 82 Cents.
Sample run 2:
Enter number of quarters: 3 Enter number of dimes: 0 Enter number of nickels: 0 Enter number of pennies: 3 You entered 3 quarters You entered 0 dimes You entered 0 nickels You entered 3 pennies Your total is 0 Dollars and 78 Cents.
Sample run 3:
Enter number of quarters: 2 Enter number of dimes: 3 Enter number of nickels: 4 Enter number of pennies: 5 You entered 2 quarters You entered 3 dimes You entered 4 nickels You entered 5 pennies Your total is 1 Dollars and 5 Cents.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started