Identify grammar/logic errors in the following codes and correct them.
the following is someon...
Computers and Technology, 09.07.2019 23:20, fymdes2001
Identify grammar/logic errors in the following codes and correct them.
the following is someone’s definition (with quite some errors) for the checking class.
public class checking {
//only one attribute (for simplicity, nothing wrong here)
private double balance;
public void checking(double inibalance){
setbalance(inibalance);
}
// define getter and setter
public string getbalance(){
return balance;
}
public void setbalance(double newbalance){
double balance = 0;
if(newbalance> 0){ //validity check
balance = newbalance;
}
else{
system. out. println("your input is invalid! ");
}
}
Answers: 3
English, 04.07.2019 02:30, oKINGDEROo
Answers: 1
English, 24.07.2019 03:00, maukjackie1974
Answers: 1
Mathematics, 24.02.2020 05:18
English, 24.02.2020 05:18
Mathematics, 24.02.2020 05:18
Computers and Technology, 24.02.2020 05:18
History, 24.02.2020 05:18