Guest User

Untitled

a guest
Jan 4th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. public void printLowStockMake() {
  2.  
  3. ArrayList<Make> makeList = new ArrayList<Make>();
  4. makeList.add(new Make());
  5. System.out.println("\nThe Make currently with the fewest cars:");
  6.  
  7. // --------------------------------
  8. // Add up the counts of ALL makes
  9. // and store them in a new array.
  10. // --------------------------------
  11.  
  12. for(Car i : carList){
  13. System.out.println("\nEntering loop.");
  14. System.out.println("Current carList make is: " + i.getMake());
  15.  
  16. for(Make j : makeList){
  17. System.out.println("Current makeList make is: " + j.getMake());
  18.  
  19. if(i.getMake() == j.getMake()){
  20. j.addNumberOfMake();
  21. System.out.println("Incremented make.");
  22.  
  23. }else{
  24. j.createIfNotExist(i.getMake());
  25.  
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment