Computers and Technology, 07.10.2019 22:30 slowmotion
The following code is poorly structured. rewrite it so that it has a better structure and avoids redundancy. to eliminate redundancy, convert the code into a method named spending that accepts two parameters: a scanner for the console, and a string for a single person's name, and prints the appropriate information about that person's bills. your method could be called twice (once for john and once for jane) to replicate the original code's behavior.
scanner console = new scanner(system. in);
system. out. print("how much will john be spending? ");
double amount = console. nextdouble();
system. out. println();
int numbills1 = (int) (amount / 20.0);
if (numbills1 * 20.0 < amount) {
numbills1++;
}
system. out. print("how much will jane be spending? ");
amount = console. nextdouble();
system. out. println();
int numbills2 = (int) (amount / 20.0);
if (numbills2 * 20.0 < amount) {
numbills2++;
}
system. out. println("john needs " + numbills1 + " bills");
system. out. println("jane needs " + numbills2 + " bills");
Answers: 1
Computers and Technology, 22.06.2019 09:00
Meenu wants to create a high quality drawing in a variety of colours. which device should she use for the same?
Answers: 1
Computers and Technology, 22.06.2019 21:30
Im doing this last minute and literally none of my neighbors or people that my dad works with use excel so if anyone could me make up an example
Answers: 1
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
Computers and Technology, 23.06.2019 06:30
On early television stations, what typically filled the screen from around 11pm until 6am? test dummies test patterns tests testing colors
Answers: 1
The following code is poorly structured. rewrite it so that it has a better structure and avoids red...
Mathematics, 01.10.2019 05:30
Biology, 01.10.2019 05:30
Biology, 01.10.2019 05:30
English, 01.10.2019 05:30
Social Studies, 01.10.2019 05:30
Mathematics, 01.10.2019 05:30
History, 01.10.2019 05:30
Mathematics, 01.10.2019 05:30
Mathematics, 01.10.2019 05:30
Social Studies, 01.10.2019 05:30
Mathematics, 01.10.2019 05:30
Arts, 01.10.2019 05:30