當前位置:首頁 » 編程語言 » java系統課程設計

java系統課程設計

發布時間: 2023-05-20 07:34:45

A. 《java》期末課程設計

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class QuestionOne {

/**
* 編程將從鍵盤輸入文本中的子字元串「word」替換為字元串「world」, 並刪除所有的子字元串「this」。
* 序程要求:程序中要包含有注釋,對於使用的變數和方法的功能要加以說明。
*/
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));

String message = null; // 存儲用戶輸入的字元串
try {
while ((message = reader.readLine()) != null) {
// 列印處理前的字元串
System.out.println("輸入的字元串為:" + message);

// 把 word 替換為 world
message = message.replaceAll("word", "world");

// 把 this 替換為 空
message = message.replaceAll("this", "");

// 列印處理後的字元串
System.out.println("處理後為:" + message);
}
} catch (Exception e) {
e.printStackTrace();
System.out.println("出現異常,程序退出!");
}
}
}

B. java課程設計題目及代碼是什麼

java課程設計題目及代碼分別是:

1、題目:計算器。設計內容是設計一個圖形界面(GUI)的計算器應用程序,完成簡單的算術運算。

設計要求是設計的計算器應用程序可以完成家法、減法、乘法、除法和取余運算。且有小數點、正負號、求倒數、退格和清零功能。

2、代碼:

數字按鈕NumberButton類如下:

import java.awt.

import java.awt.event.

import javax.swing.

public class NumberButton extends Button.

{

int number.

public NumberButton(int number).

{

super(""+number).

this.number=number.

setForeground(Color.blue).

}

public int getNumber().

{

return number;

}

}

其它java課程設計題目及代碼是:

題目:華容道。編寫一個按鈕的子類,使用該子類創建的對象代表華容道中的人物。通過焦點事件控制人物顏色,當人物獲得焦點時顏色為藍色,當失去焦點時顏色為灰色。

通過鍵盤事件和滑鼠事件來實現曹操、關羽等人物的移動。當人物上發生滑鼠事件或鍵盤事件時,如果滑鼠指針的位置是在人物的下方(也就是組件的下半部分)或按下鍵盤的「↓「鍵,該人物向下移動。向左、向右和向上的移動原理類似。

代碼是:

String name[]={"曹操","關羽","張","劉","馬","許","兵","兵","兵","兵"}.

for(int i=0;i<name.length;i++).

{

person[i]=new Person(i,name[i]).

person[i].addKeyListener(this).

person[i].addMouseListener(this).

// person[i].addFocusListener(new Person).

add(person[i]).

}

person[0].setBounds(104,54,100,100).

person[1].setBounds(104,154,100,50).

person[2].setBounds(54,154,50,100).

person[3].setBounds(204,154,50,100).

person[4].setBounds(54,54,50,100).

person[5].setBounds(204,54,50,100);

person[6].setBounds(54,254,50,50);

person[7].setBounds(204,254,50,50);

person[8].setBounds(104,204,50,50);

person[9].setBounds(154,204,50,50);

C. 用java圖書銷售管理系統的課程設計怎麼做

1,先說明的這個系統是要干什麼,包含什麼功能,做成什麼樣(b/s,c/s??)
2、用java語言完成這個目標,需要用到java那些技術,用什麼資料庫?EJB?jsf?jsp?JPA?ssh?swing?
3、逐一簡單的介紹一下你選用的技術框架,並說明優缺點;
4、簡單的系統的概要設計(包含的功能框架)
5、核心代碼的介紹
6、完成的成果(具體成果的展示,可以貼圖表示)
7、簡單的總結

D. java 課程設計

//父類MyMedia
public class MyMedia{
protected String mediaName;
protected float price;
protected String press;
protected String artist;

public MyMedia(String mn,float pri,String pre,String art){
mediaName=mn;
price=pri;
press=pre;
artist=art;
}
public void mediaNameInput(String mn){
mediaName=mn;
}
public void mediaPriceInput(float pri){
price=pri;
}
public void mediaPressInput(String pre){
press=pre;
}
public void mediaArtistInput(String art){
artist=art;
}
}

