① 在線考試系統源碼分享
Springboot+vue在線考試系統源碼
開發語言:java
資料庫:Mysql
開發工具:Eclipse
使用技術:
後端:SpringBoot
前端:VUE 和 Element-UI
源碼免費分享!
該項目是一個前後端分離,後端使用 SpringBoot,前端使用 VUE 和 Element-UI 組件庫配合完成開發。共有三種角色:管理員、教師、學生。
運行環境:
1.運行環境:最好是java jdk 1.8
2.IDE環境:IDEA,Eclipse,Myeclipse都可以。推薦IDEA;
3.tomcat環境:Tomcat 7.x,8.x,9.x版本均可;
4.硬體環境:windows 7/8/10 1G內存以上;或者 Mac OS;
5.是否Maven項目: 是;查看源碼目錄中是否包含pom.xml;若包含,則為maven項目,否則為非maven項目;
6.資料庫:MySql 8.0版本。
主要功能有
一、管理員登錄:
1. 考試管理:功能介紹、考試查閱、添加考試
2. 題庫管理:功能介紹、所有題庫、增加題庫
3. 成績查詢:學生成績查詢
4. 學生管理:學生管理、添加學生
5. 教師管理:教師管理、添加教師
二、教師登錄: 考試管理、題庫管理、成績查詢、學生管理
三、學生登錄: 我的試卷(試卷列表、考試)、我的練習、我的分數
源碼免費分享!需要源碼用來學習的小夥伴可以私信我:在線考試
如果您也喜歡這篇文章,記得點贊+關注+轉發+評論哦![比心]
② 在線考試系統源碼放在網站哪裡
用拼音或者英語建一個文件在網站的一級根目錄下面,然後根據路徑連接到要訪問的地方,點擊就可以了。
③ 求在線考試系統源代碼,做好的更好,用java語言寫的,連接mysql資料庫的,在線等,急!!謝謝
1.Java連接MySQL資料庫
Java連接MySql需要下載JDBC驅動MySQL-connector-java-5.0.5.zip(舉例,現有新版本)。然後將其解壓縮到任一目錄。我是解壓到D盤,然後將其目錄下的MySQL-connector-java-5.0.5-bin.jar加到classpath里,具體如下:
「我的電腦」-> 「屬性」 -> 「高級」 -> 「環境變數」,在系統變數那裡編輯classpath,將D:\MySQL-connector-java-5.0.5\MySQL-connector-java-5.0.5-bin.jar加到最後,在加這個字元串前要加「;」,以與前一個classpath區分開。然後確定。
package hqs;
import java.sql.*;
public class DataBasePractice {
public static void main(String[] args) {
//聲明Connection對象
Connection con;
//驅動程序名
String driver = "com.mysql.jdbc.Driver";
//URL指向要訪問的資料庫名mydata
String url = "jdbc:mysql://localhost:3306/mydata";
//MySQL配置時的用戶名
String user = "root";
//MySQL配置時的密碼
String password = "root";
//遍歷查詢結果集
try {
//載入驅動程序
Class.forName(driver);
//1.getConnection()方法,連接MySQL資料庫!!
con = DriverManager.getConnection(url,user,password);
if(!con.isClosed())
System.out.println("Succeeded connecting to the Database!");
//2.創建statement類對象,用來執行SQL語句!!
Statement statement = con.createStatement();
//要執行的SQL語句
String sql = "select * from student";
//3.ResultSet類,用來存放獲取的結果集!!
ResultSet rs = statement.executeQuery(sql);
System.out.println("-----------------");
System.out.println("執行結果如下所示:");
System.out.println("-----------------");
System.out.println(" 學號" + "\t" + " 姓名");
System.out.println("-----------------");
String name = null;
String id = null;
while(rs.next()){
//獲取stuname這列數據
name = rs.getString("stuname");
//獲取stuid這列數據
id = rs.getString("stuid");
//首先使用ISO-8859-1字元集將name解碼為位元組序列並將結果存儲新的位元組數組中。
//然後使用GB2312字元集解碼指定的位元組數組。
name = new String(name.getBytes("ISO-8859-1"),"gb2312");
//輸出結果
System.out.println(id + "\t" + name);
}
rs.close();
con.close();
} catch(ClassNotFoundException e) {
//資料庫驅動類異常處理
System.out.println("Sorry,can`t find the Driver!");
e.printStackTrace();
} catch(SQLException e) {
//資料庫連接失敗異常處理
e.printStackTrace();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}finally{
System.out.println("資料庫數據成功獲取!!");
}
}
}
2.添加、修改、刪除操作
在上面while代碼段後面添加以下代碼段:String name = null;
String id = null;
while(rs.next()){
//獲取stuname這列數據
name = rs.getString("stuname");
//獲取stuid這列數據
id = rs.getString("stuid");
//首先使用ISO-8859-1字元集將name解碼為位元組序列並將結果存儲新的位元組數組中。
//然後使用GB2312字元集解碼指定的位元組數組。
name = new String(name.getBytes("ISO-8859-1"),"gb2312");
//輸出結果
System.out.println(id + "\t" + name);
}
PreparedStatement psql;
ResultSet res;
//預處理添加數據,其中有兩個參數--「?」
psql = con.prepareStatement("insert into student values(?,?)");
psql.setInt(1, 8); //設置參數1,創建id為5的數據
psql.setString(2, "xiaogang"); //設置參數2,name 為小明
psql.executeUpdate(); //執行更新
//預處理更新(修改)數據
psql = con.prepareStatement("update student set stuname = ? where stuid = ?");
psql.setString(1,"xiaowang"); //設置參數1,將name改為王五
psql.setInt(2,10); //設置參數2,將id為2的數據做修改
psql.executeUpdate();
//預處理刪除數據
psql = con.prepareStatement("delete from student where stuid = ?");
psql.setInt(1, 5);
psql.executeUpdate();
//查詢修改數據後student表中的數據
psql = con.prepareStatement("select*from student");
res = psql.executeQuery(); //執行預處理sql語句
System.out.println("執行增加、修改、刪除後的數據");
while(res.next()){
name = res.getString("stuname");
id = res.getString("stuid");
name = new String(name.getBytes("ISO-8859-1"),"gb2312");
System.out.println(id + "\t" + name);
}
res.close();
psql.close();
該代碼段使用到了預處理語句:con.prepareStatement(String sql);
這樣生成資料庫底層的內部命令,並將該命令封裝在preparedStatement對象中,可以減輕資料庫負擔,提高訪問資料庫速度。 運行結果:
④ 求一個 基於PHP+Mysql的在線考試系統源碼。。。
也可試試這個"教學測試一體體化處理系統WEB版",網路搜索即可找到。 專門針對學校開發,一體化解決教學測試中的幾乎所有問題。
如果條件允許,可以免費提供。
⑤ 基於web的學生考勤管理系統源代碼
考勤管理系統
java web開發
⑥ 誰有JavaWeb版本的在線考試系統,求完整源代碼
愛考在線考試系統 1.2.1 版本 web瀏覽 全國唯一開源免費在線考試系統 1.支持幾乎所有的題型,包括選擇題,判斷題,填空題,問答題,復合題(選詞,完型填空,閱讀理解),多空選擇題,連線題等; 2.支持智能出卷,讓您可以根據題型,章節(知識分類),試題難度,分值等組成一份完整的試卷; 3.支持在線練習或考試,並能設置考試的考生(或員工)范圍,時間。讓您能輕松組織一場在線考試; 4.支持客觀題自動判卷以及主觀題手動判卷,並能自動核計總分,並統計排名,生成成績分析報表; 5.簡化錄入試題功能,支持智能識別,能極大簡化你的錄入工作; 6.支持共享題庫。讓用戶可以從愛考網下載試題,試卷,讓您分享海量題庫。 免除自己錄題的煩惱; 7.是免費開源的在線考試系統,您不需要為此支付任何費用,並且可以下載源代碼以供學習和研究。
⑦ 在線考試系統如何查看網頁源代碼
查看網頁源代碼?點擊滑鼠右鍵不就行了,但那個只能看到輸出後的HTML,程序的源碼是看不到
⑧ 學生考試管理系統,JAva源代碼
//主類EnglishTest——
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class EnglishTest extends JFrame
{
TestArea testPanel=null;
Container con=null;
public EnglishTest()
{
super("模擬考試");
testPanel=new TestArea();
con=getContentPane();
con.add(testPanel,BorderLayout.CENTER);
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent e)
{ System.exit(0);
}
});
setVisible(true);
setBounds(60,40,660,460);
con.validate();
validate();
}
public static void main(String args[])
{
new EnglishTest();
}
}
//讀取試題 ReadTestquestion
import java.io.*;
import java.util.*;
public class ReadTestquestion
{ String filename="",
correctAnswer="",
testContent="" ,
selection="" ;
int score=0;
long time=0;
boolean 完成考試=false;
File f=null;
FileReader in=null;
BufferedReader 讀取=null;
public void setFilename(String name)
{ filename=name;
score=0;
selection="";
try {
if(in!=null&&讀取!=null)
{
in.close();
讀取.close();
}
f=new File(filename);
in=new FileReader(f);
讀取=new BufferedReader(in);
correctAnswer=(讀取.readLine()).trim();
String temp=(讀取.readLine()).trim() ;
StringTokenizer token=new StringTokenizer(temp,":");
int hour=Integer.parseInt(token.nextToken()) ;
int minute=Integer.parseInt(token.nextToken());
int second=Integer.parseInt(token.nextToken());
time=1000*(second+minute*60+hour*60*60);
}
catch(Exception e)
{
testContent="沒有選擇試題";
}
}
public String getFilename()
{
return filename;
}
public long getTime()
{
return time;
}
public void set完成考試(boolean b)
{
完成考試=b;
}
public boolean get完成考試()
{
return 完成考試;
}
public String getTestContent()
{ try {
String s=null;
StringBuffer temp=new StringBuffer();
if(讀取!=null)
{
while((s=讀取.readLine())!=null)
{
if(s.startsWith("**"))
break;
temp.append("\n"+s);
if(s.startsWith("endend"))
{
in.close();
讀取.close();
完成考試=true;
}
}
testContent=new String(temp);
}
else
{
testContent=new String("沒有選擇試題");
}
}
catch(Exception e)
{
testContent="試題內容為空,考試結束!!";
}
return testContent;
}
public void setSelection(String s)
{
selection=selection+s;
}
public int getScore()
{ score=0;
int length1=selection.length();
int length2=correctAnswer.length();
int min=Math.min(length1,length2);
for(int i=0;i<min;i++)
{ try{
if(selection.charAt(i)==correctAnswer.charAt(i))
score++;
}
catch( e)
{
i=0;
}
}
return score;
}20:10 03-8-31
public String getMessages()
{
int length1=selection.length();
int length2=correctAnswer.length();
int length=Math.min(length1,length2);
String message="正確答案:"+correctAnswer.substring(0,length)+"\n"+
"你的回答:"+selection+"\n";
return message;
}
}
//考試區域TestArea
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
class FileName implements FilenameFilter
{
String str=null;
FileName (String s)
{
str="."+s;
}
public boolean accept(File dir,String name)
{
return name.endsWith(str);
}
}
public class TestArea extends JPanel implements ActionListener,ItemListener,Runnable
{
Choice list=null;
JTextArea 試題顯示區=null,消息區=null;
JCheckBox box[];
JButton 提交該題答案,讀取下一題,查看分數;
ReadTestquestion 讀取試題=null;
JLabel welcomeLabel=null;
Thread countTime=null;
long time=0;
JTextField timeShow=null;
boolean 是否關閉計時器=false,
是否暫停計時=false;
JButton 暫停或繼續計時=null;
public TestArea()
{
list= new Choice();
String 當前目錄=System.getProperty("user.dir");
File dir=new File(當前目錄);
FileName fileTxt=new FileName("txt");
String fileName[]=dir.list(fileTxt);
for(int i=0;i<fileName.length;i++)
{
list.add(fileName[i]);
}
試題顯示區=new JTextArea(15,12);
試題顯示區.setLineWrap(true);
試題顯示區.setWrapStyleWord(true);
試題顯示區.setFont(new Font("TimesRoman",Font.PLAIN,14));
試題顯示區.setForeground(Color.blue);
消息區=new JTextArea(8,8);
消息區.setForeground(Color.blue);
消息區.setLineWrap(true);
消息區.setWrapStyleWord(true);
countTime=new Thread(this);
String s[]={"A","B","C","D"};
box=new JCheckBox[4];
for(int i=0;i<4;i++)
{
box[i]=new JCheckBox(s[i]);
}
暫停或繼續計時=new JButton("暫停計時");
暫停或繼續計時.addActionListener(this);
提交該題答案=new JButton("提交該題答案");
讀取下一題=new JButton("讀取第一題");
讀取下一題.setForeground(Color.blue);
提交該題答案.setForeground(Color.blue);
查看分數=new JButton("查看分數");
查看分數.setForeground(Color.blue);
提交該題答案.setEnabled(false);
提交該題答案.addActionListener(this);
讀取下一題.addActionListener(this);
查看分數.addActionListener(this);
list.addItemListener(this);
讀取試題=new ReadTestquestion();
JPanel pAddbox=new JPanel();
for(int i=0;i<4;i++)
{
pAddbox.add(box[i]);
}
Box boxH1=Box.createVerticalBox(),
boxH2=Box.createVerticalBox(),
baseBox=Box.createHorizontalBox();
boxH1.add(new JLabel("選擇試題文件"));
boxH1.add(list);
boxH1.add(new JScrollPane(消息區));
boxH1.add(查看分數);
timeShow=new JTextField(20);
timeShow.setHorizontalAlignment(SwingConstants.RIGHT);
timeShow.setEditable(false);
JPanel p1=new JPanel();
p1.add(new JLabel("剩餘時間:"));
p1.add(timeShow);
p1.add(暫停或繼續計時);
boxH1.add(p1);
boxH2.add(new JLabel("試題內容:"));
boxH2.add(new JScrollPane(試題顯示區));
JPanel p2=new JPanel();
p2.add(pAddbox);
p2.add(提交該題答案);
p2.add(讀取下一題);
boxH2.add(p2);
baseBox.add(boxH1);
baseBox.add(boxH2);
setLayout(new BorderLayout());
add(baseBox,BorderLayout.CENTER);
welcomeLabel=new JLabel("歡迎考試,提高英語水平",JLabel.CENTER);
welcomeLabel.setFont(new Font("隸書",Font.PLAIN,24));
welcomeLabel.setForeground(Color.blue);
add(welcomeLabel,BorderLayout.NORTH);
}
public void itemStateChanged(ItemEvent e)
{
timeShow.setText(null);
是否關閉計時器=false;
是否暫停計時=false;
暫停或繼續計時.setText("暫停計時");
String name=(String)list.getSelectedItem();
讀取試題.setFilename(name);
讀取試題.set完成考試(false);
time=讀取試題.getTime();
if(countTime.isAlive())
{
是否關閉計時器=true;
countTime.interrupt();
}
countTime=new Thread(this);
消息區.setText(null);
試題顯示區.setText(null);
讀取下一題.setText("讀取第一題");
提交該題答案.setEnabled(false);
讀取下一題.setEnabled(true);
welcomeLabel.setText("歡迎考試,你選擇的試題:"+讀取試題.getFilename());
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==讀取下一題)
{
讀取下一題.setText("讀取下一題");
提交該題答案.setEnabled(true);
String contentTest=讀取試題.getTestContent();
試題顯示區.setText(contentTest);
消息區.setText(null);
讀取下一題.setEnabled(false);
try {
countTime.start();
}
catch(Exception event)
{
}
}
if(e.getSource()==提交該題答案)
{
讀取下一題.setEnabled(true);
提交該題答案.setEnabled(false);
String answer="?";
for(int i=0;i<4;i++)
{
if(box[i].isSelected())
{
answer=box[i].getText();
box[i].setSelected(false);
break;
}
}
讀取試題.setSelection(answer);
}
if(e.getSource()==查看分數)
{
int score=讀取試題.getScore();
String messages=讀取試題.getMessages();
消息區.setText("分數:"+score+"\n"+messages);
}
if(e.getSource()==暫停或繼續計時)
{
if(是否暫停計時==false)
{
暫停或繼續計時.setText("繼續計時");
是否暫停計時=true;
}
else if(是否暫停計時==true)
{
暫停或繼續計時.setText("暫停計時");
是否暫停計時=false;
countTime.interrupt();
}
}
}
public synchronized void run()
{
while(true)
{
if(time<=0)
{
是否關閉計時器=true;
countTime.interrupt();
提交該題答案.setEnabled(false);
讀取下一題.setEnabled(false);
timeShow.setText("用時盡,考試結束");
}
else if(讀取試題.get完成考試())
{
是否關閉計時器=true;
timeShow.setText("考試效果:分數*剩餘時間(秒)="+1.0*讀取試題.getScore()*(time/1000));
countTime.interrupt();
提交該題答案.setEnabled(false);
讀取下一題.setEnabled(false);
}
else if(time>=1)
{
time=time-1000;
long leftTime=time/1000;
long leftHour=leftTime/3600;
long leftMinute=(leftTime-leftHour*3600)/60;
long leftSecond=leftTime%60;
timeShow.setText(""+leftHour+"小時"+leftMinute+"分"+leftSecond+"秒");
}
try
{
Thread.sleep(1000);
}
catch(InterruptedException ee)
{
if(是否關閉計時器==true)
return ;
}
while(是否暫停計時==true)
{
try
{
wait();
}
catch(InterruptedException ee)
{
if(是否暫停計時==false)
{
notifyAll();
}
}
}
}
}
}
⑨ 誰有JavaWeb版本的在線考試系統,求完整源代碼。
基於java web的在線考試系統,我有的。資料庫:mysql
主要功能:注冊、登錄 考試 查詢 等功能