Homework

Homework Questions? Ask a Tutor for Answers ASAP

Connect one-on-one with {0} who will answer your question

Related Homework Questions
Suppose an airline company has hired you to write a program
Suppose an airline company has hired you to write a program for choosing the passengers who should leave overbooked flights. That means, the company has booked too many passengers hoping some of them … read more
LogicPro
LogicPro
Engineer
Bachelor of Technology
20,030 satisfied customers
Longest common subsequence algorithm The longest common
Longest common subsequence algorithm The longest common subsequence (LCS) is often used in the fields of DNA sequence comparison or version control. Please make the LCS algorithm according to the slid… read more
Expert
Expert
SOLVE THIS Programming Problem FAST Problem can be solved
PLEASE SOLVE THIS Programming Problem FASTProblem can be solved with Javascript - Python - JavaPlease elaborate coding approach and why you code the way you do. Comments and explanation. & state which… read more
Erwin Garcia
Erwin Garcia
Master of Science
1,800 satisfied customers
Java. I have a little bit of code. I need this completed in
i need this completed in 1 hour Player Class Specification The Player class represents a player that will play a simple game. In this game, a player can play the number 0, 1, or 2. The Player class contains the following four fields: private String name; private int play; private int [] tally; private StringBuffer history; The Player class contains the following 2 constructors and 5 methods that you must implement: 1. Constructor with String parameter – If the argument is null, throw the IllegalArgumentException with the message "Invalid parameter", otherwise set the name field. Set play to 0, assign an int array to tally (you can decide the size of the array), and an empty StringBuffer to history. This constructor will be referred to as “the constructor” in the remainder of the text. 2. Copy Constructor – Make sure the copy is completely independent of the original with no shared fields. 3. getPlay – get method for the play field. 4. setPlay - If the argument is anything other than 0, 1, or 2 , throw the IllegalArgumentException with the message "Invalid parameter", otherwise set the play field. You are free to update other fields as you see fit in this method. 5. getHistory – returns the history of the player. The history will be each play followed by one space after the play(there will even be a space after the last play). For example, if the player plays a 2, followed by a 0, followed by a 1, the content of the history will be 2 0 1 Note: The history never contains the original 0 assigned as the default value of play using the constructor. Hint: Beware of a privacy leak. (Please do not post to piazza asking what is meant by a privacy leak. You should know this from the lectures) 6. reset – After this method is invoked on a player object, the player object should be in the same state as it would be if it was just constructed using the constructor. 7. getTally – Will return a string that represents the frequency of each play of the player. For example, the following: 0: ******** 1: ****** 2: ****** means the player has played 8 zeros (because there are 8 *), 6 ones, and 6 twos. See the sample driver for another example. PlayGame Class Specification The PlayGame class contains one static method, play, that allows 2 players to play the simple game. The rules are as follow: There are only 3 values that can be played: 0, 1, 2 In each round, each of the 2 player picks one of the three values. If both players, pick the same value, the round is a tie. A 2 beats a 1, a 1 beats a 0, and a 0 beats a 2 (this last rule is a little counter intuitive, so just to repeat, a player that picks a 0 will win over the player who picks a 2) The PlayGame class contains the following static method that you must implement: 1. play -This method will simulate 10 rounds of the game and return a string that shows the result of each round as well as the overall winner of the game (or report a tie). For each round, first set the play of player 1 then set the play of player 2. To get a value that is either 0,1,or 2, you must use the following call: random.nextInt(3) For each round, figure out who the winner is (it might be a tie) and concatenate the string you form to the string that the method will return. For example, the text for round 1 might be: Round 1 - P1: 0, P2: 1, result: P2 Wins See the Sample Driver output for more examples. Feel free to add private helper static methods to help you implement the necessary logic of who wins a round. After the 10 rounds, you need to have one additional line that reports the winner (whoever won the most game, or a tie if both have the same number of wins). For example, the text might be: P1 total: 2, P2 total: 3, Winner: P2 See the Sample Driver output for more examples. this is the requirement … read more
Expert
Expert
Your program is to read in the information from a text file
Your program is to read in the information from a text file containing a list of passengers. There is an unknown number of passengers with a maximum of 180 passengers. Each row in the file contains a … read more
R.R. Jha
R.R. Jha
Bachelor's Degree
6,909 satisfied customers
Your assignment is to use a random number generator to explore
Your assignment is to use a random number generator to explore the game of roulette. A Eurpean roulette wheel has the following numbers: using pascal Single zero wheel: 0-32-15-19-4-21-2-25-17-34-6-27… read more
Mr. Gregory White
Mr. Gregory White
1,269 satisfied customers
In this project you will be provided with a description of
In this project you will be provided with a description of an application (below) to create an entity-relationship diagram (ERD) and design accompanying table layout using sound relational modeling co… read more
ATLProg
ATLProg
Sr Software Engineer
Master's Degree
1,448 satisfied customers
The deliverables for this project include an Entity Relationship
The deliverables for this project include an Entity Relationship Diagram and detailed documentation describing the database design and structure.Project 1 Details: In this project you will be provided… read more
Raj
Raj
SAP ABAP Consultant
Master's Degree
365 satisfied customers
Airline Reservation SystemOverviewThis program is to
Airline Reservation System Overview This program is to support the client-side of an airline reservation system for airline reservation agents. The program does not manage user accounts, it only shows… read more
Raj
Raj
SAP ABAP Consultant
Master's Degree
365 satisfied customers
**For TheDoctor** Need a html video that will work with IE8
Need a html javascript video that will work with IE8 More info you can find at www.caxlo.com/video.docx… read more
TheDoctor
TheDoctor
Software Engineer
Master's Degree
799 satisfied customers
Good morning,I noticed you have worked with this question
Good morning, I noticed you have worked with this question before: You are a database consultant with Ace Software, Inc. and have been assigned to develop a database for the Mom and Pop Johnson video … read more
jatechexpert
jatechexpert
Master's Degree
82 satisfied customers
Exercise 2-33 Barts Woodwork Company makes and sells wooden
Exercise 2-33 Bart's Woodwork Company makes and sells wooden shelves. Bart's carpenters make the shelves in the company's rented building. Bart has a separate office at another location that also incl… read more
Bambi
Bambi
Master's Degree
30 satisfied customers
Part of becoming a historian is understanding the difference
Part of becoming a historian is understanding the difference between actual history and how filmmakers portray history. For this class you will watch two historical films of your choice and write shor… read more
ResearchPro
ResearchPro
Busness Consultant/Tutor/Instructor
Master's Degree
506 satisfied customers
Each of the following word group pairs may contain a sentence
Each of the following word group pairs may contain a sentence fragment. If it does, choose the word group in which the fragment has been corrected properly. If neither word group is a fragment, choose… read more
Susan Athena
Susan Athena
Research analyst, tutor
Master's Degree
3,810 satisfied customers
Hi is there anyone only available to help me with some math ...
Hi is there anyone only available to help me with some math homework tonight? if yes here they are: 1) Flying with the wind, a plane flew 828 mi in 4h. flying against the wind, the plane could fly onl… read more
David Coleman
David Coleman
Solicitor
Bachelor's Degree
97 satisfied customers
2 trains 500 miles apart accidentally is on the same track ...
2 trains 500 miles apart accidentally is on the same track heading towards each other. The passenger train is traveling at 30mph while the freight train is traveling 40 mph. The dispacter discovers th… read more
Scott
Scott
MIT Graduate
Master's Degree
5,697 satisfied customers
1. Number problem. If one-half of one integer is ...
1. Number problem. If one-half of one integer is subtracted from three-fifths of the next consecutive integer, the difference is 3. What are the two integers? 2. Science and medicine. A plane fies 720… read more
mathsmart
mathsmart
Private Tutor
Bachelor Degree
778 satisfied customers
The F-number system consists of 1 and all the positive ...
The F-number system consists of 1 and all the positive multiples of 5: so F = {1, 5, 10, 15, 20, 25...} (a) Define what it means for a F-number to be F-Prime. List the first ten F-primes. (b) Find a c… read more
mathsmart
mathsmart
Private Tutor
Bachelor Degree
778 satisfied customers
Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help.