//子類MyBook
public class MyBook extends MyMedia{
private String editor;
private String publishDate;
private String bookISBN;

public MyBook(String mn,float pri,String pre,String art,String edi,String pub,String isbn){
super(mn,pri,pre,art);
editor=edi;
publishDate=pub;
bookISBN=isbn;
}
public void bookOtherInfo(String edi,String pub,String isbn){
editor=edi;
publishDate=pub;
bookISBN=isbn;
}
public void getBookInfo(){
System.out.println();
System.out.println("書名: "+mediaName);
System.out.println("書的價格:"+price);
System.out.println("書的出版社:"+press);
System.out.println("書的作者:"+artist);
System.out.println("書的editor:"+editor);
System.out.println("書的出版日期:"+publishDate);
System.out.println("書的bookISBN:"+bookISBN);
}
}

//子類MyCD
public class MyCD extends MyMedia{
private String cdISRC;
private String cdPublisher;

public MyCD(String mn,float pri,String pre,String art,String isrc,String cdp){
super(mn,pri,pre,art);
cdISRC=isrc;
cdPublisher=cdp;
}
public void CDOtherInfo(String isrc,String cdp){
cdISRC=isrc;
cdPublisher=cdp;
}
public void getCDInfo(){
System.out.println();
System.out.println("CD名: "+mediaName);
System.out.println("CD的價格:"+price);
System.out.println("CD的出版社:"+press);
System.out.println("CD的演早衫唱者:"+artist);
System.out.println("CD的陸搜腔cdISRC:"+cdISRC);
System.out.println("CD的發漏碼行者:"+cdPublisher);
}
}

//子類MyTape
public class MyTape extends MyMedia{
private String TapeISRC;

public MyTape(String mn,float pri,String pre,String art,String isrc){
super(mn,pri,pre,art);
TapeISRC=isrc;
}
public void TapeOtherInfo(String isrc){
TapeISRC=isrc;
}
public void getTapeInfo(){
System.out.println();
System.out.println("CD名: "+mediaName);
System.out.println("CD的價格:"+price);
System.out.println("CD的出版社:"+press);
System.out.println("CD的演唱者:"+artist);
System.out.println("CD的TapeISRC:"+TapeISRC);
}
}

未完代敘 時間太晚了!!
QQ 383513327

E. java程序設計課程簡介

一 JAVA程序設計課程講什麼內容

《Java程序設計》課程是使用Java語言進行應用程序設計的課程。課程的主要目標有三:一、掌握Java語言的語法,能夠較為深入理解Java語言機制,掌握Java語言面向對象的特點。 二、掌握JavaSE中基本的API,掌握在 *** 、線程、輸入輸出、文本處理、圖形用戶界面、網路等方面的應用。三、能夠編寫有一定規模的應用程序,養成良好的編程習慣。 本課程要對Java語言的一些機制會詳細講解,所以具有系統性。本課程還注重實踐性,要講Java語言在文本、文件、窗體界面、圖形、資料庫、多線程、並行編程方面的應用。還會講到編好代碼的經驗與技巧,包括面向對象的思想、軟體開發工具的使用等。 在教學中,採用教師講授、學生自測、學生討論、編程實踐相結合的方法。

二 千鋒JAVA課程介紹

Java語言的發展及相關技術的介紹,Java技術和平台在網路計算及電子商務中的應用介紹;Java語言的基礎知識:Java語言的主要特點,設計思想,Java虛擬機,垃圾回收機制,安全性的保證機制;Java語言的基本語法規范,包括標識符、關鍵字、數據類型、表達式和流控制,程序基本結構;?面向對象技術的基本特點,Java語言的面向對象特性,類和對象的概念,封裝性、繼承性、多態性,Java語言的特殊屬性;Java程序的例外處理機制和方法;
Java語言的輸入/輸出處理機制和方法,常用的輸入/輸出方法,輸入/輸出處理的應用;
Java語言的圖形用戶界面設計:AWT界面設計的基本方法,常用的組件類庫,圖形用戶界面的事件處理模型和方法,JFC介紹,Swing圖形界面設計;Java Applet程序設計,Applet程序的特點,運行機制,與瀏覽器的集成,安全機制的使用;
多線程程序設計,進程和線程的聯系和區別,多線程程序設計的一般方法,線程的生命周期,線程狀態的控制,多線程的互斥和同步;Java語言的網路編程技術和應用,Socket程序設計,Client/Server程序設計;Java的Servlet和JSP(Java?Server?Page)技術;
JavaBeans和RMI。

三 java程序設計的介紹

