网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

java评分源代码 评分系统源码

求JAVA评委打分代码

正好我闲着,给你写一个吧。

创新互联专注于惠山企业网站建设,成都响应式网站建设,电子商务商城网站建设。惠山网站建设公司,为惠山等地区提供建站服务。全流程按需求定制网站,专业设计,全程项目跟踪,创新互联专业和态度为您提供的服务

我写的这个评委分数是在代码里固定到数组里了,如果你需要运行时手动输入评分,可以将oldScores里的数据改成手动输入就行了(这个不用我再写了吧,如果不会再追问,再告诉你)。

你先新建一个类,将下面的main方法全部复制进去就能运行了,自己看一下吧。

/** 主方法 */

public static void main(String[] args)

{

/** 保存原始评分的数组(如果你需要运行时手动输入分数,将 oldScores中的数据改成手动输入就行了 */

double[] oldScores = {15, 77, 55, 88, 79, 98, 67, 89, 68, 88};

/** 最终将用来保存排序后的数组 */

double[] scores = new double[oldScores.length];

double temp;

/** 平均分 */

double avg = 0;

int k;

/** 将原始评分放入最终排序数组 */

for (int i = 0; i  oldScores.length; i++)

{

scores[i] = oldScores[i];

}

/** 开始排序 */

for (int i = 0; i  scores.length - 1; i++)

{

k = i;

for (int j = i + 1; j  scores.length; j++)

{

if (scores[k]  scores[j])

{

k = j;

}

}

if (i != k)

{

temp = scores[k];

scores[k] = scores[i];

scores[i] = temp;

}

}

/** 计算去掉最高分和最低分之后的和 */

double sum = 0;

/** 记录计算平均分的分数个数 */

double num = 0;

for (int i = 1; i  scores.length - 1; i++)

{

num++;

sum += scores[i];

}

/** 计算平均分 */

avg = sum / num;

/** 最公平的肯定不是在scores数组两端 */

double zgp = 0;

double cha = 0;

/** 标记与平均值差值最小的分数位置 */

int flag = 0;

/** 开始寻找最公平评分 */

for (int i = 1; i  scores.length - 1; i++)

{

/** 为cha赋初始值,注意比较差值要使用绝对值比较 */

if (i == 1)

{

cha = Math.abs(scores[i] - avg);

}

double cha1 = Math.abs(scores[i] - avg);

if (cha1  cha)

{

cha = cha1;

flag = i;

}

}

zgp = scores[flag];

/** 由于最不公平的分数肯定在scores数组的第一个或者是最后一个 */

double bgp = 0;

if (Math.abs(scores[0] - avg)  Math.abs(scores[scores.length - 1] - avg))

{

bgp = scores[0];

}

else

{

bgp = scores[scores.length - 1];

}

/** 全部计算完成,下面开始输出结果 */

System.out.println("原始评委分数如下:");

for (int i = 0; i  oldScores.length; i++)

{

System.out.print(oldScores[i] + ", ");

}

System.out.println();

System.out.println("排序后分数如下:");

for (int i = 0; i  scores.length; i++)

{

System.out.print(scores[i] + ", ");

}

System.out.println();

System.out.println("去掉最高分和最低分后平均分:" + avg);

System.out.println("最公平分数:" + zgp);

System.out.println("最不公平分数:" + bgp);

}

什么是java源代码 怎么查看

你说的java源代码是指编译成的class文件前的java文件。

当我们运行.java文件时,它会被系统编译成.class文件,例如Test.java编译之后就是Test.class,

源文件就是指Test.java文件,

一般部署项目时,有.class文件就可以发布运行了,但是如果想修改这个系统,.class是不能修改的,要有.java文件才能修改

也可以上网去下反编译软件,就是能把.class文件大部分还原成.java文件的工具,但不是100%还原,而且如果不是正版的,小心有毒啊,什么的。

JAVA代码

连连看java源代码

import javax.swing.*;

import java.awt.*;

import java.awt.event.*;

public class lianliankan implements ActionListener

