Question: So I have my program in JGrasp Java format that is close to running but I got an error message saying: Can anyone help me

So I have my program in JGrasp Java format that is close to running but I got an error message saying:

 So I have my program in JGrasp Java format that is

Can anyone help me fix my 3 errors so the program can run fully? Thank you in advance.

My current code is posted below:

import java.io.*; import java.util.*; class main{ public static void compute_result(int[] acc_drunk,int[] acc_non_drunk){ float best_percentage = 100.0; int best_hour = -1.0; float worst_percentage = 0.0; int worst_hour = -1.0; for (int i = 0; i worst_percentage){ worst_percentage = per; worst_hour = i; } if (per

e.printStackTrace(); } } }

-jGRASP exec: javac -g main.java main.java:11: error: incompatible types: possible lossy conversion from double to float float best ercentage = 100.0; main.java:13: error: incompatible types: possible lossy conversion from double to float float worst-percentage = 0.0; main.java:17: error: incompatible types: possible lossy conversion from double to float + float (acc drunk[i]/(0. O drunk[] + drunk[i])) 100; * per = acc-non acc 3 errors jGRASP wedge: exit code for process is 1. jGRASP: operation complete

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!