(String[] args)
| 3 | public class Question { |
| 4 | |
| 5 | public static void main(String[] args) { |
| 6 | Directory root = new Directory("Food", null); |
| 7 | File taco = new File("Taco", root, 4); |
| 8 | File hamburger = new File("Hamburger", root, 9); |
| 9 | root.addEntry(taco); |
| 10 | root.addEntry(hamburger); |
| 11 | |
| 12 | Directory healthy = new Directory("Healthy", root); |
| 13 | |
| 14 | Directory fruits = new Directory("Fruits", healthy); |
| 15 | File apple = new File("Apple", fruits, 5); |
| 16 | File banana = new File("Banana", fruits, 6); |
| 17 | fruits.addEntry(apple); |
| 18 | fruits.addEntry(banana); |
| 19 | |
| 20 | healthy.addEntry(fruits); |
| 21 | |
| 22 | Directory veggies = new Directory("Veggies", healthy); |
| 23 | File carrot = new File("Carrot", veggies, 6); |
| 24 | File lettuce = new File("Lettuce", veggies, 7); |
| 25 | File peas = new File("Peas", veggies, 4); |
| 26 | veggies.addEntry(carrot); |
| 27 | veggies.addEntry(lettuce); |
| 28 | veggies.addEntry(peas); |
| 29 | |
| 30 | healthy.addEntry(veggies); |
| 31 | |
| 32 | root.addEntry(healthy); |
| 33 | |
| 34 | System.out.println(root.numberOfFiles()); |
| 35 | System.out.println(veggies.getFullPath()); |
| 36 | } |
| 37 | |
| 38 | } |
nothing calls this directly
no test coverage detected