// Arup Guha
// 4/30/2018
// 2016 AP Computer Science FR Question 4: String Formatter Framework

import java.util.*;

public class StringFormatter {

	public static String[] ex1 = {"AP", "COMP", "SCI", "ROCKS"};
	public static String[] ex2 = {"GREEN", "EGGS", "AND", "HAM"};
	public static String[] ex3 = {"BEACH", "BALL"};

	public static void main(String[] args) {

		// Example 1
		ArrayList<String> tmp = new ArrayList<String>();
		for (String s: ex1) tmp.add(s);
		System.out.println(format(tmp, 20));

		// Example 2
		tmp.clear();
		for (String s: ex2) tmp.add(s);
		System.out.println(format(tmp, 20));

		// Example 3
		tmp.clear();
		for (String s: ex3) tmp.add(s);
		System.out.println(format(tmp, 20));
	}

	/*** Put your solution to Part A here. ***/
	public static int totalLetters(List<String> wordList) {

	}

	/*** Put your solution to Part B here. ***/
	public static int basicGapWidth(List<String> wordList, int formattedLen) {
		
	}

	// Returns the left over # of spaces after using the basic gap width.
	public static int leftoverSpaces(List<String> wordList, int formattedLen) {
		return (formattedLen-totalLetters(wordList))%(wordList.size()-1);
	}

	/*** Put your solution to Part C here. ***/
	public static String format(List<String> wordList, int formattedLen) {

	}
}
