0% found this document useful (0 votes)
2 views21 pages

Ajeenkya DY Patil School of Engineering (Charholi) Via Lohegaon, Pune-412 105

Uploaded by

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

Ajeenkya DY Patil School of Engineering (Charholi) Via Lohegaon, Pune-412 105

Uploaded by

farpune
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Ajeenkya DY Patil School of Engineering

(Charholi)Via Lohegaon, Pune-412 105

Department of Computer Engineering


2024-25[5th Semester]
Report of

Advanced Java (AJP)

On

ONLINE CLASS TEST

Submitted By:

Roll Number Name of Student Enrollment Number


121 Noel Jose 23213470427

Under the Guidance of


Mrs. Nita Pawar
AJEENKYA D Y PATIL SCHOOL OF ENGINEERING
(CHARHOLI)

Department of Computer Engineering

SEMESTER V 2024-25

CERTIFICATE
This is to certify that report titled ONLINE CLASS TEST
is submitted in the partial fulfillment of requirement for the award of the
Diploma in Computer Engineering by Maharashtra State Board of Technical
Education as record of students' own work carried out by them under the
guidance and supervision at Ajeenkya DY Patil School Of Engineering
(Charholi), during the academic year 2024-25.

Roll Number Name of Student Enrollment Number


121 Noel Jose 23213470427

Place: Charholi(BK)
Date: / /2024

Mrs. Nita Pawar Mrs. Nita Pawar


Guide Head of Computer Department
ACKNOWLEDGEMENT

It is with profoundly sense of gratitude that we acknowledge from our


guide Mrs. Nita Pawar. She has been guide in the true sense of word, a guide
who satisfaction from our word & progress.

We are highly obliged to Mrs. Nita Pawar Head of Computer


Department for aberrance & good co-operation given to us for bringing this
project to almost standard.

We are grateful to our principal Dr. Nagesh Shelke for proceeding


acknowledgement to us in the connection of this project concluding. We
appreciate the assistance of all staff that helps us in for their sincere & obliging
help to make our project successfully.
Microproject
Proposal Part A
ONLINE CLASS TEST

1. Brief Introduction:

Creating an online class test application using Java, specifically with the Swing
framework, involves designing a graphical user interface (GUI) that facilitates the
creation, administration, and management of tests in a digital environment. Implement
login and registration functionalities for students and instructors.
Secure authentication mechanisms to ensure user data privacy.
Allow instructors to create tests with various question types, such as multiple-choice,
true/false, and short answer.
Provide options for setting time limits and randomizing questions.
Set up the development environment with necessary tools and libraries (e.g., Java
Development Kit, Swing libraries). Use Swing components to build the application's
interface. Design forms for login, test creation, test taking, and results viewing.
The Swing Components are lightweight. Swing Supports a Pluggable look and feels
And Swing provides more powerful components such as tables, lists, Scrollpanes,
Colourchooser, tabbedpane, etc

2. Aim of the Case Study

A) Enhancing Technical Skills by developing and strengthening your knowledge and


expertise in Java programming
B) Real-World Application Development and gaining practical experience in designing
and implementing a real-world application
C) Enable students to take tests online, with features such as timers and instant feedback.
Action Plan

Start End Responsible


Sr. No. Details of Activity
Date Date group members

1 Search for the topic Noel

Confirmed the topic we


2 Noel
searched for the project

3 Collecting information Noel

4 Making proposal Noel

Testing and analysis of test


5 Noel
result

Preparation of final project


6 Noel
report

7 Final submission of the project Noel


1. Resources used:

Name of
Sr. No. Specification
resources/Material

1. Computer system Intel i3 7th gen processor

2. Internet connection Stable 4G connection

3. Visual Studio Code Latest

2. Name of the team members:

Roll No. Name of students Enrollment Number

121 Noel Jose 2216490222


Part B
ONLINE CLASS TEST Using Swing in JAVA

Introduction

Swing is a Java Foundation Classes [JFC] library and an extension of the Abstract
Window Toolkit [AWT]. Swing offers much-improved functionality over AWT, new
components, expanded components features, and excellent event handling with drag-
and-drop support. Swing is a Set Of API ( API - Set Of Classes and Interfaces). Swing
is Provided to Design Graphical User Interfaces