《java程序設計》是2006年清華大學出版社 北京交通大學出版社出版的圖書,作者是吳萍、蒲鵬、朱麗娟。主要講述了本書通過對Java編程語言的全面介紹,引導讀者快速地掌握Java編程語言的核心內容並學會靈活運用所學的語言知識及面向對象的編程思想。全書共分9章,內容包括Java語言概述、面向對象編程初步、Java的基本語法、類庫與數組、面向對象編程深入、Applet程序、圖形用戶界面編程、異常處理和輸入輸出及多線程編程。

四 java程序設計的內容簡介

本書採用任務驅動教學模式,通過任務的實施,使讀者在讀程序、版學知識、寫程序的過程中,權逐漸掌握面向對象的Java程序設計思想和技能。本書共分12個單元,主要包括Java程序設計過程、基本語法規則、面向對象技術、數組與字元串、異常處理、GUI編程、輸入/輸出處理、多線程編程以及基礎網路編程等內容。
本書適合作為高等職業院校計算機相關專業「Java程序設計」或者「面向對象程序設計」課程的教材,也可作為相關技術人員學習Java的參考用書。

五 java程序設計的內容簡介

本書是依據本科和高職高專院校的培養目標及基本要求,結合作者多專年來的教學經驗和工程實踐屬基礎,為實施教學改革,使計算機教學進一步面向軟體編程實踐而編寫的一本教材。包括的主要內容有:面向對象程序設計語言,Java程序設計入門,程序控制流程,JAVA的方法、類與對象、繼承與派生,JAVA的異常處理,JAVA包的組成和使用,設計APPLET程序、JAVA的多線程、I/O流、網路程序設計等。每章後都配有上機實戰和理論鞏固題,實現教與學的統一。
本書語言通俗易懂,內容豐富翔實,突出了以實用為中心的特點。使用本書進行學習,可幫助讀者用最少的時間掌握最多的知識及工作經驗與技巧,是本科和高職高專院校理想的教學教材,同時也可作為軟體和信息技術工程人員的參考用書。

六 《JAVA程序設計》課程設計

1 package study.part02;
2 import java.util.Calendar;
3 import java.awt.*;
4 import javax.swing.*;
5 import java.awt.event.*;
6 import java.lang.Thread;
7 public class Clock extends JFrame implements ComponentListener,
8 ItemListener,Runnable{
9 Thread timer;
10 private JComboBox bobox_color;
11 public void start(){
12 if(timer==null)
13 timer=new Thread(this,"ShowTime");
14 timer.start();
15 }
16 public void run(){
17 while(true){
18 try{
19 timer.sleep(1000);
20 }catch(InterruptedException e){}
21 repaint();
22 }
23 }
24 public void stop(){
25 timer.stop();
26 }
27 public Clock(){
28 super("Clock");
29 this.setSize(600,600);
30 this.setDefaultCloseOperation(EXIT_ON_CLOSE);
31 this.setLayout(new FlowLayout());
32
33 this.setVisible(true);
34 }
35 public void paint(Graphics g){
36 Calendar cal=Calendar.getInstance();
37 int year=cal.get(Calendar.YEAR);
38 int month=cal.get(Calendar.MONTH);
39 int day=cal.get(Calendar.DATE);
40 int hour=cal.get(Calendar.HOUR);
41 int minute=cal.get(Calendar.MINUTE);
42 int second=cal.get(Calendar.SECOND);
43 int a,b;
44 a=this.getWidth()/2;
45 for(int i=1;i<=360;i++){
46 double angle=i*Math.PI/180;
47 double radius=a-50;
48 int x=(int)Math.round(radius*Math.sin(angle));
49 int y=(int)Math.round(radius*Math.cos(angle));
50 if(i%30==0){
51 int j=i/30;
52 String str=String.valueOf(j);
53 g.setColor(Color.black);
54 // g.fillOval(a+x,a+y,1,1);
55 g.drawString(str,a+x,a-y);
56 }
57 double radh=a-200;
58 angle=hour*Math.PI/30;
59 int xh=(int)Math.round(radh*Math.sin(angle));
60 int yh=(int)Math.round(radh*Math.cos(angle));
61 g.setColor(Color.red);
62 g.drawLine(a,a,a+xh,a-yh);
63 double radm=a-150;
64 angle=minute*Math.PI/30;
65 int xm=(int)Math.round(radm*Math.sin(angle));
66 int ym=(int)Math.round(radm*Math.cos(angle));
67 g.setColor(Color.blue);
68 g.drawLine(a,a,a+xm,a-ym);
69 double rads=a-100;
70 angle=second*Math.PI/30;
71 int xs=(int)Math.round(rads*Math.sin(angle));
72 int ys=(int)Math.round(rads*Math.cos(angle));
73 g.setColor(Color.yellow);
74 g.drawLine(a,a,a+xs,a-ys);
75 //g.drawString(cal.get(Calendar.HOUR)+":"+cal.get(Calendar.
76 // MINUTE)+":"+cal.get(Calendar.SECOND));
77 }
78 }
79 public void itemStateChanged(ItemEvent e){
80 repaint();
81 }
82 public void ponentResized(ComponentEvent e){
83 repaint();
84 }
85 public void ponentMoved(ComponentEvent e){}
86 public void ponentHidden(ComponentEvent e){}
87 public void ponentShown(ComponentEvent e){}
88
89 public static void main(String[] args){
90 Clock show=new Clock();
91 show.start();
92 }
93 }

