Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The below code has been answer but it has to be written GUI using JAVAFx and i need help with it in simple way because

The below code has been answer but it has to be written GUI using JAVAFx and i need help with it in simple way because i am new to it and look at last slide and it has to be output like that. please help asap. image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
For this program, solution is already but it has to be converted in GUI using JAVAFX. i attached sample in 3 picture. please help me with uisng javafx input and display using gridpane. image text in transcribed
image text in transcribed
javafx output below
image text in transcribed
program output should look like in GUI.
image text in transcribed
image text in transcribed
Inport jaya. text, Becimallornat; nuklic clioss lapating 14. Hils is mer main public static void main(stringl] args) ( (f) fnist aectios String completedtemp = 10ptionpane,showinputolalog("please enteri the nuaber of coeplated passesil "); Int coespleted = Integer. parselit (conpletedTemp) ) Int at teepted o Integer onarseint (atteepts feep); String yards Teep = 30ptionPane - shouInputolalog( Pplease enter the number of receiving yards . ). int yand = Integer. parselnt (yards fesp ; String touchdouns Temp in 30ptionipane showinputoialog("Please enter the number of passine TDs: "); Int touchdown = IntegeriparseInt (toochdoans Tonp). Int intenception =Integer-parseInt (interceptionstemp); Wricall Mathodi. double coepresult = calccompletions(completed, attempted); double ygafiesult = calcyca (yard, attempted) ; double tdiesult a calciorlesult (touchdown, attespted); doubIr interitesult = caleInter(interception, attempted); double rating = abllating(coepliesult, ygafesult, td tesult, interkesult) i Cl Oneldecimil format. Decimalformat Pec m nest DecinalFormat (4,1), I/ Output section * Wefuarterhack tal ing is: " + Dec, format (rating) * * * - MPeecentage of Touchdonm: = + tlec. format (tiskesult) + + t + (7) output nesuge unime bialeg bon jopt ioneape s shopensaepolialog(nu)1, output); System, exit (0). fl Cal sectime public static double calcConpletfars (int ceep, int atteopt) If Calculatirng a weran yaras ifained periatedejt public static dodute calcraatint yard, int atteapt) 1 double yards a yard; double atteepts = at tenpt ; (7) Calculat inat nervent wite of Lecept ions public statik deable catcintnr(int intne, int attrapt) ( (l Deterininit thet player rating public static deublin ablating(double conp, double yga, doable td, (foubli inter) 1. return (coen) +ypa+ td + inter) /6100 Quarterback Rating Calculator NFL Quarterback Rating Formula The NFL rates its passers for statistical purposes against a fixed performance standard based on statistical achievements of all qualified pro passers since 1960. The current system replaced one that rated passers in relation to their position in a total group based on various criteria. The current system, which was adopted in 1973, removes inequities that existed in the former method and, at the same time, provides a means of comparing passing performances from one season to the next. It is important to remember that the system is used to rate passers, not quarterbacks. Statistics do not reflect leadership, play-calling, and other intangible factors that go into making a successful professional quarterback. Four categories are used as a basis for compiling a rating. 1. Percentage of completions per attempt 2. Average yards gained per attempt 3. Percentage of touchdown passes per attempt 4. Percentage of interceptions per attempt The average standard, is 1.000. The bottom is 000 . To earn a 2.000 rating, a passer must perform at exceptional levels, i.e, 70 percent in ompletions, 10 percent in touchdowns, 1.5 percent in interceptions, and 11 yards average gain per pass attempt. The maximum a passer can receive in any category is 2.375 (see examples at the end of the program). In.order to make the rating more understandable, the point rating is then converted into a scale of 100 . In rare cases, where statistical performance has been superior, it is possible for a passer to surpass a 100 rating. For example, take Steve Young's record-setting season in 1994 when he completed 324 of 461 passes for 3,969 yards, 35 touchdowns, and 10 interceptions. The four calculations would be: Percentage of Completions - 324 of 461 is 70.28 percent. Subtract 30 from the completion percentage (40.28) and multiply the result by 0.05. The result is a point rating of 2.014. Note: If the result is less than zero (Comp. Pct. less than 30.0 ), award zero points. If the Average Yards Gained Per Attempt - 3,969 yards divided by 461 attempts is 8.61. Subtract three yards from yards-per-attempt (5.61) and multiply the result by 0.25. The result is 1.403 Note: If the result is less than zero (yards per attempt less than 3.0 ), award zero points. If the result is greater than 2.375 (yards per attempt greater than 12.5), award 2.375 points. Percentage of Touchdown Passes - 35 touchdowns in 461 attempts is 7.59 percent. Multiply the touchdown percentage by 0.2. The result is 1.518. Note: If the result is greater than 2.375 (touchdown percentage greater than 11.875), award 2.375. Percentage of Interceptions - 10 interceptions in 461 attempts is 2.17 percent. Multiply the interception percentage by 0.25(0.542) and subtract the number from 2.375. The result is 1.833. Note: If the result is less than zero (interception percentage greater than 9.5), award zero points. The sum of the four steps is (2.014+1.403+1.518+1.833)6.768. The sum is then divided by six (1.128) and multiplied by 100 . In this case, the result is 112.8. This same formula can be used to determine a passer rating for any player who attempts at least one pass. In this program you are asked to compute the quarterback rating for an NFL quarterback. You will need to use methods for each of the Processing items and the output of your information. You do not have to have a method for the inputting of your data. Have your main call the methods and control the program. Quarterback Rating Calculator 12 JavaFX: GUI Programming and Basic Controls TOPICS 12.1 Graphical User Interfaces 12.7 Reading Input with TextField 12.2 Introduction to JavaFX Controls 12.3 Creating Scenes 12.8 Using Anonymous Inner Classes and 12.4 Displaying Images Lambda Expressions to Handle Events 12.5 More about the HBOx, VBox, and 12.9 The BorderPane Layout Container GridPane Layout Containers 12.10 The ObserveableList Interface 12.6 Button Controls and Events 12.11 Common Errors to Avoid Enter a distance in blometer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

What is ethnocentric bias?

Answered: 1 week ago