Swing is an Extension library to the AWT (Abstract Window Toolkit)


Includes New and improved Components that have been enhancing the looks and
Functionality of GUIs’
Swing can be used to build (Develop) The Standalone swing GUI Apps Also as
Servlets And Applets. It Employs model/view design architecture
Swing is more portable and more flexible than AWT, The Swing is built on top of the
AWT. Swing is Entirely written in Java. Java Swing Components are Platform-
independent And The Swing Components are lightweight
Swing Supports a Pluggable look and feels And Swing provides more powerful
components such as tables, lists, Scrollpanes, Colourchooser, tabbedpane, etc

Features of Java Swing :

 Desktop Applications: Ideal for creating complex, rich GUI desktop applications..
 Prototyping: Useful for quickly prototyping application interfaces.
 Often used in educational environments to teach GUI development in Java..
ONLINE CLASS TEST

Creating an online class test with Swing in Java refers to the process of developing a
desktop application that enables the creation, administration, and management of online tests.
The application leverages the Swing framework to provide a visually appealing and
interactive interface for users.

The program offers two main categories:

Instructor Tools
These tools are designed to assist instructors in creating, managing, and analyzing tests:
 Test Creation: Instructors can design tests with various question types (multiple-
choice, true/false, short answer, etc.).
 Test Scheduling: Set the date and time for when tests will be available.
 Question Banks: Store and reuse questions for different tests.
 Results Analysis: Automatically grade tests and provide detailed performance
reports.
 Student Management: Track student progress and performance over time.

2. Student Interface
These features are aimed at providing a seamless test-taking experience for students:
 Test Taking: Students can take tests within a specified time frame with features like
timers and submission options.
 Instant Feedback: Get immediate results and feedback after submitting a test (if
enabled by the instructor).
 Progress Tracking: View test scores and progress over time.
ALGORITHM

Step 1: Start
Step 2: Select the right answers of the questions
Step 3: Click on the next button
Step 4: Complete all the questions
Step 5: Check the results by clicking on RESULT button
Step 5: Message Dialog appears which shows the number of correct answers.
Step 6: Enter OK
Step 8: Stop.
Program Code (Length)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import
javax.swing.BorderFactory;
import
javax.swing.border.Border;

