资源简介
[龙芯.MIPS.汇编.自学.教程]
很不错的 从最基本的计算机知识讲起
循序渐进
代码片段和文件信息
import java.applet.*;
import java.awt.*;
public class binaryAdd extends applet
{
private Label ltitle = new Label(“Binary Addition Algorithm“);
private Label lCarry = new Label(“Carry:“ Label.RIGHT);
private Label lAddX = new Label(“ X:“ Label.RIGHT);
private Label lAddY = new Label(“ Y:“ Label.RIGHT);
private Label lSum = new Label(“ Sum:“ Label.RIGHT);
private noClickButton[] bCarry = new noClickButton[9];
private noClickButton bDummyX = new noClickButton(“ “);
private Button[] bAddX = new Button[8];
private noClickButton bDummyY = new noClickButton(“ “);
private Button[] bAddY = new Button[8];
private noClickButton[] bSum = new noClickButton[9];
private Button bDoIt = new Button(“ADD“);
private Button bStep = new Button(“Single Step“);
private Panel pAll = new Panel();
private Panel ptitle = new Panel();
private Panel pCarry = new Panel();
private Panel pAddX = new Panel();
private Panel pAddY = new Panel();
private Panel pSum = new Panel();
private Panel pDoIt = new Panel();
private int place = 0;
public binaryAdd()
{
}
public String getappletInfo()
{
return “Name: binaryAdd\r\n“ +
“Author: Bradley Kjell\r\n“ +
“Created with Microsoft Visual J++ Version 1.0“;
}
public void init()
{
resize(320 220);
setFont( new Font(“Courier“ Font.PLAIN 12 ) );
pAll.setLayout( new GridLayout(61) );
ptitle.add( ltitle );
pCarry.add( lCarry );
for ( int i = 8; i>=0; i-- )
{
bCarry[i] = new noClickButton(“ “);
pCarry.add( bCarry[i] );
}
pAddX.add( lAddX );
pAddX.add( bDummyX );
for ( int i = 7; i>=0; i-- )
{
bAddX[i] = new Button(“0“);
pAddX.add( bAddX[i] );
}
pAddY.add( lAddY );
pAddY.add( bDummyY);
for ( int i = 7; i>=0; i-- )
{
bAddY[i] = new Button(“0“);
pAddY.add( bAddY[i] );
}
pSum.add( lSum );
for ( int i = 8; i>=0; i-- )
{
bSum[i] = new noClickButton(“ “);
pSum.add( bSum[i] );
}
pDoIt.add( bDoIt );
pDoIt.add( bStep );
pAll.add( ptitle );
pAll.add( pCarry );
pAll.add( pAddX );
pAll.add( pAddY );
pAll.add( pSum );
pAll.add( pDoIt );
add( pAll );
}
public void destroy()
{
}
public void paint(Graphics g)
{
Dimension d = size();
g.drawLine( 0 0 d.width-1 0);
g.drawLine( d.width-1 0 d.width-1 d.height-1);
g.drawLine( d.width-1 d.height-1 0 d.height-1);
g.drawLine( 0 d.height-1 0 0);
g.drawLine( 2 2 d.width-3 2);
g.drawLine( d.width-3 2 d.width-3 d.height-3);
g.drawLine( d.width-3 d.height-3 2 d.height-3);
g.drawLine( 2 d.height-3 2 2);
}
public void start()
{
}
public void stop()
{
}
private void clearResult
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1403 2003-07-04 16:51 CAIst
目录 0 2003-08-07 22:08 Chapter-01\
文件 12786 2003-03-21 21:07 Chapter-01\ass01quiz.html
文件 3069 2003-08-07 19:25 Chapter-01\ass01_1.html
文件 3524 2003-08-07 19:25 Chapter-01\ass01_10.html
文件 2223 2003-08-07 19:25 Chapter-01\ass01_11.html
文件 2900 2003-08-07 19:25 Chapter-01\ass01_12.html
文件 2746 2003-08-07 19:25 Chapter-01\ass01_13.html
文件 2584 2003-08-07 19:25 Chapter-01\ass01_14.html
文件 2267 2003-08-07 19:25 Chapter-01\ass01_15.html
文件 2454 2003-08-07 19:25 Chapter-01\ass01_2.html
文件 2316 2003-08-07 19:25 Chapter-01\ass01_3.html
文件 2834 2003-08-07 19:25 Chapter-01\ass01_4.html
文件 2333 2003-08-07 19:25 Chapter-01\ass01_5.html
文件 2648 2003-08-07 19:25 Chapter-01\ass01_6.html
文件 2754 2003-08-07 19:25 Chapter-01\ass01_7.html
文件 2096 2003-08-07 19:25 Chapter-01\ass01_8.html
文件 2489 2003-08-07 19:25 Chapter-01\ass01_9.html
文件 19480 2001-05-18 11:14 Chapter-01\IMSAI.jpg
文件 9381 2001-04-19 15:15 Chapter-01\jag.jpg
文件 4936 2001-08-04 08:08 Chapter-01\levels.gif
文件 10035 2003-03-19 22:46 Chapter-01\levels.jpg
文件 5145 2003-03-19 22:41 Chapter-01\machinecycle.gif
文件 4687 2001-03-18 07:02 Chapter-01\ob
文件 210 2003-01-19 12:39 Chapter-01\shamrock.gif
文件 2956 2001-03-18 06:46 Chapter-01\sourceTOob
目录 0 2003-08-07 22:08 Chapter-02\
文件 13338 2003-05-26 16:28 Chapter-02\ass02quiz.html
文件 1926 2003-08-07 19:25 Chapter-02\ass02_1.html
文件 2590 2003-08-07 19:25 Chapter-02\ass02_10.html
文件 2134 2003-08-07 19:25 Chapter-02\ass02_11.html
............此处省略959个文件信息
评论
共有 条评论