public double getQuizRating() {
		String statement = new String("SELECT * FROM " + DBTable + " WHERE qid = ?");
		PreparedStatement stmt;
		try {
			stmt = DBConnection.con.prepareStatement(statement);
			stmt.setInt(1, quizID);
			ResultSet rs = stmt.executeQuery();
			rs.next();
			double averageRating;
			if(rs.getInt("raternumber")==0){
				averageRating = 0;
			}else{
				averageRating = rs.getDouble("rating") / rs.getInt("raternumber");
			}
			rs.close();
			return averageRating;		
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return -1;
	}