자동 세척기( Automatic Washing Machine) 경북대학교
본 자료는 8페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
해당 자료는 8페이지 까지만 미리보기를 제공합니다.
8페이지 이후부터 다운로드 후 확인할 수 있습니다.

소개글

자동 세척기( Automatic Washing Machine) 경북대학교에 대한 보고서 자료입니다.

목차

▲ Term Project의 기본적인 개요

▲ 제작 환경

▲ Term Project의 레고 조립 부분의 세부적인 부분

▲ 기본적인 Program Code 분석

▲ 결 론

본문내용

간 입력 : \");
soap = JOptionPane.showInputDialog(null, \"비눗물을 뿌리는 시간 입력 : \");
JOptionPane.showMessageDialog(null, \"종료하기 위해선 Ctrl+c를 입력 !!!!!!\");
// 입력 받은 스트림을 차례대로 소켓을 통해서 보낸다.
os.println(\"1\");
os.flush();
os.println(time1);
os.flush();
os.println(water1);
os.flush();
os.println(soap);
os.flush();
*/
// 해당 과정에 따라서 색을 변경시킬려고 했지만 이 기능은 생략함
try{
thread1.sleep(5);
button_start.setForeground(Color.black);
button_water.setForeground(Color.red);
thread1.sleep(3);
button_water.setForeground(Color.black);
button_wash.setForeground(Color.red);
thread1.sleep(5);
button_wash.setForeground(Color.black);
button_rail.setForeground(Color.red);
thread1.sleep(5);
button_rail.setForeground(Color.black);
}catch(InterruptedException iex){}*/
}
}
);
stop = new JButton(\"Push to stop\");
stop.addActionListener( // STOP 버튼이 눌리어졌을 경우에 이벤트 핸들링
new ActionListener(){
public void actionPerformed(ActionEvent event)
{
//JOptionPane.showMessageDialog(null, \" 전체 시스템을 종료 합니다.\");
os.println(\"2\");
os.flush();
disconnect();
stop();
//os.println(\"2\");
//os.flush();
}
}
);
boxes[7].add(start);
boxes[7].add(Box.createHorizontalStrut(20));
boxes[7].add(stop);
addComponent(boxes[7],23,0,8, 4);
}
// GridBag layout을 이용하기 위한 함수(각 component의 위치를 확인)
void addComponent(Component component, int row, int column, int width, int height)
{
constraints.gridx = column;
constraints.gridy = row;
constraints.gridwidth = width;
constraints.gridheight = height;
layout.setConstraints(component, constraints);
container.add(component);
}
public void runClient()
{
try
{
connectToServer();
getStream();
processConnection();
closeConnection();
}
catch(EOFException eofException)
{}
catch(IOException ioException)
{}
}
public void getStream() throws IOException
{
output = new ObjectOutputStream(client.getOutputStream());
output.flush();
input = new ObjectInputStream(client.getInputStream());
//displayArea.append(\"\\n Got I/O streams\\n\");
}
public void connectToServer() throws IOException
{
displayArea.setText(\"Attempting connection \\n\");
client = new Socket(InetAddress.getByName(chatServer), 5678);
//displayArea.append
}
public void processConnection() throws IOException
{
do
{
try
{
message = (String) input.readObject();
}
catch(ClassNotFoundException classNotFoundException){}
}while(!message.equals(\"TERMINATE\"));
}
public void closeConnection() throws IOException
{
displayArea.setText(\"Closing connection\");
output.close();
input.close();
client.close();
}
protected void connect()
{
try{
socket1=new Socket(\"155.230.17.135\",5678); // 소켓을 초기화 시켜 준다.
//bis = new BufferedInputStream(socket1.getInputStream());
//bos = new BufferedOutputStream(socket1.getOutputStream());
is=new BufferedReader(new InputStreamReader(socket1.getInputStream()));
os=new PrintWriter(new OutputStreamWriter
(socket1.getOutputStream()),true);
os.println(\"0\");
//bos.write(, 0, 3);
displayArea.setText(\"Connectioin Ok\");
//BufferedOutputStream
} catch(IOException ex) {
displayArea.setText(\"Socket Open Error\");
}
}
public void disconnect() // 소켓의 연결을 끊을
  • 가격3,000
  • 페이지수23페이지
  • 등록일2011.05.13
  • 저작시기2011.4
  • 파일형식한글(hwp)
  • 자료번호#948829
본 자료는 최근 2주간 다운받은 회원이 없습니다.
다운로드 장바구니