JAVA编程题两道,求大侠给解答一下,跪谢!!
来源:百度知道 编辑:UC知道 时间:2024/06/14 08:02:10
2.编写一个程序,用散列表实现学生成绩单的存储与查询,并将若干个查询结果存放到一个树集中,通过树集实现对查询结果的自动排序,并将排序结果用表格显示出来.
(高分求,麻烦贴出完整代码,或者发到我的QQ邮箱514628360@qq.com 跪谢!!在线等,答案被采纳的追加份)
给你第一个的代码,我做了个相当简单的程序,能满足你说的要求
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import javax.swing.*;
public class doNumber {
private static Text text;
/**
* Launch the application
* @param args
*/
public static void main(String[] args) {
final Display display = Display.getDefault();
final Shell shell = new Shell();
shell.setSize(437, 241);
shell.setText("SWT Application");
//
final Group group = new Group(shell, SWT.NONE);
group.setText("您输入的数字是");
group.setBounds(54, 10, 305, 154);
text = new Text(group, SWT.BORDER);
text.setBounds(35, 31, 224, 72);
String input=JOptionPane.showInputDialog("请输入数字");
int num=Integer.parseInt(input);