{

JFrame mainFrame; //主面板

Container thisContainer;

JPanel centerPanel,southPanel,northPanel; //子面板

JButton diamondsButton[][] = new JButton[6][5];//游戏按钮数组

JButton exitButton,resetButton,newlyButton; //退出,重列,重新开始按钮

JLabel fractionLable=new JLabel("0"); //分数标签

JButton firstButton,secondButton; //分别记录两次被选中的按钮

int grid[][] = new int[8][7];//储存游戏按钮位置

static boolean pressInformation=false; //判断是否有按钮被选中

int x0=0,y0=0,x=0,y=0,fristMsg=0,secondMsg=0,validateLV; //游戏按钮的位置坐标

int i,j,k,n;//消除方法控制

public void init(){

mainFrame=new JFrame("JKJ连连看");

thisContainer = mainFrame.getContentPane();

thisContainer.setLayout(new BorderLayout());

centerPanel=new JPanel();

southPanel=new JPanel();

northPanel=new JPanel();

thisContainer.add(centerPanel,"Center");

thisContainer.add(southPanel,"South");

thisContainer.add(northPanel,"North");

centerPanel.setLayout(new GridLayout(6,5));

for(int cols = 0;cols 6;cols++){

for(int rows = 0;rows 5;rows++ ){

diamondsButton[cols][rows]=new JButton(String.valueOf(grid[cols+1][rows+1]));

diamondsButton[cols][rows].addActionListener(this);

centerPanel.add(diamondsButton[cols][rows]);

}

}

exitButton=new JButton("退出");

exitButton.addActionListener(this);

resetButton=new JButton("重列");

resetButton.addActionListener(this);

newlyButton=new JButton("再来一局");

newlyButton.addActionListener(this);

southPanel.add(exitButton);

southPanel.add(resetButton);

southPanel.add(newlyButton);

fractionLable.setText(String.valueOf(Integer.parseInt(fractionLable.getText())));

northPanel.add(fractionLable);

mainFrame.setBounds(280,100,500,450);

mainFrame.setVisible(true);

}

public void randomBuild() {

int randoms,cols,rows;

for(int twins=1;twins=15;twins++) {

randoms=(int)(Math.random()*25+1);

for(int alike=1;alike=2;alike++) {

cols=(int)(Math.random()*6+1);

rows=(int)(Math.random()*5+1);

while(grid[cols][rows]!=0) {

cols=(int)(Math.random()*6+1);

rows=(int)(Math.random()*5+1);

}

this.grid[cols][rows]=randoms;

}

}

}

public void fraction(){

fractionLable.setText(String.valueOf(Integer.parseInt(fractionLable.getText())+100));

}

public void reload() {

int save[] = new int[30];

int n=0,cols,rows;

int grid[][]= new int[8][7];

for(int i=0;i=6;i++) {

for(int j=0;j=5;j++) {

if(this.grid[i][j]!=0) {

save[n]=this.grid[i][j];

n++;

}

}

}

n=n-1;

this.grid=grid;

while(n=0) {

cols=(int)(Math.random()*6+1);

rows=(int)(Math.random()*5+1);

while(grid[cols][rows]!=0) {

cols=(int)(Math.random()*6+1);

rows=(int)(Math.random()*5+1);

}

this.grid[cols][rows]=save[n];

n--;

}

mainFrame.setVisible(false);

pressInformation=false; //这里一定要将按钮点击信息归为初始

init();

for(int i = 0;i 6;i++){

for(int j = 0;j 5;j++ ){

if(grid[i+1][j+1]==0)

diamondsButton[i][j].setVisible(false);

}

}

}

public void estimateEven(int placeX,int placeY,JButton bz) {

if(pressInformation==false) {

x=placeX;

y=placeY;

secondMsg=grid[x][y];

secondButton=bz;

pressInformation=true;

}

else {

x0=x;

y0=y;

fristMsg=secondMsg;

firstButton=secondButton;

x=placeX;

y=placeY;

secondMsg=grid[x][y];

secondButton=bz;

if(fristMsg==secondMsg secondButton!=firstButton){

xiao();

}

}

}

public void xiao() { //相同的情况下能不能消去。仔细分析,不一条条注释

if((x0==x (y0==y+1||y0==y-1)) || ((x0==x+1||x0==x-1)(y0==y))){ //判断是否相邻

remove();

}

else{

for (j=0;j7;j++ ) {

if (grid[x0][j]==0){ //判断第一个按钮同行哪个按钮为空

if (yj) { //如果第二个按钮的Y坐标大于空按钮的Y坐标说明第一按钮在第二按钮左边

for (i=y-1;i=j;i-- ){ //判断第二按钮左侧直到第一按钮中间有没有按钮

if (grid[x][i]!=0) {

k=0;

break;

}

else //K=1说明通过了第一次验证

}

if (k==1) {

linePassOne();

}

}

if (yj){ //如果第二个按钮的Y坐标小于空按钮的Y坐标说明第一按钮在第二按钮右边

for (i=y+1;i=j ;i++ ){ //判断第二按钮左侧直到第一按钮中间有没有按钮

if (grid[x][i]!=0){

k=0;

break;

}

else

}

if (k==1){

linePassOne();

}

}

if (y==j ) {

linePassOne();

}

}

if (k==2) {

if (x0==x) {

remove();

}

if (x0x) {

for (n=x0;n=x-1;n++ ) {

if (grid[n][j]!=0) {

k=0;

break;

}

if(grid[n][j]==0 n==x-1) {

remove();

}

}

}

if (x0x) {

for (n=x0;n=x+1 ;n-- ) {

if (grid[n][j]!=0) {

k=0;

break;

}

if(grid[n][j]==0 n==x+1) {

remove();

}

}

}

}

}

for (i=0;i8;i++ ) { //列

if (grid[i][y0]==0) {

if (xi) {

for (j=x-1;j=i ;j-- ) {

if (grid[j][y]!=0) {

k=0;

break;

}

else

}

if (k==1) {

rowPassOne();

}

}

if (xi) {

for (j=x+1;j=i;j++ ) {

if (grid[j][y]!=0) {

k=0;

break;

}

else

}

if (k==1) {

rowPassOne();

}

}

if (x==i) {

rowPassOne();

}

}

if (k==2){

if (y0==y) {

remove();

}

if (y0y) {

for (n=y0;n=y-1 ;n++ ) {

if (grid[i][n]!=0) {

k=0;

break;

}

if(grid[i][n]==0 n==y-1) {

remove();

}

}

}

if (y0y) {

for (n=y0;n=y+1 ;n--) {

if (grid[i][n]!=0) {

k=0;

break;

}

if(grid[i][n]==0 n==y+1) {

remove();

}

}

}

}

}

}

}

public void linePassOne(){

if (y0j){ //第一按钮同行空按钮在左边

for (i=y0-1;i=j ;i-- ){ //判断第一按钮同左侧空按钮之间有没按钮

if (grid[x0][i]!=0) {

k=0;

break;

}

else //K=2说明通过了第二次验证

}

}

if (y0j){ //第一按钮同行空按钮在与第二按钮之间

for (i=y0+1;i=j ;i++){

if (grid[x0][i]!=0) {

k=0;

break;

}

else

}

}

}

public void rowPassOne(){

if (x0i) {

for (j=x0-1;j=i ;j-- ) {

if (grid[j][y0]!=0) {

k=0;

break;

}

else

}

}

if (x0i) {

for (j=x0+1;j=i ;j++ ) {

if (grid[j][y0]!=0) {

k=0;

break;

}

else

}

}

}

public void remove(){

firstButton.setVisible(false);

secondButton.setVisible(false);

fraction();

pressInformation=false;

k=0;

grid[x0][y0]=0;

grid[x][y]=0;

}

public void actionPerformed(ActionEvent e) {

if(e.getSource()==newlyButton){

int grid[][] = new int[8][7];

this.grid = grid;

randomBuild();

mainFrame.setVisible(false);

pressInformation=false;

init();

}

if(e.getSource()==exitButton)

System.exit(0);

if(e.getSource()==resetButton)

reload();

for(int cols = 0;cols 6;cols++){

for(int rows = 0;rows 5;rows++ ){

if(e.getSource()==diamondsButton[cols][rows])

estimateEven(cols+1,rows+1,diamondsButton[cols][rows]);

}

}

}

public static void main(String[] args) {

lianliankan llk = new lianliankan();

llk.randomBuild();

llk.init();

}

}