class OnlineExam 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];
JFrame f;
OnlineExam(String s)
{
Font f1 = new
Font("TimesRoman",Font.BOLD
,15);
Border border =
BorderFactory.createLineBorder(
Color.black);
f = new JFrame("Online
class test");
l=new JLabel();
l.setFont(f1);
f.add(l);
bg=new ButtonGroup();
for(int i=0;i<5;i++)
{
jb[i]=new
JRadioButton();
f.add(jb[i]);
bg.add(jb[i]);
}
b1=new JButton("Next");
b2=new
JButton("Bookmark");

b1.setBackground(Color.green);
b1.setBorder(border);

b1.setForeground(Color.black);

b2.setBackground(Color.blue);
b2.setBorder(border);

b2.setForeground(Color.white);
b1.addActionListener(this);
b2.addActionListener(this);
f.add(b1);f.add(b2);
set();
l.setBounds(30,40,700,20);

jb[0].setBounds(50,80,150,20);
jb[1].setBounds(50,110,150,20);
jb[2].setBounds(50,140,150,20);

jb[3].setBounds(50,170,150,20);

b1.setBounds(100,240,150,30);

b2.setBounds(270,240,150,30);

f.setDefaultCloseOperation(f.EX
IT_ON_CLOSE);
f.setLayout(null);
f.setLocation(550,450);
f.setVisible(true);

f.getRootPane().setBorder(Borde
rFactory.createMatteBorder(7, 7,
7, 7, Color.red));
f.setSize(700,400);
}
public void
actionPerformed(ActionEvent e)
{
if(e.getSource()==b1)
{
if(check())
count=count+1;
current++;
set();
if(current==9)
{
b1.setEnabled(false);
b2.setText("Result");
}
}

if(e.getActionCommand().equals
("Bookmark"))
{
JButton bk=new
JButton("Bookmark"+x);

bk.setBounds(480,20+30*x,100,
30);
add(bk);

bk.addActionListener(this);
m[x]=current;
x++;
current++;
set();
if(current==9)
b2.setText("Result");
setVisible(false);
setVisible(true);
}
for(int i=0,y=1;i<x;i++,y++)
{

if(e.getActionCommand().equals
("Bookmark"+y))
{
if(check())
count=count+1;
now=current;
current=m[y];
set();

((JButton)e.getSource()).setEnabl
ed(false);
current=now;
}
}

if(e.getActionCommand().equals
("Result"))
{
if(check())
count=count+1;
current++;

JOptionPane.showMessageDialo
g(this,"correct ans="+count);
System.exit(0);
}
}
void set()
{
jb[4].setSelected(true);
if(current==0)
{
l.setText("Que1: Which
class provides many methods for
graphics programming?");

jb[0].setText("java.awt");jb[1].set
Text("java.Graphics");jb[2].setTe
xt("java.awt.graphics");jb[3].setT
ext("None of the above");
}
if(current==1)
{
l.setText("Que2: By
Which methods you can set or
change the text in a label?");

jb[0].setText("setText()");jb[1].se
tText("getText()");jb[2].setText("
Both A &

B");jb[3].setText("None of the
above");
}
if(current==2)
{
l.setText("Que3: Public
class MenuBar
extends___________?");

jb[0].setText("MenuComponent"
);jb[1].setText("MenuContainer")
;jb[2].setText("ComponentMenu"
);jb[3].setText("MenuBar");
}
if(current==3)
{
l.setText("Que4:The
getContentPane() method is of
which class?");

jb[0].setText("JApplet");jb[1].set
Text("JFrame");jb[2].setText("JB
utton");jb[3].setText("None of
these");
}
if(current==4)
{
l.setText("Que5: MVC
architecture is ________?");
jb[0].setText("Modeling-
visual-
controller");jb[1].setText("Model
-view-
controll");jb[2].setText("Many-
View-
controller");jb[3].setText("Model
-viewable-controller");
}
if(current==5)
{
l.setText("Que6:Select
full form of DNS________?");
jb[0].setText("Data
Network
system");jb[1].setText("Domain
Name

System");jb[2].setText("Domain
Name
Server");jb[3].setText("Domain
Naming Service");
}
if(current==6)
{
l.setText("Que7: Which
event is genrated when the
position of scrollbar is changed?
");

jb[0].setText("AdjustmentEvent"
);jb[1].setText("MouseEvent");jb
[2].setText("keyEvent");jb[3].set
Text("ItemEVent");
}
if(current==7)
{
l.setText("Que8: UDP
Stands For___?");
jb[0].setText("User Data
Port");jb[1].setText("User data
provider");jb[2].setText("User
data protocol");

jb[3].setText("User Datagram
Protocol ");
}
if(current==8)
{
l.setText("Que9: Port
Number of FTP is____?");

jb[0].setText("21");jb[1].setText(
"80");jb[2].setText("25");jb[3].se
tText("23");
}
if(current==9)
{
l.setText("Que10: SQL
Stands For____?");
jb[0].setText("Structured
Qurey
Language");jb[1].setText("Sequentail Qurey
Language");jb[2].setText("Struct
ured Question Language");

jb[3].setText("sequentail Qurey
Language");
}
l.setBounds(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[0].isSelected());
if(current==1)
return(jb[0].isSelected());
if(current==2)
return(jb[3].isSelected());
if(current==3)
return(jb[1].isSelected());
if(current==4)
return(jb[1].isSelected());
if(current==5)
return(jb[2].isSelected());
if(current==6)
return(jb[0].isSelected());
if(current==7)
return(jb[3].isSelected());
if(current==8)
return(jb[0].isSelected());
if(current==9)
return(jb[0].isSelected());
return false;
}
public static void main(String
s[])
{
new OnlineExam("Online
Exams");
}
}
Output
Conclusion
It was a great experience to design and implement the Swing using Advanced
Java programming and also to work on its documentation. This project helped me in getting
the better understanding of Swings and AWT Components of Advanced Java Programming.
After doing this project, I am in position to explain concepts of Advanced Java Programming
and apply them to the modelling of real-world systems by utilizing its offered facilities. I am
now able to handle events of AWT and swing components and also develop programs using
networking concepts.
.

Mrs. Nita Pawar


(Project Guide)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy