Question: how do i write a main method to call the 5 algorithims to run and test the code. } } 1 package lab: 2 import
} } 1 package lab: 2 import java.util.Scanner; 3 public class Toms Trucking { private static int numTrucks; private static int[] maxCapofEachTruck; private static double [] loadofEachTruck; public static void setNunOfTrucksForTheDay() { 18 Scanner scan = new Scanner(System.in); 11 boolean done = false; 12 while(done==false) { 13 system.out.println("Please enter the number of trucks you have today"); 14 Int num = scan.nextInt(); 15 11 (num >= 2) { 16 numTrucks = num; 17 loadofEachTruck = new double InunTrucks); 18 done = true; 19 Helse { 20 System.out.println("The number must be two or greater than two. Please try again."); 21 } 22 23 240 public static void setTheMaxCapacityofEachTruck() { 25 maxCapofEachTruck = new int Inum Trucks); 26 Scanner scan - new Scanner(System.in); 27 for(int index = 0; index
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
