public class Lab5 { // rather than worry about I/O problems, we'll just put the data here static String[] name = {"Fred", "Jane", "Frank", "Jill", "Fran", "Jack"}; static int[] height = {66, 64, 73, 68, 63, 69}; static int[] weight = {160, 120, 200, 180, 125, 173}; static int next = 0; // incremented by source to help detect the end of data static int exported = 0; // incremented by sink to stop the action after all data is processed // ________ ________ ______ // | | ____ | | ____ | | // ---> |source| --->|b1|---> |middle| --->|b2|---> |sink| ---> // | | ---- | | ---- | | // ------- -------- ------ // static void source (Buffer b1) { //write your code for the source routine here } static void middleman (Buffer b1, Buffer b2) { //write your code for the middleman here } static void sink (Buffer buffer1) { //write your code for the sink here } public static void main(String[] args) { Buffer buffer1 = new Buffer(); Buffer buffer2 = new Buffer(); while (exported < name.length) { sink(buffer2); middleman(buffer1, buffer2); source(buffer1); } } }