Question: 1.SOLVE USING JAVA FX ONLY PLEASE.(Added screenshots and also added the questions in the text please check and solve, thank you) ElectroCalc (Figure 2.0) is
1.SOLVE USING JAVA FX ONLY PLEASE.(Added screenshots and also added the questions in the text please check and solve, thank you)
ElectroCalc (Figure 2.0) is an application to support the calculation of home electricity bills. It consists of a main application interface as shown in Figure 2.0 and a dialog (not shown). The dialog has textfields for entry of the cost per unit of electricity, the standing charge and the Value Added Tax (VAT) rate. For the purposes of this application, no other charges are applied. The previous and current electricity meter readings are entered into the textfields at the top of the main interface. Sample entries are shown for illustration purposes. When the Calculate button is clicked, the cost of the electricity usage is calculated, the standing charge is added and tax is calculated and added. Note that you are not required to apply currency formatting to the calculated amounts.
(a) Create a main application interface similar to that shown in Figure 2.0. (10 marks)
(b) The unit rate, standing charge and VAT rate are stored in a file as key/value pairs (Figure 3.1). Create a file called settings.dat. On application startup, the unit charge, standing charge and VAT rate should be read from the file. Table 1 shows the costs to be applied in calculating the electricity bill.

(c) Create a dialog to allow the unit rate, standing charge and VAT rate to be changed. The dialog should show when the Settings button on the main user interface is clicked. The dialog should be populated with the current charges for these items. Add a text file to the project directory called design.txt to explain how you designed the dialog user interface. Include as much detail as possible with particular emphasis on how you used layout containers to manage component layout. Include your name and student number at the top of the file. (10 marks)
(d) On dialog confirmation, the new charges should be applied. Perform basic validation of the user input by ensuring that there are no empty textfields before committing the dialog. Clear the labels on the main user interface that are affected by this change. On performing a new calculation, the new charges should be used in calculating a bill.
QUESTION 2 ElectroCalc A ElectroCalc V 1.0.0 Previous reading: 42647 Current reading: 43152 Cost before VAT: 118,67 VAT: 16,02 Total: 134,69 Settings Close Calculate Figure 2.0: ElectroCale application interface ElectroCalc (Figure 2.0) is an application to support the calculation of home electricity bills. It consists of a main application interface as shown in Figure 2.0 and a dialog (not shown). The dialog has textfields for entry of the cost per unit of electricity, the standing charge and the Value Added Tax (VAT) rate. For the purposes of this application, no other charges are applied. The previous and current electricity meter readings are entered into the textfields at the top of the main interface. Sample entries are shown for illustration purposes. When the 'Calculate' button is clicked, the cost of the electricity usage is calculated, the standing charge is added and tax is calculated and added. Note that you are not required to apply currency formatting to the calculated amounts. Sample entries are shown for illustration purposes. When the Calculate' button is clicked, the cost of the electricity usage is calculated, the standing charge is added and tax is calculated and added. Note that you are not required to apply currency formatting to the calculated amounts. (a) Create a main application interface similar to that shown in Figure 2.0. (10 marks) (b) The unit rate, standing charge and VAT rate are stored in a file as key/value pairs (Figure 3.1). Create a file called 'settings.dat'. On application startup, the unit charge, standing charge and VAT rate should be read from the file. Table 1 shows the costs to be applied in calculating the electricity bill. File C Documents settings.dat - Kate Edit View Projects Bookmarks Sessions Tools Settings settings.dat unitRate-18.14 stdCharge=27.06 vatRate-13.5 Figure 2.1:The standing charge and VAT rate are stored as key/value pairs Charges Amount/rate Cost per unit of electricity 18.14 cent Standing charge 27.06 Euro Value Added Tax rate 13.5% Table 1. Costs to be applied in the ElectroCalc application
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
