i need help on my project
1. Write a program that will print out statistics for eight coin tosses. The user will input either an “h” for heads or a “t” for tails for the eight tosses. The program will then print out the total number and percentages of heads and tails. Use the increment operator to increment the number of tosses as each toss is input. For example, a possible sample dialog might be:
For each coin toss enter either ‘h’ for heads or ‘t’ for tails.
First toss: h
Second toss: t
Third toss: t
Fourth toss: h
Fifth toss: t
Sixth toss: h
Seventh toss: t
Eighth toss: t
Number of heads: 3
Number of tails: 5
Percent heads: 37.5
Percent tails: 62.5
Since we do not know how to use if statements, loops or the conditional or ternary operator, none of those structures can be used. This problem can be solved using only the material in Chapters 1 - 2.
2.Use JOptionPane for I/O (Input/Output). Test your program with several test cases and PrintScreen the results. Print the tosses and the results screens for the first test case. Just print the results for the other cases.