資源簡介
(pv,作業管理,等5個的Java實現)
代碼片段和文件信息
/**
?*?@(#)ByteDisplay.java
?*
?*
?*?@author?
?*?@version?1.00?2008/11/26
?*/
import?java.awt.*;
import?javax.swing.*;
import?java.io.*;
public?class?ByteDisplay?{
????public?static?void?main(String?args[])throws?IOException
????{
????
???? int?rowclumn;
???? int?ByteDisplay[][]=new?int[6][16];
???? BufferedReader?buf;
???? for(int?i=0;i<6;i++)
???? {
???? for(int?j=0;j<16;j++)
???? {
???? int?temp=(int)(1+Math.random()*2)-1;
???? ByteDisplay[i][j]=temp;
???? System.out.print(ByteDisplay[i][j]);
???? }
???? System.out.println();
???? }
???? System.out.println(“1?cancel?2?need?zone?3?recyle?zone“);
???? buf=new?BufferedReader(new?InputStreamReader(System.in));
???? String?str=buf.readLine();
???? int?choice=Integer.parseInt(str);
????
???? while(choice>0&&choice<4)
???? {
???? if(choice==1)
???? {
???? System.exit(0);
???? }
???? if(choice==2)
???? {
???? System.out.println(“input?the?file?address(the?number?above?200)“);
???? String?add=buf.readLine();?
???? int?address=Integer.parseInt(add);
???? row=(address-200)/16;
???? clumn=(address-200)%16;
???? if(ByteDisplay[row][clumn]==1)
???? {
???? System.out.println(“the?file?in?“+add+“?has?exsits?no?zone?for?this?“);
???? }
???? ByteDisplay[row][clumn]=1;
???? for(int?i=0;i<6;i++)
???? {
???? for(int?j=0;j<16;j++)
???? ????????????{
???? ????????System.out.print(ByteDisplay[i][j]);
???? ????????}
???? ????????System.out.println();?
???? }
???? }
???? if(choice==3)
???? {
???? ????System.out.println(“input?the?file?address“);
???? String?add=buf.readLine();?
???? int?address=Integer.parseInt(add);
???? row=(address-200)/16;
???? clumn=(address-200)%16;
???? if(ByteDisplay[row][clumn]==0)
???? {
???? System.out.println(“no?file?in?“+add+“?to?obtian?the?zone?is?null“);
???? }
???? ByteDisplay[row][clumn]=0;
???? for(int?i=0;i<6;i++)
???? {
???? for(int?j=0;j<16;j++)
???? ????????????{
???? ????????System.out.print(ByteDisplay[i][j]);
???? ????????}
???? ????????System.out.println();?
???? }
???? }
???? System.out.println(“1?cancel?2?need?zone?3?recyle?zone“);
????????str=buf.readLine();
???? choice=Integer.parseInt(str);?
???? }?
????}?
????
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2311??2008-11-26?18:50??操作系統程序\ByteDisplay.java
?????文件???????2491??2008-11-26?18:15??操作系統程序\PV.java
?????文件???????9960??2008-11-21?22:36??操作系統程序\Region.java
?????文件???????2751??2008-11-27?12:55??操作系統程序\Through.java
?????文件???????3427??2008-11-08?23:09??操作系統程序\作業調度.dsp
?????目錄??????????0??2009-12-20?18:22??操作系統程序
-----------?---------??----------?-----??----
????????????????20940????????????????????6
- 上一篇:基于C/S架構考試系統(Java)
- 下一篇:android 視頻播放器 項目和原碼
評論
共有 條評論