changed menu layout

This commit is contained in:
Konrad Jasiński 2021-10-11 19:54:58 +02:00
parent 01b89d7e77
commit cb38d7392b
11 changed files with 4 additions and 5 deletions

View File

@ -2,13 +2,12 @@ package main.java.products;
import java.util.ArrayList;
public abstract class AbstractMenu <T extends Product> extends ArrayList<T> {
public abstract class AbstractMenu<T extends Product> extends ArrayList<T> {
public void showMenu(){
public void showMenu() {
showMenuName();
for(int i=0;i<size();i++){
System.out.println();
System.out.println(i + 1 + ". "+get(i).getPrice()+ " "+get(i));
for (int i = 0; i < size(); i++) {
System.out.println(i + 1 + ". " + get(i) + " " + get(i).getPrice());
}
}