How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask ATLProg Your Own Question
ATLProg
ATLProg, Software Engineer
Category: Homework
Satisfied Customers: 9151
Experience:  Expert in Java C++ C C# VB Javascript Design SQL HTML
44910485
Type Your Homework Question Here...
ATLProg is online now
A new question is answered every 9 seconds

I have a java programming assignment that requires multiple

This answer was rated:

I have a java programming assignment that requires multiple programs to be written One is a coin toss program and the other is a theater seating array. I can upload the assignment document to better give directions
Hi, i am ATLProg. I can assist you.. Can you please provide more information
Customer: replied 4 years ago.

here is the following assignment. If you can have this completed before 5pm for submission today, I will add an additional 30 dollars.


Question 1 (40 points): Coin





 


Write a class named Coin. The coin class should have the following field and methods:


 





  • The sideUP field will hold either “heads” or “tails” indicating the side of the coin that is facing up.

  • The constructor randomly determines the side of the coin that is facing up (“heads” or “tails”) and initialized the sideUP field accordingly.

  • toss method simulates the tossing of the coin. When the toss method is called, it randomly determines the side of the coin that is facing up and sets the sideUP field accordingly.

  • getSideUp method return the value of the sideUp field.


 


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.



 



Question 2 (60 points): Theatre Seating





A theater seating chart is implemented as two-dimensional array of ticket prices, like this:



















































































































10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



10



20



20



20



20



20



20



10



10



10



10



20



20



20



20



20



20



10



10



10



10



20



20



20



20



20



20



10



10



20



20



30



30



40



40



30



30



20



20



20



30



30



40



50



50



40



30



30



20



30



40



50



50



50



50



50



50



40



30




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.



 



Question 3 (Extra Credit - 20 points): Reverse Array





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

How soon you need this done Anthony
Customer: replied 4 years ago.

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:


 


Coin



-sideUp:String




+Coin()


+toss:void


+getSideUp():String


 


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.


 



I can help you but looking at effort involved and fact these are 3 program can you please create separate question for 2nd and 3rd programs
Customer: replied 4 years ago.

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?

Does the price of 75 sound ok for both the programs?
Customer: replied 4 years ago.
If it can get done prior to the deadline yes.
Customer: replied 4 years ago.

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.

Please download solutions from


http://wikisend.com/download/148338/Coin.zip

I hope you found it to be Excellent, please remember to rate! If you didn't find it to be "Excellent" or are not 100% satisfied, please reply to me so that i can help you better.

For future reference - Please start your question text with "For ATLProg Only" to request me again. It will ensure that question comes to me.
Customer: replied 4 years ago.

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.

THIS ANSWER IS LOCKED!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
ATLProg and 3 other Homework Specialists are ready to help you
Customer: replied 4 years ago.

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?

You need to rename the class name inside the file too

Related Homework Questions