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 21:30, mjweed2456
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
Computers and Technology, 23.06.2019 09:00, opgbadwolf5
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
Fix the code in oops2.java so that it is better structured and avoids redundancy. there are some lin...
English, 22.05.2020 01:07
Mathematics, 22.05.2020 01:07
History, 22.05.2020 01:07
Mathematics, 22.05.2020 01:07
History, 22.05.2020 01:07