freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java上機實驗報告(文件)

2025-10-18 05:29 上一頁面

下一頁面
 

【正文】 ee引用數(shù)組來實現(xiàn)。public Employee(String first,String last){firstName=first。} public String toString(){ return firstName+lastName。分別定義飛機類和鳥類,實現(xiàn)CanFly接口。(10)異常的捕獲:計算兩數(shù)相除并輸出結(jié)果。//建立輸入流緩沖區(qū) (”請輸入除數(shù):“)。cl=()。} //捕獲與I/O有關(guān)的異常(空白處補全捕獲語句)//捕獲數(shù)值轉(zhuǎn)化時的異常,如不能將字符轉(zhuǎn)化成數(shù)值//捕獲除數(shù)為0的異常} } 編譯并運行,當(dāng)產(chǎn)生輸入輸出異常時顯示異常信息;當(dāng)輸入除數(shù)為0時,出現(xiàn)算術(shù)異常,提示除數(shù)為0,并要求重新輸入;當(dāng)輸入的不是整數(shù)時,如將30輸成了3o,出現(xiàn)數(shù)值格式異常,提示輸入整數(shù)。)(1)package 。//導(dǎo)入包public class China { public static void main(String[] args){Man lihua = new Man()。//賦值=image。} public double getReal(){return real。} public Complex add(Complex c1,Complex c2)//寫方法{Complex C=new Complex(+,+)。} public Complex jian(Complex c1,Complex c2){Complex C=new Complex(,)。} public boolean bijiao(Complex c1,Complex c2){return(==amp。amp。//創(chuàng)建類,調(diào)用類里面的方法Complex c2=new Complex(5,2)。((c1,c2))。} public Calculate(int i,int j,int t){=i。} public double jian(){return ij。} } public class PackageDemo {//測試public static void main(String[] args){Calculate c1=new Calculate(8,4)。(”相乘=“+())。public BankAccount(double cunkuan,double balance)//寫方法{=balance。} public void chaxun(double balance,double cunkuan){(”存款為:“+cunkuan)。} } public class UseAccount {//測試public static void main(String[] args){BankAccount c1=new BankAccount(40000,40000)。(10000)。float math,Enghish。} public void set(float chinese,float math,float Enghish){average=(chinese+math+Enghish)/3。if(average=60)(”本科生成績合格“)。if(average=80)(”研究生生成績合格“)。(65,75,60)。Graduate c2=new Graduate(”小紅 “,18)。(())。//定義抽象類,里面不能寫方法public abstract double area()。=b。s=(a+b+c)/2。()。private String lastName。} public String getLastName(){ return lastName。public Boss(String first, String last, double salary){ super(first, last)。double sale。 = sale。double price。}public String earnings(){return(number*price+”“)。 = time。(”張三月工資:“+())。(”王五月工資:“+())。double r。=height。public abstract double NewVolume()。} } public class Yuanzhui extends Yuanzhu implements Volume { public Yuanzhui(String shape, double r, double height, double pi){super(shape, r, height, pi)。} public double NewVolum(){return *pi*r*pi*r*height。(”圓柱體積:“+())。} public class Plane implements CanFly{//使用接口 Override public void fly(){// TODO Autogenerated method stub(”飛機借助螺旋槳飛上天空“)。makeFly(p)。public class Ex1 { public static void main(String args[ ]){ try{ BufferedReader strin=new BufferedReader(new InputStreamReader())。(”請輸入被除數(shù):“)。(”商為:“+c)。} } }(11)(1)MyException類: package exp2_11。public class Div { public static void main(String args[])throws MyException{try{BufferedReader in = new BufferedReader(new InputStreamReader())。(”請輸入除數(shù):“)。}catch(ArithmeticException e1){(”商結(jié)果:Infinity“+e1)。}finally{(”程序結(jié)束!“)。else return(a/b)。而這次實驗也讓我看到了現(xiàn)在學(xué)習(xí)的一個很大弱點就是實踐的實踐往往很少。(6)調(diào)試程序要記錄調(diào)試過程中出現(xiàn)的問題及解決辦法;(7)編寫程序要規(guī)范、正確,上機調(diào)試過程和結(jié)果要有記錄,不斷積累編程及調(diào)試經(jīng)驗;(8)做完實驗后給出本實驗的實驗報告。設(shè)計如圖所示圖形界面,顯示n個裁判的評分,根據(jù)制定規(guī)則計算出最后得分。import .*。int x=0,y=0。//圓的直徑()。//畫圓 } } :r=aθ畫出相應(yīng)圖形。import 。JPanel p1。int p2=0。p1=new JPanel()。(t1)。if(c==”0“||c==”1“||c==”2“||c==”3“||c==”4“||c==”5“||c==”6“||c==”7“||c==”8“||c==”9“||c==”.“){if(p2==0){(c)。}} else if(p==”清零“){value=0。if(count==2){p=c。count=2。count=2。count=2。} else if(p==”負“){value=1*(())。value=0。import .*。t1=new TextField(5)。(null)。(t1)。(new Label(”八進制“))。(EXIT_ON_CLOSE)。(((c)))。import .*。JTextField t1[]=new JTextField[10]。public PingFen(){ super(”模擬裁判評分“)。p=new JPanel(new FlowLayout())。(b)。else continue。min=((t1[0].getText()))。} else if((k=((t1[i].getText())))new PingFen()。public class MoonApplet extends Applet implements MouseListener { int x,y。}public void paint(Graphics g)//在Applet上繪圖 { ()。(x,y,diameter,diameter)。y=()。import .*。//自定義畫布組件 public LuoXuan(){super(”阿基米德螺線“)。(p,”North“)。=new LuoXuanCanvas()。}public void actionPerfor。(EXIT_ON_CLOSE)。(b)。(,)。public class LuoXuan extends JFrame implements ActionListener{ private static final long serialVersionUID = 1L。} package2。//設(shè)置為背景色 (x20,y20,diameter,diameter)。int diameter = (()/2, ()/2)。y=()/4。import 。imax){max=k。t1[i].setText(null)。for(int i=0。b=new JButton(”平均分“)。p1=new JPanel(new GridLayout(2,5))。float s=0,k。public class PingFen extends JFrame implements ActionListener{ JPanel p,p1。} public static void main(String[] args){ new ZhuanH()。}public void actionPerformed(ActionEvent e){ String c = ()。(new Label(”十六進制“))。(new Label(”二進制“))。(new GridLayout(4,2))。t3=new TextField(5)。public ZhuanH(){super(”十進制整數(shù)轉(zhuǎn)換“)。}} .*。count=2。((value))。count=2。count=2。} if(c==”=“){ if(p==”開根“){value=(float)((()))。} else {count++。} else {(()+c)。for(int i=0。()。public Calulator(){f=new JFrame(”Calulator“)。static int count=1。import .*。程序清單:(建議程序中適當(dāng)添加注釋信息,增強可讀性;較長程序可分欄書寫,保證報告排版整潔美觀。//畫圓(())。y = ()/4。public class MoonApplet extends Applet { public void paint(Graphics g)//在Applet上繪圖 { ()。,然后修改程序,當(dāng)使用鼠標(biāo)單擊后在另一位置重新繪制月亮。三、實驗過程將一個十進制整數(shù)分別轉(zhuǎn)換成二進制、八進制和十六進制整數(shù)。所以我必須在以后的學(xué)習(xí)中多動手多實際操作爭取能在實踐中找到屬于自己新的感悟,終于在學(xué)習(xí)Java時達到了事半功倍的效果。(2)(3)(4)(5)(6)(7)(8)(9)(10)(11)五、實驗體會(遇到問題及解決辦法,編程后的心得體會)學(xué)習(xí)程序設(shè)計的基本目的就是培養(yǎng)描述實際問題的程序化解決方案的關(guān)鍵技能Java面向?qū)ο蟪绦蛟O(shè)計是一門實踐性比較強的課程在實際中我們必須把理論和實踐結(jié)合起來。amp。}catch(NumberFormatException e2){(”異常:字符串不能轉(zhuǎn)換成整數(shù)!“+e2)。double b = (str)。String str = ()。} }(2)Div主類: package exp2_11。} //捕獲數(shù)值轉(zhuǎn)化時的異常,如不能將字符轉(zhuǎn)化成數(shù)值catch(NumberFormatException e){(”數(shù)值格式異常,重新輸入“)。int b=(cl)。String cl=()。makeFly(b)。} } public class Test { static void makeFly(CanFly obj){()。(”圓錐體積:“+())。Yuanzhui c2=new Yuanzhui(”圓錐“,2,3,)。public double area(){s=(height*height+r*r)。} public double area(){ return pi*r*r。=pi。double pi。(”劉三月工資:“+())。(”李四月工資:“+())。} public String earnings(){ return(time*money+”“)。double money。 = number。} public String earnings(){return(salary+sale*price+”“)。public CommissionWorker(String first, String last, double salary, double sale,double price){super(first, last)。} public String earnings(){return(salary+”“)。} public abstract String earnings()。lastName=last。(())。} public String toString(){return(”三角形三邊長:“+a+” “+b+” “+c+” “+”周長:“+perimeter()+”面積:“+area())。} public double perimeter(){return a+b+c。public Triangle(String newShape,double a,double b,double c){super(”newShap
點擊復(fù)制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1