0% found this document useful (0 votes)
39 views13 pages

Online Test Project in Advanced Java

The document describes a project to create an online test application using Java Swing. It will present multiple choice questions to the user from an array of questions and allow navigation between questions. It will also allow the user to bookmark questions to review later. Event handling is implemented for navigation and bookmarking functionality.

Uploaded by

Kartik Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views13 pages

Online Test Project in Advanced Java

The document describes a project to create an online test application using Java Swing. It will present multiple choice questions to the user from an array of questions and allow navigation between questions. It will also allow the user to bookmark questions to review later. Event handling is implemented for navigation and bookmarking functionality.

Uploaded by

Kartik Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Government Polytechnic Awasari (Khurd)

Tal-Ambegaon, Pune-412405

Department of Information Technology

2022-23
Sem-V
Micro Project Report of
Advanced Java Programming
On

MAKE A ONLINE TEST

Submitted by:
Name of Student Enrollment Number
PETKAR PURVA SHASHIM 2010510383

RAUNDAL TEJAS DADAJI 2010510386

TALPE ROHAN ROHIDAS 2110510550

PATIL KARTIK DINESH 1910510163

Under the guidance of:


Subject teacher H.O.D. Principle
(Mrs. Fafat P.C.) (Dr. D.N. rewadkar)
([Link])

1
DEPARTMENT OF INFORMATION TECHNOLOGY
GOVERNMENT POLYTECHNIC, AWASARI (KHURD)
SEMESTER-V 2021-2022

CERTIFICATE
This is to certify that project report entitle Make a Online Test submitted in
the partial fulfilment of requirement for the award of the diploma in Information
Technology by Maharashtra State Board of Technical Education as record of
students own work carried out by them under my guidance and supervision at
Government Polytechnic Awasari (khurd), During the academic year 2022-2023
Name of Student Enrollment Number
PETKAR PURVA SHASHIM 2010510383

RAUNDAL TEJAS DADAJI 2010510386

TALPE ROHAN ROHIDAS 2110510550

PATIL KARTIK DINESH 1910510163

Place: Awasari (Kh) Date : / /

Guidance
Subject teacher H.O.D. Principle
(Mrs. Fafat P.C.) (Dr. D.N. rewadkar) (Dr. D.R.
Nandanwar)

2
ACKNOWLEDGEMENT
We have great pleasure and sense of satisfaction in presenting this
microproject report on ”Snake Game" as part of the curriculum of Diploma in
Information Technology. Being novice in the field of designing and structuring in
this micro-project, it could have been extremely difficult for us to complete this
micro project on our own. We are very fortunate to be guided by people with vast
and resourceful experience in their respective field of work.
We express my sincere gratitude to our guide Mrs. Fafat P.C Mam for her
timely guidance, support and suggestions. We are also thankful for her sincere help
and for making us available all the facilities of the department. Without her efforts
and constant monitoring the micro-project and documentation would not have been
duly completed. Also, we express our sincere thanks to [Link] (HOD
IF Department), besides, we take this opportunity to express our sincere gratitude
to the Principal Dr. D.R. Nandanwar, G. P. Awsari for providing a good
environment and facilities to complete this micro-project. We would also like to
thank all my colleagues who have directly or indirectly guided and helped us in the
preparation of this micro project.

Annexure – I

3
PART A – Micro-Project Proposal
Make a Online Text

1.0 Aim of the Micro-Project


Make a Online Text

2.0 Intended Course Outcomes


CO1:Develop programs using GUI Framework(AWT and Swing).
CO2:Handle events of AWT and Swings components.
CO3:Develop programs to handle events in Java Programming

3.0 Literature Review

4.0 Proposed Methodology


It consists of following steps
1. Discussion about given topic.
2. Selection of good leader and distribution of responsibilities.
3. Collection of information using different resources.
4. Analysis of given information.
5. Representation information in required formats.
6. Preparation of project report.
7. Completion and submission of assigned task.

5.0 Resources Required


[Link]. Name of resource Specification Quantity Remarks
1 PC 01

4
2 Internet 01
3 Books 01
4 Java compiler JDK

6.0 Action Plan

[Link] Details of Planed Start Plan Finished Name of


Activity Date Date Responsible
Team Member
1. Formation of the
project and
allocation of project
title by the teacher

2. Conduct
information search
about the project for
requirement
analysis of the
project

3. Acquire the
information form
the teacher
4. Select the
information from
the a book and
internet
5. Actual project
assembling
6. Arrange all the data
and report the
preparation
7. Submission of
the project

5
Annexure – II

PART B – Micro-Project Report