七 java程序設計的內容簡介

本書講解了Java語言的基本知識及程序設計的基本方法,使讀者掌握面向對象程序設計的基本概念,從而具有利用Java語言進行程序設計的能力,為將來從事軟體開發,特別是Web應用系統開發打下良好基礎。全書共分10章,從內容上大致分為三個部分:第一部分為第1章~第3章,介紹Java程序設計的基礎知識,包括Java語言概述、Java語言基礎以及演算法與程序控制結構。第二部分為第4章~第6章,介紹Java面向對象程序設計的基本方法與技術,這是Java的核心與特色內容,包括類與對象、封裝、繼承與多態以及異常處理與輸入/輸出。第三部分為第7章~第10章,介紹Java的實際應用,包括多線程、網路程序設計、資料庫應用以及圖形用戶界面開發技術。
本書內容講解詳細,程序代碼均經過調試,案例實用。
本書適合作為高等院校計算機程序設計課程的教材,也可作為具有一定程序設計基礎和經驗的讀者的參考用書。

八 java程序設計的內容簡介

本書共分四篇15章來闡述Java語言。其中,第一篇介紹了Java的基礎知識,包括Java的歷史和特徵、Java的開發環境和工具、Java語言的基本語法知識;第二篇介紹了面向對象編程的思想和相關概念,Java中類的定義和對象的創建,Java繼承、介面和包,數組與字元串,異常處理及JDK類庫的應用;第三篇介紹了Java的AWT和Swing圖形包的使用以及Java的多線程編程支持;第四篇通過一些簡單的例子介紹了Java在網路和資料庫方面的編程。本書的篇章內容採用循序漸進、由簡到繁、由易到難的學習思維特徵進行編排,書中例子以人們學習與認知過程為基礎,以實際開發的需求為目標。書中內容通俗易懂,豐富易學,每章都附有習題,幫助讀者及時了解與掌握相應章節的知識點並將其應用到實踐中。
本書適合作為高職院校各專業學習Java語言的基礎教材,也可作為相關工程技術人員和科技工作者的參考用書。

九 JAVA程序設計課程主講老師是誰

JAVA程序設計主講老師是北京大學信息科學技術學院教師,在程序設計方面有多年的項目開發經驗和教學經驗,任教育部計算機教指委分委專家組成員。出版的教材包括《Java程序設計》(曾獲第六屆全國高校出版社優秀暢銷書獎)、《C#程序設計教程》、《VB程序設計》、《Visual C++.NET程序設計》等。在北京大學開設多門程序設計課程,課程內容以系統知識與實踐應用相結合,注重培養對知識體系的深入理解,在與實際工作生活相結合的應用實踐中分析問題、解決問題的能力。

十 Java程序設計與Web應用程序設計哪門課簡單

java程序設計主要講解java的基礎知識,它是一種語言性的課程。

web應用設計則是一種方向性的課程,這個web的設計你可以使用asp,也可以使用jsp,如果是通過jsp來進行web開發的話,需要java的知識作為基礎。

因此,如果你有asp的相關知識的話,可以不學習java直接學習web應用程序設計,如果沒有的話,建議你先學習java程序設計,然後再學習web應用程序設計。

