Question: Java programing (1) Works according to the problem statement, (2) Good style (indentation, naming, etc.), (3) Appropriate data types, (4) No nonworking or extraneous code,
(1) Works according to the problem statement, (2) Good style (indentation, naming, etc.), (3) Appropriate data types, (4) No nonworking or extraneous code, (S) Only include concepts & techniques introduced thus far by text or lecture, 16) If not legible, it is wrong. (7) The solution should be able to be compiled and executed. PARTIAL CREDIT WILL BE GIVEN, Problem Statement: You are to create a program that tracks the number of points scored in a Voft football game. This program will assume that there are 3 scores. This program will then display the total points scored. There are TWO classes Class 1: This dass has two attributes. This class will be called hofu Football. The first attribute will be the name of the player that scored, the second will be the total points scored. This class has ONLY 2 methods in addition to the main () method. These additional methods should not have public access. . The first of these additional methods asks the user to enter name of the player that scored in the football game. This will be followed by a dialog box that asks the user to enter the number of points scored by the player. You will need to store these values in the attributes defined above. These dialog boxes should be identical to those shown below. The second receives as a parameter the object name of type Footballssores. It will display the name of the player that scored, number of points, and a flag to show if the score was a touchdown as shown below. HINT - you will need to get these from the 2nd class based on the object name being passed. The main () method does the following in the following order. (1) it calls the first additional method that prompts the users to enter the name of the player and points scored. It calls the second class to instantiate an object passing the information collected in (1) above. It calls the second additional method passing the object name just created as described above. (2) it calls the first additional method that prompts the users to enter the name of the player, followed by the points scored as shown below. It calls the second class to instantiate an object passing the information collected above. It calls the second additional method passing the object name just created as described above. (3) It calls the first additional method that prompts the users to enter the name of the player, followed by the points scored as shown below. It calls the second class to instantiate an object passing the information collected above. It calls the second additional method passing the object name just created as described above. The program will then display the point total scored during the game as shown below. Class 2: This class is called Footbalscores and has ONLY the following 4 attributes. (1) Name of the player that scored Boolean attribute indicating if the score was a Touchdown Number of points scored (4) Total number of points scored This class has ONLY the following 1 constructor method. This method will accept the name and number of points scored. It will move the name and points scored to the attributes. It will determine if the points scored is a touchdown (6 points) and assign this value to the booleao attribute. It will increment the point total by the number of points scored. This class has 4 additional methods to return the value of each of the attributes of the class. With the input provided below, the output of your program should look exactly like that displayed below. (4) (2) (3) The paper Mere The D. 0 Concord 8 OK the point total by the number of points scored. This class has 4 additional methods to return the value of each of the attributes of the class. With the input provided below, the output of your program should look exactly like that displayed below. Ingut Input Message Input ? How many point? Enter Player me at scored Cases NOVED The player Duke Catalos scored this score was a TD true Enter the Play Meme mat con Our Cation OK Canon Cancel OK OK Cancel Iron Message troul How To er the Plane that ? How many pet? The player Ceden Hool scored is score was a false OK OK OK Canal OK Coacal Me Message The player fon Birden scored this score was a TD true Vot couper Football Team scored 15 points OK OK With the input provided below, the output of your program should look exactly like that displayed below. of the class. Input Input Message Jeput ? Enter the method Cac tin 1 How many points ? The player Duke Catalon scored this score was a true Enter the Player marscar Duration OK CARCH OK Cancel OK OK Messa Sput How many The player Cadea Moscored score was a Daise Ester the Playere that Order 2 OK Cance OK Cance OM Message Message The player onder scored mis score wasTD U Couger Football Team scored 15 points OX ON Quir1 Pall 17- Knighton
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
