KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > wap > quiz > Visit


1 // Copyright 2004 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.wap.quiz;
16
17 import java.io.Serializable JavaDoc;
18
19 /**
20  * Visit object for the Quiz application.
21  *
22  * @version $Id: Visit.java,v 1.3 2004/02/19 17:38:02 hlship Exp $
23  * @author David Solis
24  *
25  **/

26
27 public class Visit implements Serializable JavaDoc
28 {
29     private String JavaDoc username;
30     private String JavaDoc level;
31     private int points;
32     private int questionSet;
33     private int numberOfQuestions;
34
35     public void initialize(String JavaDoc username, String JavaDoc level, int questionSet, int numberOfQuestions)
36     {
37         this.username = username;
38         this.level = level;
39         this.questionSet = questionSet;
40         this.numberOfQuestions = numberOfQuestions;
41         points = 0;
42     }
43
44     public int getNumberOfQuestions()
45     {
46         return numberOfQuestions;
47     }
48
49     public void setNumberOfQuestions(int numberOfQuestions)
50     {
51         this.numberOfQuestions = numberOfQuestions;
52     }
53
54     public int getQuestionSet()
55     {
56         return questionSet;
57     }
58
59     public void setQuestionSet(int questionSet)
60     {
61         this.questionSet = questionSet;
62     }
63
64     public void incPoints()
65     {
66         points++;
67     }
68
69     public int getPoints()
70     {
71         return points;
72     }
73
74     public void setPoints(int points)
75     {
76         this.points = points;
77     }
78
79     public String JavaDoc getLevel()
80     {
81         return level;
82     }
83
84     public void setLevel(String JavaDoc level)
85     {
86         this.level = level;
87     }
88
89     public String JavaDoc getUsername()
90     {
91         return username;
92     }
93
94     public void setUsername(String JavaDoc user)
95     {
96         this.username = user;
97     }
98
99 }
100
Popular Tags