subject
Computers and Technology, 16.10.2020 06:01 1129682

1 // Application contains a starting list of three products for sale2 // The user is prompted for additional items3 // After each new entry, the alphabetically sorted list is displayed4 import java. util.*;5 public class DebugNine36 {7 public static void main(String[] args)8 {9 ArrayListproducts = new ArrayList();10 products. add(shampoo);11 products. add(moisturizer);12 products. add(conditioner);13 Collections. sort(products);14 display(products);15 final String QUIT = "quit";16 String entry;17 Scanner input = new Scanner(System. in);18 System. out. print("\nEnter a product or " + QUIT + " to quit >> ");19 entry = input. nextLine();20 while(entry. equals("quit"))21 {22 products. add(entry);23 Collections. sort(products);24 display()25 System. out. print("\nEnter a product or " + QUIT + " to quit >> ");26 entry = input. nextLine();27 }28 public static void display(ArrayList products)29 {30 System. out. println("\nThe size of the list is " + products. size());31 for(int x = 0; x == products. size(); ++x)32 System. out. println(products. get(x));33 }34 }35//Debugging Exercises, Chapter 9;Java Programming, Joyce Farraell, 8th

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:30
Why would a programmer use the logical operator and in an if statement? a: when an action is to be taken that requires both conditions to be falseb: when an action is to be taken that requires both conditions to be truec: when an action is to be taken that requires the first condition to be falsed: when an action is to be taken that requires the second condition to be truei took the test and the answer is b.
Answers: 3
question
Computers and Technology, 23.06.2019 21:20
In microsoft word, when you highlight existing text you want to replace, you're in              a.  advanced mode.    b.  automatic mode.    c.  basic mode.    d.  typeover mode
Answers: 1
question
Computers and Technology, 24.06.2019 13:00
George heard about the benefits of a data warehouse. he wants to try implementing one for his organization. however, he is afraid that transferring data to the data warehouse will affect transaction time. which element ensures that transactions are not affected when moving data to a warehouse? when data is transferred to a data warehouse, the a area frees the source system to continue transaction processing.
Answers: 2
question
Computers and Technology, 25.06.2019 01:00
Holly created a professional development plan to explore how she could advance from her entry-level position to the next step in her career. she has identified her current skills and the skills needed for the job she wants. what should she do now? a) ask a colleague for advice about work-life balance b) identify her areas for improvement c) plan a vacation before she begins her new job d) wait until a position opens before continuing her plan
Answers: 1
You know the right answer?
1 // Application contains a starting list of three products for sale2 // The user is prompted for ad...
Questions
question
Mathematics, 10.10.2021 08:30
question
Mathematics, 10.10.2021 08:30
question
Mathematics, 10.10.2021 08:30