Computers and Technology

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! ");
}
}

answer
Answers: 3

Similar questions

Предмет
English, 04.07.2019 02:30, oKINGDEROo
1-) when writers edit sentences for errors in punctuation, they a- revise errors in parallelism. b- correct errors with semicolons. c- fix capitalization errors. d- correct mistakes in spelling. 2-) one of the best ways to edit sentences for errors in punctuation is to a- list the rules for using commas and periods. b- replace someone else's ideas with original ideas c- check for errors with possessive pronouns and contractions. d- consider who will read or listen to the essay. 3-) one of the best ways to edit sentences for errors in grammar is to a- consider who will read or listen to the essay. b- make sure that all commas, periods, and semicolons are correct. c- replace someone else's ideas with original ideas. d- first review common grammar and usage errors. 4-) identify what writers might look for when editing an essay for errors in grammar and usage. a- problems with pronoun use b- mistakes with capitalization c- ways to replace overused words d- insufficient details and description 5-) identify the editing strategy. a- listing places to research information b- putting the information researched into original words c- correcting errors in words with apostrophes d- finding research from reliable sources 6-) identify what would happen if a writer skipped the editing phase. a- the essay would likely have some mistakes. b- the essay would be too short to support the thesis. c- the writer would not write any ideas down on paper. d- the writer won't gather and record information.
Answers: 1
Do you know the correct answer?
Identify grammar/logic errors in the following codes and correct them.
the following is someon...

Questions in other subjects:

Konu
English, 24.02.2020 05:18
Konu
Mathematics, 24.02.2020 05:18
Konu
History, 24.02.2020 05:18