Q1. Develop a Java FX program called ComputeBMI that will have a GUI interface as shown below and computes the Body Mass
Posted: Wed Apr 27, 2022 3:38 pm
Q1. Develop a Java FX program called ComputeBMI that will have a GUI interface as shown below and computes the Body Mass index (BMI) based on the input weight and height in the respective text fields. The result, 'bmi', should be displayed in a Label as shown in the figure. Also define a button, 'Calculate BMI' for computing the BMI using appropriate event handling mechanisms. (6 marks) Note: BMI = Width / Height JavaFX BMI Calculator JavaFX BMI Calculator X BMI Calculator BMI Calculator Weight(KG): Weight: 65 Height(): Height(M): 1.55 Calculate Calculate BMI Value 41.935493870967744 Q2. Write a JavaFX program that rotates a rectangle 45 degrees to the right when the Rotate button is clicked as shown below. (3 marks) a) You must use an inner class to implement the EventHandler interface and its handle method. (3 marks) b) Make a new copy (version) of this JavaFX program and use an anonymous inner class to implement the EventHandler interface and its handle method. (3 marks) c) Make a new copy (version of this JavaFX program and use a Lambda Expression to implement handle method of the EventHandler interface. (3 marks) Rotate a Rectangle X Rotate a Rectangle Х Rotate a Rectangle