Make A Online Test
1.0 Rationale
Online Test is is very usefull nowdays as many exam as conducted online. So we are
making a small online test on java by using a toolkit of [Link] are also going to implements

6
Events. And how to handle events with swings components . we are using java arrays to store the
questions instead of database

2.0 Course Outcomes Addressed


CO1:Develop programs using GUI Framework(AWT and Swing).
CO2:Handle events of AWT and Swings components.
CO3:Develop programs to handle events in Java Programming

3.0 Literature Review


Basic introduction about topic

4.0 Actual Methodology Followed


It consists of following steps
1. Discussion about given topic.
2. Selection of good leader and distribution of responsibilities.
3. Collection of information using different resources.
4. Analysis of given information.
5. Representation information in required formats.
6. Preparation of project report.
7. Completion and submission of assigned task.

5.0 Actual Resources Used

[Link]. Name of resource Specification Quantity Remarks


1 PC 01
2 Internet 01
3 Books 01

7
4 Java compiler JDK

6.0 Outputs of the Micro-Project

import [Link].*;
import [Link].*;
import [Link].*;
class OnlineTest extends JFrame implements ActionListener
{
JLabel l;
JRadioButton jb[]=new JRadioButton[5];
JButton b1,b2;
ButtonGroup bg;
int count=0,current=0,x=1,y=1,now=0;
int m[]=new int[10];
OnlineTest(String s)
{
super(s);
l=new JLabel();
add(l);
bg=new ButtonGroup();
for(int i=0;i<5;i++)
{
jb[i]=new JRadioButton();
add(jb[i]);
[Link](jb[i]);
}
b1=new JButton("Next");
b2=new JButton("Bookmark");
[Link](this);
[Link](this);
add(b1);add(b2);
set();
[Link](30,40,450,20);
jb[0].setBounds(50,80,100,20);
jb[1].setBounds(50,110,100,20);
jb[2].setBounds(50,140,100,20);
jb[3].setBounds(50,170,100,20);
[Link](100,240,100,30);

8
[Link](270,240,100,30);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(null);
setLocation(250,100);
setVisible(true);
setSize(600,350);
}
public void actionPerformed(ActionEvent e)
{
if([Link]()==b1)
{
if(check())
count=count+1;
current++;
set();
if(current==9)
{
[Link](false);
[Link]("Result");
}
}
if([Link]().equals("Bookmark"))
{
JButton bk=new JButton("Bookmark"+x);
[Link](480,20+30*x,100,30);
add(bk);
[Link](this);
m[x]=current;
x++;
current++;
set();
if(current==9)
[Link]("Result");
setVisible(false);
setVisible(true);
}
for(int i=0,y=1;i<x;i++,y++)
{
if([Link]().equals("Bookmark"+y))

9
{
if(check())
count=count+1;
now=current;
current=m[y];
set();
((JButton)[Link]()).setEnabled(false);
current=now;
}
}

if([Link]().equals("Result"))
{
if(check())
count=count+1;
current++;
[Link]("correct ans="+count);
[Link](this,"correct ans="+count);
[Link](0);
}
}
void set()
{
jb[4].setSelected(true);
if(current==0)
{
[Link]("Que1: Which one among these is not a datatype");

jb[0].setText("int");jb[1].setText("Float");jb[2].setText("boolean");jb[3].setText("char");
}
if(current==1)
{
[Link]("Que2: Which class is available to all the class automatically");

jb[0].setText("Swing");jb[1].setText("Applet");jb[2].setText("Object");jb[3].setText("ActionEven
t");
}
if(current==2)

10
{
[Link]("Que3: Which package is directly available to our class without
importing it");

jb[0].setText("swing");jb[1].setText("applet");jb[2].setText("net");jb[3].setText("lang");
}
if(current==3)
{
[Link]("Que4: String class is defined in which package");

jb[0].setText("lang");jb[1].setText("Swing");jb[2].setText("Applet");jb[3].setText("awt");
}
if(current==4)
{
[Link]("Que5: Which institute is best for java coaching");
jb[0].setText("Utek");jb[1].setText("Aptech");jb[2].setText("SSS
IT");jb[3].setText("jtek");
}
if(current==5)
{
[Link]("Que6: Which one among these is not a keyword");

jb[0].setText("class");jb[1].setText("int");jb[2].setText("get");jb[3].setText("if");
}
if(current==6)
{
[Link]("Que7: Which one among these is not a class ");

jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent");jb[3].setT
ext("Button");
}
if(current==7)
{
[Link]("Que8: which one among these is not a function of Object class");

jb[0].setText("toString");jb[1].setText("finalize");jb[2].setText("equals");jb[3].setText("getDocu
mentBase");

11
}
if(current==8)
{
[Link]("Que9: which function is not present in Applet class");

jb[0].setText("init");jb[1].setText("main");jb[2].setText("start");jb[3].setText("destroy");
}
if(current==9)
{
[Link]("Que10: Which one among these is not a valid component");

jb[0].setText("JButton");jb[1].setText("JList");jb[2].setText("JButtonGroup");jb[3].setText("JTex
tArea");
}
[Link](30,40,450,20);
for(int i=0,j=0;i<=90;i+=30,j++)
jb[j].setBounds(50,80+i,200,20);
}
boolean check()
{
if(current==0)
return(jb[1].isSelected());
if(current==1)
return(jb[2].isSelected());
if(current==2)
return(jb[3].isSelected());
if(current==3)
return(jb[0].isSelected());
if(current==4)
return(jb[2].isSelected());
if(current==5)
return(jb[2].isSelected());
if(current==6)
return(jb[1].isSelected());
if(current==7)
return(jb[3].isSelected());
if(current==8)
return(jb[1].isSelected());

12
if(current==9)
return(jb[2].isSelected());
return false;
}
public static void main(String s[])
{
new OnlineTest("Online Test Of Java");
}
}
OUTPUT:-

7.0 Skill Developed / learning out of this Micro-Project

1. Analytical and logical skills


2. Interpretation of data
3. Demonstrated working as a leader/a team member

8.0 Applications of this Micro-Project


We can conducts mock test for preparation of examination
9.0 Conclusion
We learned to make a online test by using swing and also how to implements the events
We also learned how to handle events using Swing. We will able to conduct the a mock test for
students to preparation for exam

13

Common questions

Powered by AI

Java's JFrame class is the foundation for creating the main window of the online test application. It allows developers to set the layout, add components such as labels, buttons, and radio buttons, and define interactions through event handling. JFrame provides a flexible environment to build intuitive and organized UIs, accommodating various test functionalities .

Event handling in Java Swing is crucial for managing user interactions such as button clicks during the test. It allows the application to respond dynamically to user actions, such as navigating between questions and tracking responses, thereby providing a seamless and interactive user experience. Effective event handling ensures the application is intuitive and user-friendly .

Implementing an online test micro-project develops various programming skills such as GUI design using tools like AWT and Swing, event handling in Java to manage user interactions, and logical and analytical thinking required to structure the test flow and evaluate the correctness of answers .

Building an online test application as a micro-project offers significant educational benefits. It enhances students' practical knowledge of GUI programming, event handling, and problem-solving skills. Furthermore, it encourages teamwork, project management abilities, and comprehension of real-world application development processes. Such projects bridge the gap between theory and practice, preparing students for industry challenges .

The step-by-step methodology in the micro-project mirrors typical software development lifecycle phases by involving phases such as requirement analysis (discussion about the topic), design (selection of leader and distribution of responsibilities), implementation (actual project assembling), and testing (evaluation and submission). This structured approach ensures thorough preparation, execution, and validation, akin to industry-standard software development practices .

Selecting a project leader and distributing responsibilities fosters clarity, accountability, and efficiency. A project leader can guide decision-making and maintain focus, while clear distribution of roles ensures that each team member is responsible for specific tasks, minimizing overlap and enhancing productivity. This structure supports effective collaboration and time management, which are crucial for completing the project successfully .

To create an online test application using Java Swing, you need key components such as Java Development Kit (JDK), the AWT and Swing frameworks for building graphical user interfaces, event handlers to manage user interactions, and collections such as arrays to store questions and answers .

An educational institution might choose to conduct mock tests online using a Swing-based application due to the flexibility and accessibility it provides. Online tests can be taken from any location, making it convenient for students. The Swing framework also allows for a customizable user interface, catering to the specific needs of educational assessments while reducing resource constraints associated with traditional testing methods .

Using Java arrays for storing questions offers advantages such as simplicity in implementation and faster performance due to memory-based access, which can be more efficient for small-scale applications. However, arrays lack scalability, persistence, and ease of data manipulation compared to databases, which offer enhanced data integrity, querying capabilities, and suitability for larger datasets .

Using JFrame together with event-driven programming enhances both the interface and functionality of the online test application by enabling responsive and interactive GUI elements. JFrame provides the structure for the application window, while events allow for dynamic responses to user actions, like advancing questions on button clicks or checking answers. This synergy makes the application intuitive, efficient, and user-centric .

You might also like