Write a class named Coin. The coin class should have the following field and methods:
Write a “LastNameFirstNameCoinToss.java” program that demonstrates the Coin class. The program should create an instance of the class and display the side that is initially facing up. Then, use a loop to toss the coin 20 times. Each time the coin is tossed, display the side that is facing up. The program should keep count of the number of time heads is facing up and the number of times tails is facing up, and display those values after the loop finishes.
A theater seating chart is implemented as two-dimensional array of ticket prices, like this:
Write a program that prompts the users to pick either a seat or price. Mark sold seats by changing the price the 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price.
Note: Assume that if the user enters 1 for the row and 1 for the seat, the yellow marked sit will be sold.
Write a complete program which will ask the user to enter integer values. The values need to be stored in an array. Then write a method that reverses the sequence of elements in an array. For example, if you call the method with the array
1 5 7 9 13 8
then the array is changed to
8 13 9 7 5 1
Sir, the deadline for submission is 6pm Eastern time (5pm central standard, my timezone). Also here is the UML diagram for the Coin class program:
If this can be ready before that time I would be in your debt. I understand that this is a very short timeframe and I apologize. Please help if you can.
The third is a bonus, so that one does not need to get done. In fact I will try to write that code, so this leaves just the other program. Does that help at all?
Also, I have updated the price of the programs to 75 on the account page, so it should reflect the change as per requested. Thank you in advance for your help.
The theater array program is perfect. The coin toss program needs tweaking. there should be a driver coin.java code, based on the provided UML diagram that serves as a driver, constructor with private fields, and a secondary cointoss.java code that serves as a test. The coin.java will have only the fields and method calls, no main method, and the cointoss.java should be the one with a main method that serves to test the driver program. Essentially they just have to be split up into two source codes that function together as one working program. The code for it looks great, with the aforementioned being the only issue.
When I compile everything works correctly, however when I try to change the class name to BagwellAnthonyCoin and BagwellAnthonyCoinDriver, it stops working and says invalid return type for the Coin class. Is there any way I can fix this?