📄 reportgenerator.java
字号:
/* * SchoolEJB - CyberDemia's library of EJBs for educational related services. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.school;import javax.ejb.*;import java.rmi.RemoteException;import java.util.*;/*** ReportGenerator is a session bean facade for retrieving and processing data * for reports based on historical records.** @author Alexander Yap*/public interface ReportGenerator extends EJBObject{ public static final int PERCENTAGE_BY_TEST = 0; public static final int PERCENTAGE_BY_QUESTION = 1; /** * Gets a user's historical records for a test and user. * @param testId Test ID * @param userId User ID * @return List of AnswerHistoryData instances. * @throws RemoteException */ public List getAnswerHistory(String testId, String userId) throws RemoteException; /** * Gets the distribution of users' answers for all the questions in a test. * @param testId Test ID * @return SortedMap containing the question indices (Integer objects) as the keys and count of correct answers (Integer objects) as the values. */ public SortedMap getAnswersDistributionForTest(String testId) throws RemoteException; /** * Gets the distribution of score percentages for all the questions in a test. * @param testId Test ID * @param type Type of percentages to calculate, determines the value to divide by, must be one of PERCENTAGE_BY_TEST or PERCENTAGE_BY_QUESTION. * @return SortedMap containing the question indices (Integer objects) as the keys and percentages (Double objects) as the values. */ public SortedMap getScorePercentageDistributionForTest(String testId, int type) throws RemoteException; /** * Gets the distribution of overall score percentages for all users. * A user's overall percentage is calculated by divided the user's total score by his maximum possible score. * The percentages are grouped into categories with the specified range. For example, if categoryRange is * 22.0, the percentages are grouped into 0%-22%, 22%-44%, 44%-66%, 66%-88% and 88%-100% (the highest * category's limit is truncated to 100%). * @param categoryRange Range of a category. * @return SortedMap containing the upper-values of percentage categories (Double objects) as the keys and counts of users within a range (Integer objects) as the values. */ public SortedMap getScorePercentageDistributionByUsers(double categoryRange) throws RemoteException;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -