


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
This application is developed by using the java programming language by importing the reqiured packages.
Typology: Study Guides, Projects, Research
1 / 26
This page cannot be seen from the preview
Don't miss anything!



















Submitted by ESSAKIRAJA S (95072115012)
in partial fulfillment for the award of
the degree of
BACHELOR OF TECHNOLOGY
in INFORMATION TECHNOLOGY
FRANCIS XAVIER ENGINEERING COLLEGE (Autonomous) TIRUNELVELI – 627 003 AUGUST 2022
FRANCIS XAVIER ENGINERING COLLEGE (Autonomous) TIRUNELVELI 627 003
BONAFIDE CERTIFICATE
Certified that this project report “...Online Test Application Using Java…” is the bonafide work of “ …..ESSAKIRAJA S (95072115012) .…” who carried out the project work under my supervision. Certified further that to the best of my knowledge the work reported herein does not form part of any other thesis or dissertation on the basis of which a degree or award was conferred on an earlier occasion on this or any other candidate.
SUPERVISOR HOD
Submitted for the B.Tech Degree Project Viva Voce held on ………………………………………….
INTERNAL EXAMINER EXTERNAL EXAMINER
Flow Chart:
This web application provides facility to Play online quiz and practice Grammar, Aptitude, and G.K. It provides a good platform, where a student not only judges there knowledge/skill but also they can improve knowledge/skill at the same time
The Scope of this project is very broad in terms of gaining knowledge and sharing knowledge among world.
Few points are:-
Can be used anywhere any time as it is a web based application.
This application will be used in educational institutions as well as in corporate world.
Anyone, whether a newcomer or professional, willing to learn they can choose it. All users will have access to all subject containing sub topics. Users will receive best experience without any interruptions.
"1.Number of primitive data types in Java are?",
"2.What is the size of float and double in java?",
"3.Automatic type conversion is possible in which of the possible cases?",
"4.When an array is passed to a method, what does the method receive?",
"5.Arrays in java are-" }; String[][] options = { {"4","6","7","8"}, {"32 and 64","32 and 32","64 and 64","64 and 32"},
{"Byte to Int","Int to Long","Long to Int","Short to Int"},
{"The reference of the Array.","A copy of the Array.","Length of the Array.","Copy of the First Element."},
{"Object References","objects","Primitive Data type","None"},
}; char[] answers = { 'D',
char guess;
char answer;
int index;
int correct_guesses =0;
int total_questions = questions.length;
int result;
int seconds=15;
JFrame frame = new JFrame();
JTextField textfield = new JTextField();
JTextArea textarea = new JTextArea();
JButton buttonA = new JButton();
JButton buttonB = new JButton();
JButton buttonC = new JButton();
JButton buttonD = new JButton();
JLabel answer_labelA = new JLabel();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CL OSE);
frame.setSize(650,650); frame.getContentPane().setBackground(new Color(50,50,50));
frame.setLayout(null); frame.setResizable(false);
textfield.setBounds(0,0,650,50); textfield.setBackground(new Color(25,25,25)); textfield.setForeground(new Color(25,255,0)); textfield.setFont(new Font("Ink Free",Font.BOLD,30));
textfield.setBorder(BorderFactory.createBevelBorder(1) );
textfield.setHorizontalAlignment(JTextField.CENTER); textfield.setEditable(false);
textarea.setBounds(0,50,650,50); textarea.setLineWrap(true);
textarea.setWrapStyleWord(true); textarea.setBackground(new Color(25,25,25)); textarea.setForeground(new Color(25,255,0)); textarea.setFont(new Font("MV Boli",Font.BOLD,25));
textarea.setBorder(BorderFactory.createBevelBorder(1) );
textarea.setEditable(false);
buttonA.setBounds(0,100,100,100); buttonA.setFont(new Font("MV Boli",Font.BOLD,35));
buttonA.setFocusable(false); buttonA.addActionListener(this); buttonA.setText("A");
buttonB.setBounds(0,200,100,100); buttonB.setFont(new Font("MV Boli",Font.BOLD,35));
buttonB.setFocusable(false); buttonB.addActionListener(this); buttonB.setText("B");
answer_labelB.setBounds(125,200,500,100); answer_labelB.setBackground(new Color(50,50,50));
answer_labelB.setForeground(new Color(25,255,0));
answer_labelB.setFont(new Font("MV Boli",Font.PLAIN,35));
answer_labelC.setBounds(125,300,500,100); answer_labelC.setBackground(new Color(50,50,50));
answer_labelC.setForeground(new Color(25,255,0));
answer_labelC.setFont(new Font("MV Boli",Font.PLAIN,35));
answer_labelD.setBounds(125,400,500,100); answer_labelD.setBackground(new Color(50,50,50));
answer_labelD.setForeground(new Color(25,255,0));
answer_labelD.setFont(new Font("MV Boli",Font.PLAIN,35));
seconds_left.setBounds(535,510,100,100); seconds_left.setBackground(new Color(25,25,25)); seconds_left.setForeground(new Color(255,0,0)); seconds_left.setFont(new Font("Ink Free",Font.BOLD,60));
seconds_left.setBorder(BorderFactory.createBevelBorde r(1));
seconds_left.setOpaque(true);
seconds_left.setHorizontalAlignment(JTextField.CENT ER);
seconds_left.setText(String.valueOf(seconds));
time_label.setBounds(535,475,100,25); time_label.setBackground(new Color(50,50,50)); time_label.setForeground(new Color(255,0,0)); time_label.setFont(new Font("MV Boli",Font.PLAIN,16));
time_label.setHorizontalAlignment(JTextField.CENTE R);
time_label.setText("timer >:D");
percentage.setHorizontalAlignment(JTextField.CENTE R);
percentage.setEditable(false);
frame.add(time_label); frame.add(seconds_left); frame.add(answer_labelA); frame.add(answer_labelB); frame.add(answer_labelC); frame.add(answer_labelD); frame.add(buttonA); frame.add(buttonB); frame.add(buttonC); frame.add(buttonD); frame.add(textarea); frame.add(textfield); frame.setVisible(true);
nextQuestion(); } public void nextQuestion() {
if(index>=total_questions) { results(); } else { textfield.setText("Question "+(index+1)); textarea.setText(questions[index]); answer_labelA.setText(options[index][0]); answer_labelB.setText(options[index][1]); answer_labelC.setText(options[index][2]); answer_labelD.setText(options[index][3]); timer.start(); }
}
@Override
public void actionPerformed(ActionEvent e) {
buttonA.setEnabled(false); buttonB.setEnabled(false); buttonC.setEnabled(false); buttonD.setEnabled(false);