Computers and Technology, 15.10.2019 17:30, beastboy13
Fix the code in oops2.java so that it is better structured and avoids redundancy. there are some lines of code that are repeated. think about where you can move the repeated lines in the code so that they only appear once. you do not need to add any error checking on the user input, assume that the user will always enter 1 or 2. here is the code: import java. util. scanner; public class oops2 {public static void main(string[] args) { int sum = 0; int count = 0; int total = 0; scanner console = new scanner(system. in); system. out. print("is your money multiplied 1 or 2 times? "); int times = console. nextint(); if (times == 1){ system. out. print("and how much are you contributing? "); int donation = console. nextint(); sum = sum + donation; count++; total = total + sum; } if (times == 2){ system. out. println("and how much are you contributing? "); int donation = console. nextint(); sum = sum + 2 * donation; count++; total = total + sum; } system. out. println("the total is " + total); }}
Answers: 2
Computers and Technology, 22.06.2019 15:10, reycaden
David is in week 3 of his current ashford course and has a paper due by monday night at midnight. he has finished everything but the concluding paragraph. as he boots up his computer to work on it, he sees a flash across the screen and then the screen goes black. he begins to panic as he tries desperately to turn the laptop back on. david should have saved his work on what kind of portable device?
Answers: 2
Computers and Technology, 24.06.2019 19:20, boyancecristina
Which command suppresses the visibility of a particular row or column in a worksheet?
Answers: 1
Fix the code in oops2.java so that it is better structured and avoids redundancy. there are some lin...
Chemistry, 17.07.2019 08:10
Computers and Technology, 17.07.2019 08:10
Mathematics, 17.07.2019 08:10
Mathematics, 17.07.2019 08:10
Biology, 17.07.2019 08:10
Chemistry, 17.07.2019 08:10