Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void printLowStockMake() {
- ArrayList<Make> makeList = new ArrayList<Make>();
- makeList.add(new Make());
- System.out.println("\nThe Make currently with the fewest cars:");
- // --------------------------------
- // Add up the counts of ALL makes
- // and store them in a new array.
- // --------------------------------
- for(Car i : carList){
- System.out.println("\nEntering loop.");
- System.out.println("Current carList make is: " + i.getMake());
- for(Make j : makeList){
- System.out.println("Current makeList make is: " + j.getMake());
- if(i.getMake() == j.getMake()){
- j.addNumberOfMake();
- System.out.println("Incremented make.");
- }else{
- j.createIfNotExist(i.getMake());
- }
- }
- }
Add Comment
Please, Sign In to add comment