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

正文內(nèi)容

期末復(fù)習(xí)java題(完整版)

2025-05-23 02:51上一頁面

下一頁面
  

【正文】 20,34)。 } public void setSex(String sex) { = sex。 =co。 private String sex。}}public class Test {public static void main(String[]args){ Box a=new Box(2,2,3)。double wide。i。import 。} public int getfuel(){ return(10*kil/100)。 } }package A1。 (new WarShip())。 } } } public void moveAll() { for (Weapon wea : w) { if (wea != null) { ()。 } }class Army { private Weapon[] w = null。 ()。 } } } }package A1。 private int size = 0。(可移動的),該接口有一個抽象方法move()。 } return pay。 } public void printInfo(){ (姓名:+()+,工號:+() +,工齡:+()+,級別:+() +,地址:+())。 } public int getEmployeeNo(){ return 。 private int age。 public person(String name2, String address2) { }public void Person(String n,String a){ (n)。 ()。 }package W1。}point(int x,int y){ =x。 }public static void main(String[]args){ Circle a=new Circle(2,2,4)。 Circle(int r,int x,int y){ super(x,y)。num=gh。 (黃洋洋,01235,6000)。經(jīng)理也是員工,除了含有員工的屬性外,另外還有一個獎金屬性。 i++) { int sum = 0。 y = t。 deff cd = new deff()。} } if (b==false) (i)。 } }}5. 素數(shù)public class Sushu {public static void main(String[] args){ for(int i=100。i){ (a[i])。 for(int i=0。 } if(a%n!=0){ n++。import 。 (a+=)。 (請輸入一個數(shù))。 }else{(不是回文數(shù))}}}3. 數(shù)組逆序輸出public class sz {public static void main(String[]args){ int a[]={1,2,3,4,5,6,7,8,9,0}。 b=i%10。j++ ){ if(i%j==0){ b=true。 a = ()。 }}class deff { public int deff(int x, int y) { int t。 } } return x。public class shishu { public static void main(String[] args) { int i。 } } if (sum == i) { (i)。 (張曉曉,01234,5000)。 protected String num。}}3. 以點類作為基類,從點派生出圓,從圓派生圓柱,設(shè)計成員函數(shù)輸出它們的面積和體積。Cyliner(int h,int x,int y,int r){ super(x,y,r)。protected int y。public abstract class Shape { abstract void center()。 Square r = new Rectangle()。Manager是Employee的子類,設(shè)計一個接口Add用于漲工資,普通員工一次能漲10%,經(jīng)理能漲20%。 } private String getAddress(){ return 。 } public void setEmployeeNo(int e){ = e。 (level)。 } } class Add{ public double addPay(int level,double pay){ if(level==0){ pay = (1+)*pay。 ()。在這個類中還定義兩個方法attackAll()和moveAll(),讓w數(shù)組中的所有武器攻擊和移動。 size++。 (new Flighter())。 } }package A1。 } else { w[size] = weapon。public class NotSimple { public static void main(String[] args) { Army a = new Army(3)。 }abstract class Weapon implements Assaultable, Mobile { }package A1。 }import 。 }}import 。 a[2]=new car(400)。 } }編寫創(chuàng)建一個box類,在其中定義三個變量表示一個立方體的長、寬和高,定義一個構(gòu)造方法對這三個變量進(jìn)行初始化,然后定義一個方法求立方體的體積。}public void volume(){ double v。public class Student { private String num。 =na。 } public String getName() { return name。 } public String toString(){ return 學(xué)號+num+班號+grade+姓名+name+性別+sex+年齡+age+班級總?cè)藬?shù)+count。再以person類派生出教師類teacher和大學(xué)生類collegestudent其中:教師:工資支出=基本工資+授課時數(shù)*30大學(xué)生:獎學(xué)金支出將人員類定義為抽象類,pay為抽象方法,設(shè)計程序?qū)崿F(xiàn)多態(tài)性。 int p。 (3000)。 Iterator it = ()。 (A)。 (a)。private double salary。}public double getSalary(){return salary。在li4中所有的工人調(diào)用work = age。 } public void work(){ (name+work)。 Worker w4=new Worker(zhao6,24,3300)。i()。package z1。 (1990, 德國)。 (1958, 巴西)。 String y=()。public class Test2{ public static void main(String[] args){ HashMap hm=new HashMap()。 (Allen,JDBC)。 } Set set=()。 String str=()。public void address(String aN,String zC){ =aN。private double salary。}public int getAge() { return age。要求參數(shù)m的值大于1000時,方法拋出一個MyException對象。 try{ (1200)。 }}package a2。 } int r=x%y。 Scanner s=new Scanner()。package a3。 =c。public class Test3 {public static void main(String[] args) { int x,y,z 。 ()。import 。 Scanner sc=new Scanner()。import 。文本文件的內(nèi)容在屏幕上顯示出來,import 。 while ((str = ()) != null) { (str)。import 。 (請輸入學(xué)生數(shù))。i。 j++) { for (int i = j+1。 j++) { (a[j])。 (平均分?jǐn)?shù):+sum/s)。中的所有字符都轉(zhuǎn)換為大寫public String toLowerCase ()public class HelloCount {int getHelloCount(String aritleName,String hello) { int count=0。 index=(hello,index+())。import 。 } Scanner in = new Scanner()。import 。 BufferedWriter bw=new BufferedWriter(new FileWriter(new File(./),true))。 i++) { w[i]=c[]。 } ()。public class WriteLog { private static PrintWriter out。 } ()。 a = ()。 }}class deff { public int deff(int x, int y) { int t。 } } return x。 char ch [] = new char[()]。 }if (48ch[i] amp。 ch[i]!=32) { qi++。import 。 private static String user = sa。 }finally{ if(st!=null){ try{ ()。 ResultSet rs = null。 ((age))。import 。 } } catch (SQLException e) { // TODO Autogenerated catch block ()。 String str=select * from student order by num。 }finally{ if(conn!=null){ try{ ()。 static{ try{ (driver)。import 。 (空格有+kong)。 ch[i]57) { shu++。 int eng=0 ,kong=0,shu=0,qi=0。 x = y。 b = ()。 }}:輸入兩個正整數(shù)m和n,求其最大公約數(shù)和最小公倍數(shù)。 } catch (FileNotFoundException e) { ()。package z5。 ()。 String str=()。import 。 while (!quit.equals(line = ())) { (line)。import 。 } return count。 try{ BufferedReader br=new BufferedReader(new FileReader(aritleName))。//提示:下面是String類中的幾個方法:public int indexOf(String str) //返回指定子字符串在此字符串中第一次出現(xiàn)處的索引。j。 i++) { if(a[j]a[i]){ int k= a[i]。 } } catch (IOException e) { // TODO Autogenerated catch block ()。 int[] a=new int[s]。import 。 } ()。import 。package z2。import 。 int b=()。 public static void sanjiao(int a,int b,int c)throw
點擊復(fù)制文檔內(nèi)容
教學(xué)教案相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1