F. Java語言期末課程設計「操作系統中銀行家演算法的實現」

有電子版可以參考。

G. JAVA課程設計,設計一個學生基本信息管理系統,有沒有大佬可以幫我,急!!!!

哎、 老大、你該不會讓 幫你寫 畢業試題吧!!!
不過 幫你分析 一下吧!! 我也是 新手!!!
1、首先 創建資料庫 (以為你的需求較少 不用寫項目文檔了 直奔主題好了)
學生表(Students) 學分表(Score)學科表(Greade) 估計這三個就 夠用了(不夠你在添加、、)
2、(使用JSP 完成)創建 頁面 (根據你的需求 創建吧)以及導入資料庫 驅動、、、
3、資料庫連接類、實體類、 Dao 類、業務類!
4、你的錄入,查、修改、分別 用
1、insert into (表名)values(列值)
2、select * (或 列名) from 表名 where =?;
3、delete * from 表名 where=?;
4、關於頁面的 驗證 你在 創建 jsp 頁面時, 添加 javascript 進行 驗證 就行了!!
四、到此 分析完了 說實話、這項目 不難、朋友如果你動手的話,也就三四個小時 就K.O了!!
學習 要肯動手!!! 加油啊!!! 傍晚 快樂! 選我 吧!Thanks

H. java課程設計---計算器 要求如下:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.LinkedList;
import java.io.*;
public class CalculatorWindow extends JFrame implements ActionListener{
NumberButton numberButton[];
OperationButton operationButton[];
JButton 小數點操作,正負號操作,退格操作,等號操作,清零操作,sin;
JTextField resultShow; //顯示計算結果
JTextField showComputerProcess; //顯示當前計算過程
JTextArea saveComputerProcess; //顯示計算步驟
JButton saveButton,Button,clearButton;
LinkedList<String> list; //鏈表用來存放第一個運算數、運算符號和第二個運算數
HandleDigit handleDigit; //負責處理ActionEvent事件
HandleOperation handleOperation ;
HandleBack handleBack;
HandleClear handleClear;
HandleEquality handleEquality;
HandleDot handleDot;
HandlePOrN handlePOrN;
HandleSin handleSin;
public CalculatorWindow(){
setTitle("計算器");
JPanel panelLeft,panelRight;
list=new LinkedList<String>();
resultShow=new JTextField(10);
resultShow.setHorizontalAlignment(JTextField.RIGHT);
resultShow.setForeground(Color.blue);
resultShow.setFont(new Font("TimesRoman",Font.BOLD,16));
resultShow.setBorder(new SoftBevelBorder(BevelBorder.LOWERED));
resultShow.setEditable(false);
resultShow.setBackground(Color.white);
showComputerProcess=new JTextField();
showComputerProcess.setHorizontalAlignment(JTextField.CENTER);
showComputerProcess.setFont(new Font("Arial",Font.BOLD,16));
showComputerProcess.setBackground(Color.cyan);
showComputerProcess.setEditable(false);
saveComputerProcess=new JTextArea();
saveComputerProcess.setEditable(false);
saveComputerProcess.setFont(new Font("宋體",Font.PLAIN,16));
numberButton=new NumberButton[10];
handleDigit=new HandleDigit(list,resultShow,showComputerProcess);
for(int i=0;i<=9;i++){
numberButton[i]=new NumberButton(i);
numberButton[i].setFont(new Font("Arial",Font.BOLD,20));
numberButton[i].addActionListener(handleDigit);
}
operationButton=new OperationButton[4];
handleOperation=new HandleOperation(list,resultShow,
showComputerProcess,saveComputerProcess);
String 運算符號[]={"+","-","*","/"};
for(int i=0;i<4;i++){
operationButton[i]=new OperationButton(運算符號[i]);
operationButton[i].setFont(new Font("Arial",Font.BOLD,20));
operationButton[i].addActionListener(handleOperation);
}
小數點操作=new JButton(".");
handleDot=new HandleDot(list,resultShow,showComputerProcess);
小數點操作.addActionListener(handleDot);
正負號操作=new JButton("+/-");
handlePOrN=new HandlePOrN(list,resultShow,showComputerProcess);
正負號操作.addActionListener(handlePOrN);
等號操作=new JButton("=");
handleEquality=new HandleEquality(list,resultShow,
showComputerProcess,saveComputerProcess);
等號操作.addActionListener(handleEquality);
sin=new JButton("sin");
handleSin=new HandleSin(list,resultShow,
showComputerProcess,saveComputerProcess);
sin.addActionListener(handleSin);
退格操作=new JButton("退格");
handleBack=new HandleBack(list,resultShow,showComputerProcess);
退格操作.addActionListener(handleBack);
清零操作=new JButton("C");
handleClear=new HandleClear(list,resultShow,showComputerProcess);
清零操作.addActionListener(handleClear);
清零操作.setForeground(Color.red);
退格操作.setForeground(Color.red);
等號操作.setForeground(Color.red);
sin.setForeground(Color.blue);
正負號操作.setForeground(Color.blue);
小數點操作.setForeground(Color.blue);
panelLeft=new JPanel();
panelRight=new JPanel();
panelLeft.setLayout(new BorderLayout());
JPanel centerInLeft=new JPanel();
panelLeft.add(resultShow,BorderLayout.NORTH);
panelLeft.add(centerInLeft,BorderLayout.CENTER);
centerInLeft.setLayout(new GridLayout(4,5));
centerInLeft.add(numberButton[1]);
centerInLeft.add(numberButton[2]);
centerInLeft.add(numberButton[3]);
centerInLeft.add(operationButton[0]);
centerInLeft.add(清零操作);
centerInLeft.add(numberButton[4]);
centerInLeft.add(numberButton[5]);
centerInLeft.add(numberButton[6]);
centerInLeft.add(operationButton[1]);
centerInLeft.add(退格操作);
centerInLeft.add(numberButton[7]);
centerInLeft.add(numberButton[8]);
centerInLeft.add(numberButton[9]);
centerInLeft.add(operationButton[2]);
centerInLeft.add(sin);
centerInLeft.add(numberButton[0]);
centerInLeft.add(正負號操作);
centerInLeft.add(小數點操作);
centerInLeft.add(operationButton[3]);
centerInLeft.add(等號操作);
panelRight.setLayout(new BorderLayout());
panelRight.add(showComputerProcess,BorderLayout.NORTH);
saveButton=new JButton("保存");
Button=new JButton("復制");
clearButton=new JButton("清除");
saveButton.setToolTipText("保存計算過程到文件");
Button.setToolTipText("復制選中的計算過程");
clearButton.setToolTipText("清除計算過程");
saveButton.addActionListener(this);
Button.addActionListener(this);
clearButton.addActionListener(this);
panelRight.add(new JScrollPane(saveComputerProcess),BorderLayout.CENTER);
JPanel southInPanelRight=new JPanel();
southInPanelRight.add(saveButton);
southInPanelRight.add(Button);
southInPanelRight.add(clearButton);
panelRight.add(southInPanelRight,BorderLayout.SOUTH);
JSplitPane split=new JSplitPane
(JSplitPane.HORIZONTAL_SPLIT,panelLeft,panelRight);
add(split,BorderLayout.CENTER);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
setBounds(100,50,528,258);
validate();
}
public void actionPerformed(ActionEvent e){
if(e.getSource()==Button)
saveComputerProcess.();
if(e.getSource()==clearButton)
saveComputerProcess.setText(null);
if(e.getSource()==saveButton){
JFileChooser chooser=new JFileChooser();
int state=chooser.showSaveDialog(null);
File file=chooser.getSelectedFile();
if(file!=null&&state==JFileChooser.APPROVE_OPTION){
try{ String content=saveComputerProcess.getText();
StringReader read=new StringReader(content);
BufferedReader in= new BufferedReader(read);
FileWriter outOne=new FileWriter(file);
BufferedWriter out= new BufferedWriter(outOne);
String str=null;
while((str=in.readLine())!=null){
out.write(str);
out.newLine();
}
in.close();
out.close();
}
catch(IOException e1){}
}
}
}
public static void main(String args[]){
new CalculatorWindow();
}
}