//old 998 lines

//new 318 lines

跪求用Java语言实现试卷的难度与区分度 信度评估算法的源代码

简单的说,所谓调查问卷的信度是指这个问卷是不是可靠的,这个包含多层含义,比如说这份问卷是不是多次重复做结果都接近等等。

效度是指这个问卷是不是考察出了你想要考察的结果,一般这个会和一个校标做校标关联系数。

信度一般用阿尔法系数做检验

效度一般用T检验,显著性差异指数P检验。

一般应该先用小样本做信度和效度,但是做效度的样本也不应该低于60人。然后再做推广。

还有你这种量表是否应该在做效度时用校标关联系数呢,但这又需要你有新的校标。

因为不太了解具体情况,所以先这么说,在做的时候你要遇到什么问题,你在问我哈。还有建议关于怎么做信度和效度,你还是看一下相关书籍。我觉得这还是很有必要的。

一、信度系数与信度指数

大部分情况下,信度是以信度系数为指标,它是一种相关系数。常常是同一被试样本所得到的两组资料的相关,理论上说就是真分数方差与实得分数方差的比值,公式为:

r(xx)=r^2(xt)=S^2(t)/S^2(x)

公式中r^2(xt)是真分数标准差与实得分数标准差的比值,称作信度系数,公式为:

