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

📄 studentset.java

📁 国外的数据结构与算法分析用书
💻 JAVA
字号:
package Sets;

import Entities.*;
import dslib.dictionary.arrayed.ArrayedPKeyedDictUos;

/**	This class provides static access to the dictionary of
	students which is keyed by student number. */
public class StudentSet
{
	/**	Provides access to the dictionary of departments. */
	public static ArrayedPKeyedDictUos rep;

	public static void displayNames()
	{
		System.out.println("Students");
		System.out.println("Chris Worman, number: 934555, password: 220279");
		System.out.println("Jane Smith, number: 123456, password: 654321");
		System.out.println("Bob Newhart, number: 987654, password: 987654\n");
	}
	
	static //execute only once (never explicitly called though)
	{	
		rep = new ArrayedPKeyedDictUos(10);

		Student s = new Student("Chris Worman", 934555, 220279);
		rep.insert(new Integer(s.studentNum()), s);

		s = new Student("Jane Smith", 123456, 654321);
		rep.insert(new Integer(s.studentNum()), s);
		
		s = new Student("Bob Newheart", 987654, 456789);
		rep.insert(new Integer(s.studentNum()), s);
	}	
}/*	end of StudentSet */

⌨️ 快捷键说明

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