I. 誰知道java 學生基本信息管理系統 的課程設計

可以試試看啊
以下方法實現了用戶界面登陸
import java.awt.*;
import java.awt.event.*;
public class DengLuJieMian extends Frame implements ActionListener
{
Label username=new Label("用戶名:");//使用文本創建一個用戶名標簽
TextField t1=new TextField();//創建一個文本框對象
Label password=new Label("密碼:");//創建一個密碼標簽
TextField t2=new TextField();
Button b1=new Button("登陸");//創建登陸按鈕
Button b2=new Button("取消");//創建取消按鈕
public DengLuJieMian()
{
this.setTitle("學生信息管理系統");//設置窗賣虛肢口標題
this.setLayout(null);//設置窗口布局管理器
username.setBounds(50,40,60,20);//設置姓名標簽的初始位置
this.add(username);// 將姓名標簽組件添加到容器
t1.setBounds(120,40,80,20);// 設置文本框的初始位置
this.add(t1);// 將文本框組件添加到容器
password.setBounds(50,100,60,20);//密碼標簽的初始位置
this.add(password);//將密碼標簽組件添加到容器
t2.setBounds(120,100,80,20);//設置密碼標簽的初始位置
this.add(t2);//將密碼標簽組件添加到容器
b1.setBounds(50,150,60,20);//設置登陸按鈕的初始位置
this.add(b1);//將登陸按鈕組件添加到容器中世
b2.setBounds(120,150,60,20);//設置取消按鈕的初始位置
this.add(b2);// 將取消譽慶按鈕組件添加到容器
b1.addActionListener(this);//給登陸按鈕添加監聽器
b2.addActionListener(this);// 給取消按鈕添加監聽器

this.setVisible(true);//設置窗口的可見性
this.setSize(300,200);//設置窗口的大小
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});//通過內部類重寫關閉窗體的方法
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==b1)//處理登陸事件
{
String name=t1.getText();
String pass=t2.getText();
if(name!=null&&pass.equals("000123"))//判斷語句
{
new StudentJieMian();
}
}
}
public static void main(String args[])//主函數
{
new DengLuJieMian();
}
}
以下方法實現了學生界面設計
import java.awt.*;
import java.awt.event.*;
class StudentJieMian extends Frame implements ActionListener
{
MenuBar m=new MenuBar();//創建菜單欄
Menu m1=new Menu("信息");//創建菜單「信息」
MenuItem m11=new MenuItem("插入");//創建「插入」的菜單項
MenuItem m12=new MenuItem("查詢");
Menu m2=new Menu("成績");//創建菜單「成績」
MenuItem m21=new MenuItem("查詢");
public StudentJieMian()
{
this.setTitle("學生界面");//設置窗口標題
this.setLayout(new CardLayout());//設置窗口布局管理器
this.setMenuBar(m);//將菜單欄組件添加到容器
m.add(m1);//將信息菜單放入菜單欄
m.add(m2);
m1.add(m11);//將「插入」菜單項添加到「信息」菜單
m1.add(m12); //將「查詢」菜單項添加到「信息」菜單
m2.add(m21); //將「查詢」菜單項添加到「成績」菜單
m11.addActionListener(this); //給「插入」菜單項添加監聽器
m12.addActionListener(this); //給「查詢」菜單項添加監聽器
m21.addActionListener(this); //給「查詢」菜單項添加監聽器
this.setVisible(true); //設置窗口的可見性
this.setSize(300,200); //設置窗口的大小
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);//關閉窗口
}
});
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==m11) //處理「添加信息」事件
{
new AddStudent();
}
if(e.getSource()==m12) //處理「查詢信息」事件
{
new SelectStudent();
}
if(e.getSource()==m21) //處理「查詢成績」事件
{
new ChengJiStudent();
}
}
public static void main(String args[])
{ new StudentJieMian(); //創建一個對象 }

熱點內容
vps伺服器adsl動態ip 發布:2024-05-01 02:15:49 瀏覽:778
python成員函數 發布:2024-05-01 01:26:03 瀏覽:377
編程貓小愛 發布:2024-05-01 01:25:18 瀏覽:32
pythonwhile 發布:2024-05-01 00:04:25 瀏覽:730
c語言用中文寫代碼能編譯通過嗎 發布:2024-04-30 23:59:18 瀏覽:537
小X分身存儲隔離 發布:2024-04-30 23:54:50 瀏覽:758
安卓電話錄音怎麼使用 發布:2024-04-30 23:42:38 瀏覽:414
windows運行python 發布:2024-04-30 23:38:18 瀏覽:784
節奏大師安卓腳本 發布:2024-04-30 23:25:18 瀏覽:422
ftp上傳進度 發布:2024-04-30 23:11:23 瀏覽:884