Here is a Client/Server connection sample for remote function calls in Java. Map data structures are used to wrap parameters and results. All serializable types are supported in function calls which include String, Vector, and ImageIcon. Multithreading is used to allow multiple client requests simultaneously./*-------------------------------------------- $ java ClientMap4 connecting... socketOut socketIn cmd:login1 writeObject(input:login1) readObject()->output output:LOGIN1 output1:user output2:passwd cmd: */ import java.util.concurrent.*; // Executors import java.util.*; // Vector import java.net.*; // Socket, ServerSocket import java.io.*; // InputStream,InputStreamReader,BufferedReader // OutputStream,PrintWriter import javax.swing.ImageIcon; public class ClientMap4 { final int defaultPort = 1234; static BufferedReader consoleIn; // 控制台輸入流 static PrintStream consoleOut; // 控制台輸出流 static Socket skt; static ObjectInputStream socketIn; // 連線插座輸入流 static ObjectOutputStream socketOut; // 連線插座輸出流 @SuppressWarnings("unchecked") public static void main(String args[]) throws Exception { int port = 1234; if(args.length==1) // 命令列有給埠號參數 port = new Integer(args[0]).intValue(); // 則依命令列埠號 consoleOut = System.err; consoleIn = new BufferedReader(new InputStreamReader(System.in)); consoleOut.printf("connecting...\n"); skt = new Socket("localhost",port); consoleOut.printf("socketOut\n"); OutputStream socketOs = skt.getOutputStream(); socketOut = new ObjectOutputStream(socketOs); consoleOut.printf("socketIn\n"); InputStream socketIs = skt.getInputStream(); socketIn = new ObjectInputStream(socketIs); Map<String, Object> packetOut; Map<String, Object> packetIn; while(true) { String cmd,parm1="user",parm2="passwd"; String output=null,output1=null,output2=null; // 測試字串陣列容器 Vector<String> parm = new Vector<String>(); parm.add(parm1); parm.add(parm2); // 測試結果集容器 Vector<Vector<String>> vecResultSet = new Vector<Vector<String>>(); Vector<String> record1 = new Vector<String>(); record1.add("user_id_1"); record1.add("passwod_1"); record1.add("email_1"); Vector<String> record2 = new Vector<String>(); record2.add("user_id_2"); record2.add("passwod_2"); record2.add("email_2"); vecResultSet.add(record1); vecResultSet.add(record2); // 測試圖片 ImageIcon pic = new ImageIcon("test.jpg"); consoleOut.printf("cmd:"); cmd = consoleIn.readLine(); packetOut = new HashMap<String, Object>(); packetOut.put("cmd",cmd); packetOut.put("parm1",parm1); packetOut.put("parm2",parm2); packetOut.put("parm",parm); packetOut.put("vecResultSet",vecResultSet); packetOut.put("pic", pic); consoleOut.printf("writeObject(input:%s)\n",cmd); socketOut.writeObject(packetOut); socketOut.flush(); consoleOut.printf("readObject()->output\n"); packetIn = (Map<String, Object>) socketIn.readObject(); output = (String) packetIn.get("output"); output1 = (String) packetIn.get("output1"); output2 = (String) packetIn.get("output2"); consoleOut.printf("output:%s\n",output); consoleOut.printf("output1:%s\n",output1); consoleOut.printf("output2:%s\n",output2); } } }/*-------------------------------------------------- $ java ServerMap4 ListenTask: thread:pool-1-thread-1 (9) waiting at port:1234 ServiceTask: thread: pool-1-thread-1 (9) serving /127.0.0.1:59626 ServiceTask: socketOut ServiceTask: socketIn ServiceTask: end of constructor ListenTask: thread:pool-1-thread-1 (9) waiting at port:1234 begin running waiting input cmd=<login1> parm1=<user> parm2=<passwd> parm=<[user, passwd]> vecResultSet=<[[user_id_1, passwod_1, email_1], [user_id_2, passwod_2, email_2]]> pic=width:728,height:90,write to 'test2.jpg' output=<LOGIN1> output1=<user> output2=<passwd> waiting input */ import java.util.concurrent.*; // Executors import java.util.*; // 用到 Vector import java.net.*; // 用到 Socket, ServerSocket import java.io.*; // 用到 InputStream,InputStreamReader,BufferedReader // OutputStream,PrintWriter import javax.imageio.ImageIO; import javax.swing.ImageIcon; import java.awt.Image; import java.awt.image.BufferedImage; import java.awt.Graphics2D; class ServiceTask implements Runnable { BufferedReader consoleIn; // 控制台輸入流 PrintStream consoleOut; // 控制台輸出流 Socket skt; ObjectInputStream socketIn; // 連線插座輸入流 ObjectOutputStream socketOut; // 連線插座輸出流 String host; String port; public ServiceTask(Socket skt) throws IOException { // 取得螢幕輸出流 consoleOut = System.err; // 由連線插座,取得主機,埠號 this.skt = skt; host = skt.getInetAddress().toString(); port = String.valueOf(skt.getPort()); consoleOut.printf("ServiceTask: thread: %s (%d) serving %s:%s\n", Thread.currentThread().getName(), Thread.currentThread().getId(), host,port); // 由連線插座,取得插座輸出入資料流 consoleOut.printf("ServiceTask: socketOut\n"); OutputStream socketOs = skt.getOutputStream(); socketOut = new ObjectOutputStream(socketOs); consoleOut.printf("ServiceTask: socketIn\n"); InputStream socketIs = skt.getInputStream(); socketIn = new ObjectInputStream(socketIs); consoleOut.printf("ServiceTask: end of constructor\n"); } @SuppressWarnings("unchecked") public void run() { consoleOut.printf("\tbegin running\n"); Map<String, Object> packetOut; Map<String, Object> packetIn; // 測試字串陣列容器,結果集容器,圖片 Vector<String> parm; Vector<Vector<String>> vecResultSet; ImageIcon pic; try { // 進行多次對話,直到輸出為QUIT為止 while(true) { consoleOut.printf("\twaiting input\n"); packetIn = (Map<String, Object>) socketIn.readObject(); String cmd = (String) packetIn.get("cmd"); String parm1 = (String) packetIn.get("parm1"); String parm2 = (String) packetIn.get("parm2"); parm = (Vector<String>) packetIn.get("parm"); vecResultSet = (Vector<Vector<String>>)packetIn.get("vecResultSet"); pic = (ImageIcon) packetIn.get("pic"); consoleOut.printf("\tcmd=<%s>\n",cmd); consoleOut.printf("\tparm1=<%s>\n",parm1); consoleOut.printf("\tparm2=<%s>\n",parm2); consoleOut.printf("\tparm=<%s>\n",parm); consoleOut.printf("\tvecResultSet=<%s>\n",vecResultSet); consoleOut.printf("\tpic=width:%d,height:%d,write to '%s'\n",pic.getIconWidth(),pic.getIconHeight(),"test2.jpg"); // save image for comparison Image img = pic.getImage(); BufferedImage bi = new BufferedImage(img.getWidth(null),img.getHeight(null),BufferedImage.TYPE_INT_RGB); Graphics2D g2 = bi.createGraphics(); g2.drawImage(img, 0, 0, null); g2.dispose(); ImageIO.write(bi, "jpg", new File("test2.jpg")); String output = cmd.toUpperCase(); String output1 = parm1; String output2 = parm2; packetOut = new HashMap<String, Object>(); packetOut.put("output",output); packetOut.put("output1",output1); packetOut.put("output2",output2); socketOut.writeObject(packetOut); socketOut.flush(); consoleOut.printf("\toutput=<%s>\n",output); consoleOut.printf("\toutput1=<%s>\n",output1); consoleOut.printf("\toutput2=<%s>\n",output2); if(cmd.equals("quit")) break; // 遇到quit指令結束 } } catch(Exception e) { consoleOut.printf("ServiceTask: exception:%s\n",e); } finally { // 關閉插座資料流和插座本身 try { socketIn.close(); socketOut.close(); skt.close(); } catch(IOException e) { consoleOut.printf("ServiceTask: socket close error:%s\n",e); } } } } class ListenTask implements Runnable { int listenPort; // 監聽埠號 ServerSocket listenSocket; // 監聽插座 PrintStream consoleOut; // 控制台輸出流 ExecutorService pool; // 緒池 public ListenTask(ExecutorService pool, int port) throws IOException { this.listenPort = port; this.pool = pool; consoleOut = System.err; // 建立監聽插座,可能丟例外 listenSocket = new ServerSocket(listenPort); Runnable listenTask = this; Future f = pool.submit(listenTask); } // 監聽緒工作 public void run() { Socket connectedSocket=null; try { while(true) { // 等待新連線 consoleOut.printf("ListenTask: thread:%s (%d) waiting at port:%d\n", Thread.currentThread().getName(), Thread.currentThread().getId(),listenPort); connectedSocket = listenSocket.accept(); // 啟動專屬緒,為新連線服務 Runnable serviceTask = new ServiceTask(connectedSocket); pool.execute(serviceTask); } } catch(IOException e) { consoleOut.printf("ListenTask: accept raised IOException:%s\n",e); System.exit(0); } } } public class ServerMap4 { final int defaultPort = 1234; final ExecutorService pool; public ServerMap4(int port) { pool = Executors.newCachedThreadPool(); // 建立緒池 //pool = Executors.newFixedThreadPool(10); try { if(port < 1024) port = defaultPort; ListenTask listenTask = new ListenTask(pool,port); // 開監聽緒 } catch(IOException e) { System.err.printf("ServerMap4: %s\n", e); } } public static void main(String args[]) throws Exception { int port = -1; if(args.length==1) // 命令列有給埠號參數 port = new Integer(args[0]).intValue(); // 則依命令列埠號 new ServerMap4(port); // 啟動監聽及服務緒 } }
object transfer over Internet in Java
technician, associate, professional, expert, or architect
在網管領域的思科認證當中,一般分成如下五等級, CCENT, Cisco Certified Entry Networking Technician,思科認證初級網路技術士 CCNA, Cisco Certified Network Associate, 思科認證網路技術佐 CCNP, Cisco Certified Network Professional, 思科認證網路技術員 CCIE, Cisco Certified Internetwork Expert, 思科認證連網專家 CCAr, Cisco Certified Architect, 思科認證設計師 其中,Associate(副,佐)因為不好翻譯,一般將CCNA譯為思科認證網路工程師, 結果名詞雖然易懂,但不易了解其級別地位之高低. 又Professional和Expert中文都翻成專家,也造成CCNP及CCIE不易以中文區別, 因此,參考一般公務體系的技術職等多分成士,佐,員三級,將之分配給三級認證,這樣就比較不會混淆. 這樣也產生一個簡單五級中英對照表,如下: 士 technician 佐 associate 員 professional 家 expert 師 architect/master 可供中英互譯等級時之參考. 這其中,比較罕見的是professional譯成技術員, 但為了等級好分,及想將專家保留給expert關係,大致也還可以接受. 文獻: 1.交通事業人員任用條例, http://www.6law.idv.tw/6law/law/%E4%BA%A4%E9%80%9A%E4%BA%8B%E6%A5%AD%E4%BA%BA%E5%93%A1%E4%BB%BB%E7%94%A8%E6%A2%9D%E4%BE%8B.htm 二、技術類;技術長、副技術長、高級技術員、技術員、技術佐、技術士。
how to curve the exam score by the power function
When a class has poor percentage grades, "take the square root and multiply by 10" is a common technique for raising the grades of the entire class. For finer control of the raising curve, an extension from the square root function to the power/exponential function with an extra RATIO parameter is discussed here. The RATIO parameter can take a recommended value between 0 and 1. It can be roughly seen as the proportion by which the original passing threshold of 60 points is reduced. 1 means that the passing threshold is not reduced, and 0.5 means that it is roughly reduced to 60*0.5=30 points to pass.
Assume the original grade is Old_Score in the range of [0,100] points and the adjusted grade is New_Score in the range of [0,100] points as well. Then using the parameter Ratio in the range of [0,1], the following EXCEL formula for exam score adjustment can be defined:
where ROUNDUP(X,Y) will round X up to the Y decimal places and POWER(X,Y) will compute the result of X raised to the power of Y. Both are EXCEL built-in functions.
Some comments about the above exam score curving formula can be made:
Therefore by properly using Ratio from high (1) to low (0), a spectrum of curving from no adjustment to extreme upward adjustment can be fine tuned. A graph of the curves for different Ratios is shown below. The traditional square root curve is labeled with adjusted scores.
A table for the curving formula is listed below. Each column represents a curving result for a specific Ratio from 0.1 to 1.1 in steps of 0.1. Note that grades in pink color are below 60, the usual passing threshold. Also, when the ratio is 1.1, some scores will decrease, resulting in the undesirable effect of passing grades becoming failing grades.
To see the distribution of boost, a graph and a table showing the score boost (or difference) before and after the adjustment are given below. It can be seen that as Ratio increases, the maximum score boost decreases and occurs at greater original scores. For example, at Ratio=0.3, a maximum score boost of 42 occurs in the interval of Old_Score=[13,24]. At Ratio=0.5, a maximum score boost of 25 occurs in the interval of Old_Score=[17,35]. And at Ratio=0.7, a maximum score boost of 14 occurs in the interval of Old_Score=[28,33].
In the following table, each column represents the score boost for a specific Ratio. Maximum score boost in each column is marked in pink color.
In conclusion, the traditional square root curving method is a special case of the discussed power/exponential curving method. Compared to the square root curving method, the power/exponential curving method with a single tuning parameter can give you an easier and finer control of the entire class grades to meet your desired statistics (say, the average or the flunk ratio) requirement.
References:
1.Richeson (2008), How to curve an exam and assign grades, root functions
2.Nicolai (2008), How to Curve an Exam
Assume the original grade is Old_Score in the range of [0,100] points and the adjusted grade is New_Score in the range of [0,100] points as well. Then using the parameter Ratio in the range of [0,1], the following EXCEL formula for exam score adjustment can be defined:
New_Score = ROUNDUP(POWER(Old_Score,Ratio)*100/POWER(100,Ratio),0)
where ROUNDUP(X,Y) will round X up to the Y decimal places and POWER(X,Y) will compute the result of X raised to the power of Y. Both are EXCEL built-in functions.
Some comments about the above exam score curving formula can be made:
- When Ratio is equal to 1, New_Score is equal to Old_Score which means no adjustment.
- When Ratio is equal to 0.5, New_Score is equal to the square root of Old_Score multiplied by 10 which means the traditional square root curving.
- When Ratio is equal to 0, New_Score is equal to 100 for all Old_Score except 0 which means the extreme adjustment.
- For all Ratio in the range of [0,1], this formula will only give non-decreasing adjustment. It means that all adjusted grades will be greater than or equal to the original grades and never exceed the full score of 100 points.
Therefore by properly using Ratio from high (1) to low (0), a spectrum of curving from no adjustment to extreme upward adjustment can be fine tuned. A graph of the curves for different Ratios is shown below. The traditional square root curve is labeled with adjusted scores.
A table for the curving formula is listed below. Each column represents a curving result for a specific Ratio from 0.1 to 1.1 in steps of 0.1. Note that grades in pink color are below 60, the usual passing threshold. Also, when the ratio is 1.1, some scores will decrease, resulting in the undesirable effect of passing grades becoming failing grades.
| Ratio | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1 | 1.1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 64 | 40 | 26 | 16 | 10 | 7 | 4 | 3 | 2 | 1 | 1 |
| 2 | 68 | 46 | 31 | 21 | 15 | 10 | 7 | 5 | 3 | 2 | 2 |
| 3 | 71 | 50 | 35 | 25 | 18 | 13 | 9 | 7 | 5 | 3 | 3 |
| 4 | 73 | 53 | 39 | 28 | 20 | 15 | 11 | 8 | 6 | 4 | 3 |
| 5 | 75 | 55 | 41 | 31 | 23 | 17 | 13 | 10 | 7 | 5 | 4 |
| 6 | 76 | 57 | 43 | 33 | 25 | 19 | 14 | 11 | 8 | 6 | 5 |
| 7 | 77 | 59 | 46 | 35 | 27 | 21 | 16 | 12 | 10 | 7 | 6 |
| 8 | 78 | 61 | 47 | 37 | 29 | 22 | 18 | 14 | 11 | 8 | 7 |
| 9 | 79 | 62 | 49 | 39 | 30 | 24 | 19 | 15 | 12 | 9 | 8 |
| 10 | 80 | 64 | 51 | 40 | 32 | 26 | 20 | 16 | 13 | 10 | 8 |
| 11 | 81 | 65 | 52 | 42 | 34 | 27 | 22 | 18 | 14 | 11 | 9 |
| 12 | 81 | 66 | 53 | 43 | 35 | 29 | 23 | 19 | 15 | 12 | 10 |
| 13 | 82 | 67 | 55 | 45 | 37 | 30 | 24 | 20 | 16 | 13 | 11 |
| 14 | 83 | 68 | 56 | 46 | 38 | 31 | 26 | 21 | 18 | 14 | 12 |
| 15 | 83 | 69 | 57 | 47 | 39 | 33 | 27 | 22 | 19 | 15 | 13 |
| 16 | 84 | 70 | 58 | 49 | 40 | 34 | 28 | 24 | 20 | 16 | 14 |
| 17 | 84 | 71 | 59 | 50 | 42 | 35 | 29 | 25 | 21 | 17 | 15 |
| 18 | 85 | 71 | 60 | 51 | 43 | 36 | 31 | 26 | 22 | 18 | 16 |
| 19 | 85 | 72 | 61 | 52 | 44 | 37 | 32 | 27 | 23 | 19 | 17 |
| 20 | 86 | 73 | 62 | 53 | 45 | 39 | 33 | 28 | 24 | 20 | 18 |
| 21 | 86 | 74 | 63 | 54 | 46 | 40 | 34 | 29 | 25 | 21 | 18 |
| 22 | 86 | 74 | 64 | 55 | 47 | 41 | 35 | 30 | 26 | 22 | 19 |
| 23 | 87 | 75 | 65 | 56 | 48 | 42 | 36 | 31 | 27 | 23 | 20 |
| 24 | 87 | 76 | 66 | 57 | 49 | 43 | 37 | 32 | 28 | 24 | 21 |
| 25 | 88 | 76 | 66 | 58 | 50 | 44 | 38 | 33 | 29 | 25 | 22 |
| 26 | 88 | 77 | 67 | 59 | 51 | 45 | 39 | 35 | 30 | 26 | 23 |
| 27 | 88 | 77 | 68 | 60 | 52 | 46 | 40 | 36 | 31 | 27 | 24 |
| 28 | 89 | 78 | 69 | 61 | 53 | 47 | 42 | 37 | 32 | 28 | 25 |
| 29 | 89 | 79 | 69 | 61 | 54 | 48 | 43 | 38 | 33 | 29 | 26 |
| 30 | 89 | 79 | 70 | 62 | 55 | 49 | 44 | 39 | 34 | 30 | 27 |
| 31 | 89 | 80 | 71 | 63 | 56 | 50 | 45 | 40 | 35 | 31 | 28 |
| 32 | 90 | 80 | 72 | 64 | 57 | 51 | 46 | 41 | 36 | 32 | 29 |
| 33 | 90 | 81 | 72 | 65 | 58 | 52 | 47 | 42 | 37 | 33 | 30 |
| 34 | 90 | 81 | 73 | 65 | 59 | 53 | 47 | 43 | 38 | 34 | 31 |
| 35 | 91 | 82 | 73 | 66 | 60 | 54 | 48 | 44 | 39 | 35 | 32 |
| 36 | 91 | 82 | 74 | 67 | 60 | 55 | 49 | 45 | 40 | 36 | 33 |
| 37 | 91 | 82 | 75 | 68 | 61 | 56 | 50 | 46 | 41 | 37 | 34 |
| 38 | 91 | 83 | 75 | 68 | 62 | 56 | 51 | 47 | 42 | 38 | 35 |
| 39 | 92 | 83 | 76 | 69 | 63 | 57 | 52 | 48 | 43 | 39 | 36 |
| 40 | 92 | 84 | 76 | 70 | 64 | 58 | 53 | 49 | 44 | 40 | 37 |
| 41 | 92 | 84 | 77 | 71 | 65 | 59 | 54 | 50 | 45 | 41 | 38 |
| 42 | 92 | 85 | 78 | 71 | 65 | 60 | 55 | 50 | 46 | 42 | 39 |
| 43 | 92 | 85 | 78 | 72 | 66 | 61 | 56 | 51 | 47 | 43 | 40 |
| 44 | 93 | 85 | 79 | 73 | 67 | 62 | 57 | 52 | 48 | 44 | 41 |
| 45 | 93 | 86 | 79 | 73 | 68 | 62 | 58 | 53 | 49 | 45 | 42 |
| 46 | 93 | 86 | 80 | 74 | 68 | 63 | 59 | 54 | 50 | 46 | 43 |
| 47 | 93 | 86 | 80 | 74 | 69 | 64 | 59 | 55 | 51 | 47 | 44 |
| 48 | 93 | 87 | 81 | 75 | 70 | 65 | 60 | 56 | 52 | 48 | 45 |
| 49 | 94 | 87 | 81 | 76 | 70 | 66 | 61 | 57 | 53 | 49 | 46 |
| 50 | 94 | 88 | 82 | 76 | 71 | 66 | 62 | 58 | 54 | 50 | 47 |
| 51 | 94 | 88 | 82 | 77 | 72 | 67 | 63 | 59 | 55 | 51 | 48 |
| 52 | 94 | 88 | 83 | 77 | 73 | 68 | 64 | 60 | 56 | 52 | 49 |
| 53 | 94 | 89 | 83 | 78 | 73 | 69 | 65 | 61 | 57 | 53 | 50 |
| 54 | 95 | 89 | 84 | 79 | 74 | 70 | 65 | 62 | 58 | 54 | 51 |
| 55 | 95 | 89 | 84 | 79 | 75 | 70 | 66 | 62 | 59 | 55 | 52 |
| 56 | 95 | 90 | 85 | 80 | 75 | 71 | 67 | 63 | 60 | 56 | 53 |
| 57 | 95 | 90 | 85 | 80 | 76 | 72 | 68 | 64 | 61 | 57 | 54 |
| 58 | 95 | 90 | 85 | 81 | 77 | 73 | 69 | 65 | 62 | 58 | 55 |
| 59 | 95 | 90 | 86 | 81 | 77 | 73 | 70 | 66 | 63 | 59 | 56 |
| 60 | 96 | 91 | 86 | 82 | 78 | 74 | 70 | 67 | 64 | 60 | 58 |
| 61 | 96 | 91 | 87 | 83 | 79 | 75 | 71 | 68 | 65 | 61 | 59 |
| 62 | 96 | 91 | 87 | 83 | 79 | 76 | 72 | 69 | 66 | 62 | 60 |
| 63 | 96 | 92 | 88 | 84 | 80 | 76 | 73 | 70 | 66 | 63 | 61 |
| 64 | 96 | 92 | 88 | 84 | 80 | 77 | 74 | 70 | 67 | 64 | 62 |
| 65 | 96 | 92 | 88 | 85 | 81 | 78 | 74 | 71 | 68 | 65 | 63 |
| 66 | 96 | 93 | 89 | 85 | 82 | 78 | 75 | 72 | 69 | 66 | 64 |
| 67 | 97 | 93 | 89 | 86 | 82 | 79 | 76 | 73 | 70 | 67 | 65 |
| 68 | 97 | 93 | 90 | 86 | 83 | 80 | 77 | 74 | 71 | 68 | 66 |
| 69 | 97 | 93 | 90 | 87 | 84 | 81 | 78 | 75 | 72 | 69 | 67 |
| 70 | 97 | 94 | 90 | 87 | 84 | 81 | 78 | 76 | 73 | 70 | 68 |
| 71 | 97 | 94 | 91 | 88 | 85 | 82 | 79 | 77 | 74 | 71 | 69 |
| 72 | 97 | 94 | 91 | 88 | 85 | 83 | 80 | 77 | 75 | 72 | 70 |
| 73 | 97 | 94 | 91 | 89 | 86 | 83 | 81 | 78 | 76 | 73 | 71 |
| 74 | 98 | 95 | 92 | 89 | 87 | 84 | 81 | 79 | 77 | 74 | 72 |
| 75 | 98 | 95 | 92 | 90 | 87 | 85 | 82 | 80 | 78 | 75 | 73 |
| 76 | 98 | 95 | 93 | 90 | 88 | 85 | 83 | 81 | 79 | 76 | 74 |
| 77 | 98 | 95 | 93 | 91 | 88 | 86 | 84 | 82 | 80 | 77 | 76 |
| 78 | 98 | 96 | 93 | 91 | 89 | 87 | 85 | 82 | 80 | 78 | 77 |
| 79 | 98 | 96 | 94 | 92 | 89 | 87 | 85 | 83 | 81 | 79 | 78 |
| 80 | 98 | 96 | 94 | 92 | 90 | 88 | 86 | 84 | 82 | 80 | 79 |
| 81 | 98 | 96 | 94 | 92 | 90 | 89 | 87 | 85 | 83 | 81 | 80 |
| 82 | 99 | 97 | 95 | 93 | 91 | 89 | 88 | 86 | 84 | 82 | 81 |
| 83 | 99 | 97 | 95 | 93 | 92 | 90 | 88 | 87 | 85 | 83 | 82 |
| 84 | 99 | 97 | 95 | 94 | 92 | 91 | 89 | 87 | 86 | 84 | 83 |
| 85 | 99 | 97 | 96 | 94 | 93 | 91 | 90 | 88 | 87 | 85 | 84 |
| 86 | 99 | 98 | 96 | 95 | 93 | 92 | 90 | 89 | 88 | 86 | 85 |
| 87 | 99 | 98 | 96 | 95 | 94 | 92 | 91 | 90 | 89 | 87 | 86 |
| 88 | 99 | 98 | 97 | 96 | 94 | 93 | 92 | 91 | 90 | 88 | 87 |
| 89 | 99 | 98 | 97 | 96 | 95 | 94 | 93 | 92 | 91 | 89 | 88 |
| 90 | 99 | 98 | 97 | 96 | 95 | 94 | 93 | 92 | 91 | 90 | 90 |
| 91 | 100 | 99 | 98 | 97 | 96 | 95 | 94 | 93 | 92 | 91 | 91 |
| 92 | 100 | 99 | 98 | 97 | 96 | 96 | 95 | 94 | 93 | 92 | 92 |
| 93 | 100 | 99 | 98 | 98 | 97 | 96 | 96 | 95 | 94 | 93 | 93 |
| 94 | 100 | 99 | 99 | 98 | 97 | 97 | 96 | 96 | 95 | 94 | 94 |
| 95 | 100 | 99 | 99 | 98 | 98 | 97 | 97 | 96 | 96 | 95 | 95 |
| 96 | 100 | 100 | 99 | 99 | 98 | 98 | 98 | 97 | 97 | 96 | 96 |
| 97 | 100 | 100 | 100 | 99 | 99 | 99 | 98 | 98 | 98 | 97 | 97 |
| 98 | 100 | 100 | 100 | 100 | 99 | 99 | 99 | 99 | 99 | 98 | 98 |
| 99 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 99 | 99 |
| 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 | 100 |
To see the distribution of boost, a graph and a table showing the score boost (or difference) before and after the adjustment are given below. It can be seen that as Ratio increases, the maximum score boost decreases and occurs at greater original scores. For example, at Ratio=0.3, a maximum score boost of 42 occurs in the interval of Old_Score=[13,24]. At Ratio=0.5, a maximum score boost of 25 occurs in the interval of Old_Score=[17,35]. And at Ratio=0.7, a maximum score boost of 14 occurs in the interval of Old_Score=[28,33].
In the following table, each column represents the score boost for a specific Ratio. Maximum score boost in each column is marked in pink color.
| Ratio | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1 | 1.1 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| 1 | 63 | 39 | 25 | 15 | 9 | 6 | 3 | 2 | 1 | 0 | 0 |
| 2 | 66 | 44 | 29 | 19 | 13 | 8 | 5 | 3 | 1 | 0 | 0 |
| 3 | 68 | 47 | 32 | 22 | 15 | 10 | 6 | 4 | 2 | 0 | 0 |
| 4 | 69 | 49 | 35 | 24 | 16 | 11 | 7 | 4 | 2 | 0 | -1 |
| 5 | 70 | 50 | 36 | 26 | 18 | 12 | 8 | 5 | 2 | 0 | -1 |
| 6 | 70 | 51 | 37 | 27 | 19 | 13 | 8 | 5 | 2 | 0 | -1 |
| 7 | 70 | 52 | 39 | 28 | 20 | 14 | 9 | 5 | 3 | 0 | -1 |
| 8 | 70 | 53 | 39 | 29 | 21 | 14 | 10 | 6 | 3 | 0 | -1 |
| 9 | 70 | 53 | 40 | 30 | 21 | 15 | 10 | 6 | 3 | 0 | -1 |
| 10 | 70 | 54 | 41 | 30 | 22 | 16 | 10 | 6 | 3 | 0 | -2 |
| 11 | 70 | 54 | 41 | 31 | 23 | 16 | 11 | 7 | 3 | 0 | -2 |
| 12 | 69 | 54 | 41 | 31 | 23 | 17 | 11 | 7 | 3 | 0 | -2 |
| 13 | 69 | 54 | 42 | 32 | 24 | 17 | 11 | 7 | 3 | 0 | -2 |
| 14 | 69 | 54 | 42 | 32 | 24 | 17 | 12 | 7 | 4 | 0 | -2 |
| 15 | 68 | 54 | 42 | 32 | 24 | 18 | 12 | 7 | 4 | 0 | -2 |
| 16 | 68 | 54 | 42 | 33 | 24 | 18 | 12 | 8 | 4 | 0 | -2 |
| 17 | 67 | 54 | 42 | 33 | 25 | 18 | 12 | 8 | 4 | 0 | -2 |
| 18 | 67 | 53 | 42 | 33 | 25 | 18 | 13 | 8 | 4 | 0 | -2 |
| 19 | 66 | 53 | 42 | 33 | 25 | 18 | 13 | 8 | 4 | 0 | -2 |
| 20 | 66 | 53 | 42 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -2 |
| 21 | 65 | 53 | 42 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -3 |
| 22 | 64 | 52 | 42 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -3 |
| 23 | 64 | 52 | 42 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -3 |
| 24 | 63 | 52 | 42 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -3 |
| 25 | 63 | 51 | 41 | 33 | 25 | 19 | 13 | 8 | 4 | 0 | -3 |
| 26 | 62 | 51 | 41 | 33 | 25 | 19 | 13 | 9 | 4 | 0 | -3 |
| 27 | 61 | 50 | 41 | 33 | 25 | 19 | 13 | 9 | 4 | 0 | -3 |
| 28 | 61 | 50 | 41 | 33 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 29 | 60 | 50 | 40 | 32 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 30 | 59 | 49 | 40 | 32 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 31 | 58 | 49 | 40 | 32 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 32 | 58 | 48 | 40 | 32 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 33 | 57 | 48 | 39 | 32 | 25 | 19 | 14 | 9 | 4 | 0 | -3 |
| 34 | 56 | 47 | 39 | 31 | 25 | 19 | 13 | 9 | 4 | 0 | -3 |
| 35 | 56 | 47 | 38 | 31 | 25 | 19 | 13 | 9 | 4 | 0 | -3 |
| 36 | 55 | 46 | 38 | 31 | 24 | 19 | 13 | 9 | 4 | 0 | -3 |
| 37 | 54 | 45 | 38 | 31 | 24 | 19 | 13 | 9 | 4 | 0 | -3 |
| 38 | 53 | 45 | 37 | 30 | 24 | 18 | 13 | 9 | 4 | 0 | -3 |
| 39 | 53 | 44 | 37 | 30 | 24 | 18 | 13 | 9 | 4 | 0 | -3 |
| 40 | 52 | 44 | 36 | 30 | 24 | 18 | 13 | 9 | 4 | 0 | -3 |
| 41 | 51 | 43 | 36 | 30 | 24 | 18 | 13 | 9 | 4 | 0 | -3 |
| 42 | 50 | 43 | 36 | 29 | 23 | 18 | 13 | 8 | 4 | 0 | -3 |
| 43 | 49 | 42 | 35 | 29 | 23 | 18 | 13 | 8 | 4 | 0 | -3 |
| 44 | 49 | 41 | 35 | 29 | 23 | 18 | 13 | 8 | 4 | 0 | -3 |
| 45 | 48 | 41 | 34 | 28 | 23 | 17 | 13 | 8 | 4 | 0 | -3 |
| 46 | 47 | 40 | 34 | 28 | 22 | 17 | 13 | 8 | 4 | 0 | -3 |
| 47 | 46 | 39 | 33 | 27 | 22 | 17 | 12 | 8 | 4 | 0 | -3 |
| 48 | 45 | 39 | 33 | 27 | 22 | 17 | 12 | 8 | 4 | 0 | -3 |
| 49 | 45 | 38 | 32 | 27 | 21 | 17 | 12 | 8 | 4 | 0 | -3 |
| 50 | 44 | 38 | 32 | 26 | 21 | 16 | 12 | 8 | 4 | 0 | -3 |
| 51 | 43 | 37 | 31 | 26 | 21 | 16 | 12 | 8 | 4 | 0 | -3 |
| 52 | 42 | 36 | 31 | 25 | 21 | 16 | 12 | 8 | 4 | 0 | -3 |
| 53 | 41 | 36 | 30 | 25 | 20 | 16 | 12 | 8 | 4 | 0 | -3 |
| 54 | 41 | 35 | 30 | 25 | 20 | 16 | 11 | 8 | 4 | 0 | -3 |
| 55 | 40 | 34 | 29 | 24 | 20 | 15 | 11 | 7 | 4 | 0 | -3 |
| 56 | 39 | 34 | 29 | 24 | 19 | 15 | 11 | 7 | 4 | 0 | -3 |
| 57 | 38 | 33 | 28 | 23 | 19 | 15 | 11 | 7 | 4 | 0 | -3 |
| 58 | 37 | 32 | 27 | 23 | 19 | 15 | 11 | 7 | 4 | 0 | -3 |
| 59 | 36 | 31 | 27 | 22 | 18 | 14 | 11 | 7 | 4 | 0 | -3 |
| 60 | 36 | 31 | 26 | 22 | 18 | 14 | 10 | 7 | 4 | 0 | -2 |
| 61 | 35 | 30 | 26 | 22 | 18 | 14 | 10 | 7 | 4 | 0 | -2 |
| 62 | 34 | 29 | 25 | 21 | 17 | 14 | 10 | 7 | 4 | 0 | -2 |
| 63 | 33 | 29 | 25 | 21 | 17 | 13 | 10 | 7 | 3 | 0 | -2 |
| 64 | 32 | 28 | 24 | 20 | 16 | 13 | 10 | 6 | 3 | 0 | -2 |
| 65 | 31 | 27 | 23 | 20 | 16 | 13 | 9 | 6 | 3 | 0 | -2 |
| 66 | 30 | 27 | 23 | 19 | 16 | 12 | 9 | 6 | 3 | 0 | -2 |
| 67 | 30 | 26 | 22 | 19 | 15 | 12 | 9 | 6 | 3 | 0 | -2 |
| 68 | 29 | 25 | 22 | 18 | 15 | 12 | 9 | 6 | 3 | 0 | -2 |
| 69 | 28 | 24 | 21 | 18 | 15 | 12 | 9 | 6 | 3 | 0 | -2 |
| 70 | 27 | 24 | 20 | 17 | 14 | 11 | 8 | 6 | 3 | 0 | -2 |
| 71 | 26 | 23 | 20 | 17 | 14 | 11 | 8 | 6 | 3 | 0 | -2 |
| 72 | 25 | 22 | 19 | 16 | 13 | 11 | 8 | 5 | 3 | 0 | -2 |
| 73 | 24 | 21 | 18 | 16 | 13 | 10 | 8 | 5 | 3 | 0 | -2 |
| 74 | 24 | 21 | 18 | 15 | 13 | 10 | 7 | 5 | 3 | 0 | -2 |
| 75 | 23 | 20 | 17 | 15 | 12 | 10 | 7 | 5 | 3 | 0 | -2 |
| 76 | 22 | 19 | 17 | 14 | 12 | 9 | 7 | 5 | 3 | 0 | -2 |
| 77 | 21 | 18 | 16 | 14 | 11 | 9 | 7 | 5 | 3 | 0 | -1 |
| 78 | 20 | 18 | 15 | 13 | 11 | 9 | 7 | 4 | 2 | 0 | -1 |
| 79 | 19 | 17 | 15 | 13 | 10 | 8 | 6 | 4 | 2 | 0 | -1 |
| 80 | 18 | 16 | 14 | 12 | 10 | 8 | 6 | 4 | 2 | 0 | -1 |
| 81 | 17 | 15 | 13 | 11 | 9 | 8 | 6 | 4 | 2 | 0 | -1 |
| 82 | 17 | 15 | 13 | 11 | 9 | 7 | 6 | 4 | 2 | 0 | -1 |
| 83 | 16 | 14 | 12 | 10 | 9 | 7 | 5 | 4 | 2 | 0 | -1 |
| 84 | 15 | 13 | 11 | 10 | 8 | 7 | 5 | 3 | 2 | 0 | -1 |
| 85 | 14 | 12 | 11 | 9 | 8 | 6 | 5 | 3 | 2 | 0 | -1 |
| 86 | 13 | 12 | 10 | 9 | 7 | 6 | 4 | 3 | 2 | 0 | -1 |
| 87 | 12 | 11 | 9 | 8 | 7 | 5 | 4 | 3 | 2 | 0 | -1 |
| 88 | 11 | 10 | 9 | 8 | 6 | 5 | 4 | 3 | 2 | 0 | -1 |
| 89 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 0 | -1 |
| 90 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 0 |
| 91 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | 0 |
| 92 | 8 | 7 | 6 | 5 | 4 | 4 | 3 | 2 | 1 | 0 | 0 |
| 93 | 7 | 6 | 5 | 5 | 4 | 3 | 3 | 2 | 1 | 0 | 0 |
| 94 | 6 | 5 | 5 | 4 | 3 | 3 | 2 | 2 | 1 | 0 | 0 |
| 95 | 5 | 4 | 4 | 3 | 3 | 2 | 2 | 1 | 1 | 0 | 0 |
| 96 | 4 | 4 | 3 | 3 | 2 | 2 | 2 | 1 | 1 | 0 | 0 |
| 97 | 3 | 3 | 3 | 2 | 2 | 2 | 1 | 1 | 1 | 0 | 0 |
| 98 | 2 | 2 | 2 | 2 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
| 99 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 |
| 100 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
In conclusion, the traditional square root curving method is a special case of the discussed power/exponential curving method. Compared to the square root curving method, the power/exponential curving method with a single tuning parameter can give you an easier and finer control of the entire class grades to meet your desired statistics (say, the average or the flunk ratio) requirement.
References:
1.Richeson (2008), How to curve an exam and assign grades, root functions
2.Nicolai (2008), How to Curve an Exam
訂閱:
文章 (Atom)
how to call Java classes in a web page by cheerpj
🚀 在瀏覽器中直接執行 Java:CheerpJ v3 實作指南 長期以來,Java Applets 因為安全性與插件問題早已退出歷史舞台。但隨著 WebAssembly (Wasm) 技術的成熟,現在網頁安裝如下 CheerpJ v3 套件庫,就可以在瀏覽器中直接呼叫 ...