-
大小: 1022KB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-08-16
- 語(yǔ)言: Java
- 標(biāo)簽:
資源簡(jiǎn)介
大四期末大作業(yè),精心做的gui界面,帶連通的數(shù)據(jù)庫(kù)。界面精美,可移植性高。已經(jīng)用這個(gè)交了好幾份作業(yè)了,特地來(lái)造福人類

代碼片段和文件信息
package?bus_system;
import?java.io.BufferedReader;
import?java.io.FileInputStream;
import?java.io.IOException;
import?java.io.InputStream;
import?java.io.InputStreamReader;
import?java.util.ArrayList;
public?class?Bicycle?
{
long?modle;
String?color;
String?manufacturer;
float?price;
int?remaining;
static?ArrayList?bicycle_list=new?ArrayList();???//記錄所有系統(tǒng)中的Bus信息
static?int?bicycle_number=0;
//保存所有的Bus對(duì)象
BufferedReader?in?=new?BufferedReader(new?InputStreamReader(System.in));
Bicycle()
{
}//不帶實(shí)參的構(gòu)造方法
public?void?addbus()
{
int?temp=0;???//臨時(shí)變量用于停止循環(huán)
while(temp==0)
{
? try
{
System.out.print(“請(qǐng)輸入單車型號(hào):?“);
this.modle?=?Integer.parseInt(in.readLine());
temp?=?1;??//正確輸入
}
catch(Exception?e)???//捕捉異常
{
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一串字符串“+“\n“);
}
}
temp?=?0;
while(temp==0)
{
try
{
System.out.print(“請(qǐng)輸入單車顏色:?“);
this.color?=?in.readLine();
temp?=?1;??//正確輸入
}
catch(Exception?e)???//捕捉異常
{
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一串?dāng)?shù)字“+“\n“);
}
}
temp?=?0;
while(temp==0)
{
try
{
System.out.print(“請(qǐng)輸入單車制造廠商?“);
this.manufacturer?=?in.readLine();
temp?=?1;??//正確輸入
}
catch(Exception?e)???//捕捉異常
{
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一串?dāng)?shù)字“+“\n“);
}
}
temp?=?0;
while(temp==0)
{
try
{
System.out.print(“請(qǐng)輸入單車價(jià)格:?“);
this.price?=?Integer.parseInt(in.readLine());
temp?=?1;??//正確輸入
}
catch(Exception?e)???//捕捉異常
{
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一串?dāng)?shù)字“+“\n“);
}
}
temp?=?0;
while(temp==0)
{
try
{
System.out.print(“請(qǐng)輸入此種型號(hào)單車的剩余數(shù)量:?“);
this.remaining?=?Integer.parseInt(in.readLine());
temp?=?1;??//正確輸入
}
catch(Exception?e)???//捕捉異常
{
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一串?dāng)?shù)字“+“\n“);
}
}
temp?=?0;
bicycle_number++;??//記錄車輛總數(shù)
Bicycle.bicycle_list.add(this);
}
public?static?void?delete(int?i)???//刪除一個(gè)單車種類,單車總數(shù)量減一
{
bicycle_number--;
bicycle_list.remove(i);
System.out.print(“刪除成功!“+“\n“);
}
void?display()???????//打印單車信息
{
System.out.print(“1.單車型號(hào):?“+this.modle+“\n“);
System.out.print(“2.單車顏色:?“+this.color+“\n“);
System.out.print(“3.單車的制造廠商:?“+this.manufacturer+“\n“);
System.out.print(“4.單車價(jià)格:?“+this.price+“\n“);
}
public?void?update()?throws?NumberFormatException?IOException
{
display();
int?choose=0;
int?temp=0;??//臨時(shí)變量,用于switch循環(huán)
while(temp==0)
{
while(temp==0)
{
try
{
System.out.print(“請(qǐng)選擇更新的信息選項(xiàng),你的選擇為:“); ?
choose?=?Integer.parseInt(in.readLine());
temp=?1; //輸入正確。
}
catch(Exception?e){
e.printStackTrace();
System.out.print(“輸入格式錯(cuò)誤,請(qǐng)輸入一個(gè)數(shù)字“+“\n“);
}
}
temp=0;
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????352??2015-01-05?23:57??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\.classpath
?????文件????????388??2015-01-05?21:31??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\.project
?????文件????????598??2015-01-05?21:31??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\.settings\org.eclipse.jdt.core.prefs
?????文件??????68655??2015-01-09?09:15??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bg_2.jpg
?????文件???????4304??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Bicycle.class
?????文件????????168??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\BicycleRenting.class
?????文件???????5332??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Bus.class
?????文件???????1624??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Bus_bicycle.class
?????文件???????7018??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Employee.class
?????文件???????7977??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Local.class
?????文件???????7979??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\LongDistance.class
?????文件???????3919??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Manager.class
?????文件???????5604??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Passenger.class
?????文件???????4230??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Renting_bicycle.class
?????文件???????4744??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\bus_system\Route.class
?????文件???????6272??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\logon.class
?????文件???????1131??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$1.class
?????文件???????1087??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$10.class
?????文件???????1305??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$11.class
?????文件???????1106??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$12$1.class
?????文件???????4040??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$12.class
?????文件???????3426??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$13$1.class
?????文件???????3715??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$13$2.class
?????文件???????2790??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$13$3.class
?????文件???????5977??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$13.class
?????文件???????1087??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$14.class
?????文件???????1305??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$15.class
?????文件???????1106??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$16$1.class
?????文件???????4026??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$16.class
?????文件???????3398??2015-01-10?19:03??期末大作業(yè)公交系統(tǒng)\1240070-唐湘云-期末大作業(yè)公交系統(tǒng)\系統(tǒng)源程序\final_inbook\bin\gui\Mainpanel$17$1.class
............此處省略106個(gè)文件信息
評(píng)論
共有 條評(píng)論