// Arup Guha
// 4/28/2018
// 2016 AP Computer Science FR Question 2C Framework

import java.util.*;

public class SystemLog {

	private List<LogBook> messageList;

	// For testing.
	public SystemLog(String[] messages) {
		messageList = new ArrayList<LogBook>();
		for (String s: messages)
			messageList.add(new LogBook(s));
	}

	// For easy testing.
	public String toString() {
		String res = "";
		for (LogBook book: messageList)
			res = res + book + "\n";
		return res;
	}

	/*** Fill in solution to Part C here. ***/
	public List<LogBook> removeMessages(String keyword) {

	}

	public static void main(String[] args) {

		String[] stuff = {"SERVER1:file write","SERVER2:disk read","SERVER2:store data now","SERVER3:which disk data"};
		SystemLog data = new SystemLog(stuff);

		// Delete and look at.
		System.out.println("Deleted ");
		List<LogBook> delData = data.removeMessages("data");
		for (LogBook book: delData)
			System.out.println(book);
		System.out.println("---------------------");

		// Still have
		System.out.println("Still have");
		System.out.println(data);
	}
}