Question
Java Programming Joyce Farrell, 8th editon exercise 10 pg 486, I need help creating a Gui for the program it works but error keeps getting
Java Programming Joyce Farrell, 8th editon exercise 10 pg 486, I need help creating a Gui for the program it works but error keeps getting thrown, Here is my code, and Output, I need to stop the execption error from appearing:
static int bonus[][] = {{5, 9, 16, 22, 44}, {10, 12, 18, 25, 36}, {20, 25, 32, 42, 53}, {32, 38, 45, 55, 68}, {46, 54, 65, 77, 90}, {60, 72, 84, 96, 120}, {85, 100, 120, 140, 175}}; static int weeks = 6; static int reviews = 4;
private void calcButtonActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: weeks = Integer.parseInt(weeksWorked.getText()); if (weeks > 6) { weeks = 6; } else if(weeks 4) { reviews = 4; } this.outputBox.setText("$" + bonus[weeks][reviews]); }
E8.2 urce Refactor Run Debug Profile Team Iools Window Help Weeks Worked1 Postive Reviews Invalid NumberStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started