r(xt)=S(t)/S(x)

可见信度指数的平方就是信度系数。

二、测量标准误

信度系数仅表示一组测量的实得分数与真分数的符合程度,但并没有直接指出个人测验分数的变异量。我们可以用一组被试两次测量结果来代替对同一个人的反复施测,于是有了信度的另一个指标,公式为:

SE=S(x)√1-r(xx)

公式中SE为测量的标准误,S(x)是所得分数的标准差,r(xx)为测验的信度系数,从公式我们可以看出测量的标准误与信度之间有互为消长的关系:信度越高,标准误越小,信度越低,标准误越大。

p value 和t value 我在百度百科上没看到,你自己再找找吧

eclipse怎么查看java源代码

在Eclipse中查看JDK类库的源代码

设置:

1.点 “window”- "Preferences" - "Java" - "Installed JRES"

2.此时"Installed JRES"右边是列表窗格,列出了系统中的 JRE 环境,选择你的JRE,然后点边上的 "Edit...", 会出现一个窗口(Edit JRE)

3.选中rt.jar文件的这一项:“c:\program files\java\jre_1.5.0_06\lib\rt.jar” 

点 左边的“+” 号展开它

4.展开后,可以看到“Source Attachment:(none)”,点这一项,点右边的按钮“Source Attachment...”, 选择你的JDK目录下的 “src.zip”文件

5.一路点"ok",结束。

dt.jar是关于运行环境的类库,主要是swing的包 

tools.jar是关于一些工具的类库 

rt.jar包含了jdk的基础类库,也就是你在java doc里面看到的所有的类的class文件

使用:

可以在 Java 源代码编辑器或代码片段编辑测试窗中选择类型、方法或字段的名称,然后对元素的定义打开编辑器。

在 Java 编辑器中,选择类型、方法或字段的名称。您也可以仅仅在名称中单击一次。 

执行下列其中一项操作: 

1.从菜单栏中,选择浏览 打开声明 

2.从编辑器的弹出菜单中,选择打开声明 

3.按 F3 键,如下图


文章名称:java评分源代码 评分系统源码
浏览路径:http://bjjierui.cn/article/docjooh.html

其他资讯