Results (
English) 1:
[Copy]Copied!
Create a class named TennisGame that contains information about a single tennis game. TheYou have six fields: the names of the two players to the full number of end points.The player and the string value of the final score, as well as how each of.Six-seven ways to field the players name. And acceptanceSeven methods that accept two integer end score. End of the integerThe score for the players. The number of players in the game, winning this value.Should be in the range of 0 to 4, if all seven methods for parameters.Is not in the range 0 to 4 rating points assigned to 0 and set the drive "error."Scores of string. If both players have a score of 0, 4, both score.And the "error" to string score. The value of the string is defined by the method.The integer setting value A string containing the end points for each playerThe original name for the point in tennis: love, 15, 30, or 40 games, respectively. TheA value of 0 to 4, create a class named DoublesTennisGame that has two.Additional field names of two pairs of players, including how to get.For this name instead of the primary. SetNames () method of the class to accept the name of the.All four players named the DemoTennisGames instantiates programming.Various objects of each of these classes. Showed how the given drive.The correct value. Save the file as URTennisGame.java, URDoublesTennisGame.javaAnd URDemoTennisGames.javaResults (in Thailand) 4:02Create a name using the level TennisGame information about the game of tennis at one place.A six-branch: the name of the two players the last integer for the score of.The player's final score, and the value of the string, including how to get each.Six of the seven include two names of players and.Anothe September agreed how the final score two integer values. The last whole number.The score for the players is the number of points awarded during the game, the player then. The value of thisShould be in the range of 0 to 4, if both of the sets of parameters used for the method.The score is not in the range of 0 to 4, define and assign a score of 0 for both the error to "".Scores of string. If both players have a score of four points of all defined parameters 0.And the "error" string score. The value String is the way that the month of September.Set the integer score. The final score for each player are.The original name for score in tennis: love, 15, 30, 40, or games, respectively.A value of 0 to 4, create a class named DoublesTennisGame that has two.Additional fields for the name of the first two players ' partners, including how to get.For the names, instead of the parental level SetNames () method that will accept your name.All four players. Write an application that instantiates DemoTennisGamesEach of these object classes. Demonstrate that all methods defined.The correct value. Save the files as TennisGame.java, DoublesTennisGame.java,And DemoTennisGames.java
Being translated, please wait..