Mary C.Freshfield, Liverpool, UK

This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!!

AlexLos Angeles, CA

Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult.

GPHesperia, CA

I couldn't be more satisfied! This is the site I will always come to when I need a second opinion.

JustinKernersville, NC

Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around.

EstherWoodstock, NY

Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know.

RobinElkton, Maryland

He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here.

DianeDallas, TX

< Previous | Next >

Meet the Experts:

Scott

Scott

MIT Graduate

5,697 satisfied customers

MIT Graduate (Math, Programming, Science, and Music)

LogicPro

LogicPro

Engineer

20,030 satisfied customers

Expert in Python,Java C++ C C# VB Javascript Design SQL HTML

Manal Elkhoshkhany

Manal Elkhoshkhany

Tutor

4,843 satisfied customers

More than 5000 online tutoring sessions.

Linda_us

Linda_us

Finance, Accounts & Homework Tutor

3,138 satisfied customers

Post Graduate Diploma in Management (MBA)

Chris M.

Chris M.

M.S.W. Social Work

2,852 satisfied customers

Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)

F. Naz

F. Naz

Chartered Accountant

2,280 satisfied customers

Experience with chartered accountancy

Jaun

Jaun

Teacher

1,965 satisfied customers

Masters in Business Administration.

< Previous | Next >

Disclaimer: Information in questions, answers, and other posts on this site ("Posts") comes from individual users, not JustAnswer; JustAnswer is not responsible for Posts. Posts are for general information, are not intended to substitute for informed professional advice (medical, legal, veterinary, financial, etc.), or to establish a professional-client relationship. The site and services are provided "as is" with no warranty or representations by JustAnswer regarding the qualifications of Experts. To see what credentials have been verified by a third-party service, please click on the "Verified" symbol in some Experts' profiles. JustAnswer is not intended or designed for EMERGENCY questions which should be directed immediately by telephone or in-person to qualified professionals.

Show MoreShow Less

Ask Your Question

x