train - System.out.println("cccc");

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package train; import javax.swing.*; // For JFrame import java.awt.*; // For Color and Container import java.util.Scanner; import java.io.*; /** * * @author */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { String thedata; char e1, s1, e2, s2, e3, s3; String mystring, EString, Car1, Train; mystring = "Enter Edge and Stripe characters"; thedata = JOptionPane.showInputDialog(mystring, "ESESES"); e1 = thedata.charAt(0); s1 = thedata.charAt(1); e2 = thedata.charAt(2); s2 = thedata.charAt(3); e3 = thedata.charAt(4); s3 = thedata.charAt(5); engine(); cars(e1, s1); cars(e2, s2); cars(e3, s3); caboose(); } public static void caboose(){; System.out.println(); System.out.println("cccc"); System.out.println("cccc(o)"); System.out.println("cccc");
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: System.out.println("cccc"); System.out.println("cccc(o)"); System.out.println("cccc"); } public static void engine(){ System.out.println(); System.out.println("eeee"); System.out.println("eeee(o)"); System.out.println("eeee"); System.out.println("eeee"); System.out.println("eeee(o)"); System.out.println("eeee"); System.out.println(" |"); } public static void cars(char edge, char stripe){ System.out.println(edge + "" + edge + "" + edge + "" + edge); System.out.println(edge + " " + stripe + " " + edge + System.out.println(edge + " " + stripe + " " + edge); System.out.println(edge + " " + stripe + " " + edge); System.out.println(edge + " " + stripe + " " + edge + System.out.println(edge + "" + edge + "" + edge + "" + edge); System.out.println(" |"); edge + "" + edge + "" + "(o)"); "(o)"); edge + "" + edge + "" + } }...
View Full Document

This homework help was uploaded on 04/07/2008 for the course CSCI 161 taught by Professor Webster during the Spring '08 term at Millersville.

Page1 / 3

train - System.out.println("cccc");

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online