日期:2014-05-20  浏览次数:20801 次

大家给我留几java的作业吧,要入门阶段的。类似从一加到100的。
大家给我留几java的作业吧,要入门阶段的。类似从一加到100的。嘿嘿、刚开始学。挺有激情的自学呢。如果也有学的跟我一起来啊。咱们一起探讨呵呵、对了我用的是马士兵老师的视频教程刚看完第二章。第三章又看不明白了。好像听天书呢。面向对象。是不是必须得理解啊。如果不理解我是继续专研呀。还是往下学。时机到了就明白了。呵呵。大家帮帮哈。等我学好了请各位吃饭。

------解决方案--------------------
又是你啊?
------解决方案--------------------
给你出两个练习流程控制的题目,现想的:
1.输入一个三位以下的阿拉伯数字,输出它对应的中文写法,比如输入53,输出是五十三,输入205,输出是二百零五。
2.给出一年中的第一天是星期几,根据要求输出这年中的某一天是星期几(可以不考虑闰年)。比如:1月1日是星期二,要求计算3月5日,输出应该是星期三。不许使用日历类。
------解决方案--------------------
这种题目貌似网上很多电子书后面的习题都有哦,呵呵

楼主加油加油啊
------解决方案--------------------
我也是跟着马老师的视频学,看到第五章了,很受用,LZ有兴趣可以交流下
------解决方案--------------------
计算器 这个是入门的好东东,你就做它吧!顺便给点代码给你,自己改吧!
import java.awt.*; 
import java.awt.event.*; 
class Windowjsq extends Frame 
implements ActionListener 

TextArea text; 
Button num0,num1,num2,num3,num4,num5,num6,num7,num8,num9,jia,jian,cheng,chu,dengyu,clear,out; 
float result=0,m=0,n=0,i=0,j=0; 

/*以上的变量 result是保存运算结果;m是用来接收文本输入区的数值;n则是用来判断在键入数字 

时是否要将文本区原来的数值替换;而 i 主要是作为运算符“+ - * /”的标识符,标记按的是哪个 

运算符;至于j,也是作为标识符,它就是用来防止多次按运算符 
“+ - * /”时出错*/ 
Windowjsq(String s) 

super(s); 
setLayout(new FlowLayout()); 
text=new TextArea("0",1,20,TextArea.SCROLLBARS_NONE); 
text.setEditable(false); 
num7=new Button(" 7 ");num8=new Button(" 8 ");num9=new Button(" 9 ");clear=new Button(" C "); 
num4=new Button(" 4 ");num5=new Button(" 5 ");num6=new Button(" 6 ");jia=new Button(" + "); 
num1=new Button(" 1 ");num2=new Button(" 2 ");num3=new Button(" 3 ");jian=new Button(" - "); 
num0=new Button(" 0 ");cheng=new Button(" * ");chu=new Button(" / ");dengyu=new Button(" = "); 
out=new Button("退出"); 
add(text); 
add(num7);add(num8);add(num9);add(clear); 
add(num4);add(num5);add(num6);add(jia); 
add(num1);add(num2);add(num3);add(jian); 
add(num0);add(cheng);add(chu);add(dengyu); 
add(out); 
num7.addActionListener(this);num8.addActionListener(this);num9.addActionListener(this);clear.addActionListener(this); 
num4.addActionListener(this);num5.addActionListener(this);num6.addActionListener(this);jia.addActionListener(this); 
num1.addActionListener(this);num2.addActionListener(this);num3.addActionListener(this);jian.addActionListener(this); 
num0.addActionListener(this);cheng.addActionListener(this);chu.addActionListener(this);dengyu.addActionListener(this); 
out.addActionListener(this); 
setBounds(100,100,180,240); 
setVisible(true); 
validate(); 

public void actionPerformed(ActionEvent e) 

if(e.getSource()==num7) 

if(n==0){ text.setText("7");n=1;j=0;} 
else if(n==1){ text.append("7");} 

if(e.getSource()==num8) 

if(n==0){ text.setText("8");n=1;j=0;} 
else if(n==1){ text.append("8");} 

if(e.getSource()==num9)