⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 persisttest.java

📁 远程电子考试系统
💻 JAVA
字号:
package fangsoft.testcenter.driver;

import fangsoft.testcenter.model.*;

import java.io.*;

public class PersistTest {
	public static void main(String[] args) {
		Test test = null;
		System.out.println("选择参加的考试: ");
		System.out.println("1.fangsoft Java practice 知识测试选择1");
		System.out.println("2. fangsoft Java certification知识测试选择2");
		String type = "", arg = "";
		BufferedReader buf = new BufferedReader(
				new InputStreamReader(System.in));
		try {
			type = buf.readLine();
		} catch (IOException e) {
			// TODO 自动生成 catch 块
			e.printStackTrace();
		}
		if (type.equals("1"))
			arg = "practice";
		else if (type.equals("2"))
			arg = "certification";
		else
			System.exit(0);
		if (arg.equalsIgnoreCase("certification")) {
			test = new CertTest();
		} else if (arg.equalsIgnoreCase("practice")) {
			test = new PracticeTest();
		} else {
			System.out.println("输入的是不合法的考试类型. "
					+ "只有 PRACTICE 和 CERTIFICATION 类考试!");
			return;
		}
		test.generate();
		test.save(Constants.PERSIST_FILE_NAME);
		System.out.println("Test generated to file \""
				+ Constants.PERSIST_FILE_NAME + "\"");
	}
		
	}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -