0% found this document useful (0 votes)
65 views22 pages

AJP - Microproject

The document describes a micro project on developing an online quiz application in Java. It includes the aim, rationale, course outcomes achieved, literature review and actual methodology followed in developing the application using AWT and Swing components in Java.

Uploaded by

Rohan Gund
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)
65 views22 pages

AJP - Microproject

The document describes a micro project on developing an online quiz application in Java. It includes the aim, rationale, course outcomes achieved, literature review and actual methodology followed in developing the application using AWT and Swing components in Java.

Uploaded by

Rohan Gund
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
You are on page 1/ 22

A

Micro project

On

“Online Quiz Application”

Submitted By

Jayesh Bari (58)

Guided By

Ms. A. D. Mate

Diploma Course in Computer

Technology (As per directives of I

Scheme, MSBTE)

Sinhgad Technical Education Society’s

SOU.VENUTAI CHAVAN

POLYTECHNIC PUNE - 411041


ACADEMIC YEAR 2023-2024
Maharashtra State Board
of Technical Education
Certificate
This is to certify that Mr. Jayesh Bari with Roll No. 58 of Semester V of
Diploma in Computer Technology of Institute Sou. Venutai Chavan
Polytechnic (Code: 0040) has successfully completed the Micro-Project in
Advance Java Programming (22517) for the academic year 2023-2024 as
prescribed in the curriculum.

Program Code: CM

Course Code: CM/5/I


Place: Pune Enrolment No: 2200400383

Date: Exam Seat No:

Ms. A. D. Mate Mrs.A.V.Kurkute Dr.(Mrs.)M.S.Jadhav


Course Teacher HOD of Department Principal
INDEX

SR NO CONTENTS PAGE NO

1 Aim of the Micro-Project 1

2 Rationale 3

3 Course Outcomes Achieved 3

4 Literature Review 3

5 Actual Methodology Followed 4

6 Actual Resources Used 5

7 Skills Developed 12

8 Conclusion 13
Advance Java Programming - Online Quiz Application
22517

Annexure - I
Micro-Project Proposal
Quiz Application

1.0 Aim of the Micro-Project:

The aim of the Micro-project is to develop a application which can generate a online quiz.

2.0 Intended Course Outcomes:


a. Develop program using GUI framework (AWT and Swing).
b. Handle events of AWT and Swing Components.
c. Handle Action listener event.
e. Develop a code using Database.

3.0 Proposed methodology:

I. Study the concept of JAVA programming.

II. Study various syntax and functions of JAVA.

III. Study to create small programs using JAVA.

IV. Study to create packages and developing a java file in it and importing it.

V. Study to calling the methods of different packages.

VI. Make program for given criteria.

VII. Prepare the final report.

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

4.0 Action Plan:


Name of
Sr. Planned Planned
Details of Activity responsible
No. Start Date Finish Date
Team members

Identify the requirements of the 12-09-2023 14-09-2023


1 Vedant Mawale
project.
14-09-2023 18-09-2023
2 Design the structure of the project. Vedant Mawale

Develop the program using in 19-09-2023 25-09-2023


3 Vedant Mawale
JAVA.
Debug code and eliminate errors 05-10-2023 06-10-2023
4 Vedant Mawale
occurred.
11-10-2023 16-10-2023
5 Test the project. Vedant Mawale

6 18-10-2023 23-10-2023
Prepare the final report. Vedant Mawale

5.0 Resources Required:

S. No. Resources required Specifications


1 Computer system Intel(R) Pentium CPU, RAM 8 GB
2 Operating System Windows 11, 64 Bit Operating System
3 Software Java JDK 21, Notepad++, Command Prompt,
Visual Studio Code

6.0 Team members:

S. No. Roll. number Name of Student


1 54 Vedant Mawale

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

Annexure - II
Micro-Project
Report

1.0 Rationale:
Java, the very popular language for desktop as well as mobile application development,
has some unique features, also it’s an object-oriented programming language.
In this course of microproject I am going to learn about one of Java’s unique feature i.e.,
Package creation and importing it in a program to use its function.
By default, in Java the main class runs in a default java package, but one can create our
own package and can implement classes in and methods, so that I can import that package
to use its functions.

2.0 Aim of the Micro-Project:


The aim of the Micro-project is to develop a Quiz application using java.

3.0 Course Outcomes Achieved:


a. Develop a program using GUI framework (AWT and Swing).
b. Handle events of AWT and Swing Components.
c. Handle Action listener event.
e. Develop a program using a database.

4.0 Literature Review:

1.AWT Components:
AWT, Java's original GUI toolkit, provides a set of platform-dependent components for
building graphical user interfaces. These components include buttons, text fields, labels,
and panels, which were used in the project to create the expense entry form.
1. Swing Components:
Swing, an extension of AWT, offers a more versatile and customizable set of GUI
components. Swing components, such as JFrame, JPanel, JTextField, JButton, JLabel, and

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517 JScrollPane, were central to the project's GUI design.

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

2. JFrame:
The JFrame class serves as the main window for the application. It encapsulates the entire
GUI and provides essential features such as window management and event handling.
3. JPanel:
JPanel is a versatile container used to group and organize other components. In the project,
it was employed to create distinct sections of the GUI, such as the form panel and the
button panel.
4. JTextField and JLabel:
JTextField components are used for text input, allowing users to enter expense details.
Corresponding JLabel components provide labels for these input fields.
5. JButton:
JButton components represent interactive buttons that trigger actions. In the project, they
were used for the "Submit" and "View Division" buttons.
6. JScrollPane:
JScrollPane enables scrolling of components that may exceed the visible area. It was
applied to the JTextArea component in the expense division screen to accommodate
potentially lengthy reports.
7. Event Handling:
Both AWT and Swing components support event handling. The project utilized event
listeners and action listeners to capture user interactions, such as button clicks and form
submissions.
8. Layout Managers:
Java provides various layout managers, including FlowLayout and BorderLayout, to
control the arrangement and positioning of components within containers. These layout
managers were utilized to design the GUI layout efficiently.
9. User Experience (UX):
A focus on UX design was evident in the project, ensuring that the GUI is intuitive and
user- friendly. This involved organizing components logically, providing clear labels, and
offering real-time feedback through status messages.

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

5.0 Actual Methodology Followed:


The aim of the Micro-project is to develop a Quiz Application in Java using AWT
andSwing components.
I. Study the concept of JAVA programming.
II. Study various syntaxes and functions of JAVA.
III. Study to create small programs using JAVA.
IV. Study to create packages and defining classes in it and importing it.
V. Study to calling the methods of different packages.
VI. Make program for given criteria.
VII. Prepare the final report.

6.0 Actual Resources Used:

S. No. Resources required Specifications


1 Computer system Intel(R) Pentium CPU, RAM 8 GB
2 Operating System Windows 11, 64 Bit Operating System
3 Software Java JDK 21, Notepad++, Command Prompt,
Visual Studio Code

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

7.0 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 6: Message Dialog appears which shows the number of correct answers.
Step7: Enter OK
Step8: Stop

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

8.0 Source Code:

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");
Sou.Venuati Chavan Polytechnic Pune 2023-24
Advance Java Programming - Online Quiz Application
22517
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.EXIT_ON_CLOSE);
f.setLayout(null);
f.setLocation(550,450);
f.setVisible(true);
f.getRootPane().setBorder(BorderFactory.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++;
Sou.Venuati Chavan Polytechnic Pune 2023-24
Advance Java Programming - Online Quiz Application
22517
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()).setEnabled(false);
current=now;
}
}

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517
if(e.getActionCommand().equals ("Result"))

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application

{ 22517

if(check()) count=count+1;
current++;
JOptionPane.showMessageDialog(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].setText("java.Graphics");
jb[2].setText("java.awt.graphics");
jb[3].setText("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].setText("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");
Sou.Venuati Chavan Polytechnic Pune 2023-24
Advance Java Programming - Online Quiz Application
22517
jb[1].setText("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].setText("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)
{
Sou.Venuati Chavan Polytechnic Pune 2023-24
Advance Java Programming - Online Quiz Application
22517
l.setText("Que9: Port Number of FTP is ?");

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517
jb[0].setText("21");
jb[1].setText("80");
jb[2].setText("25");
jb[3].setText("23");
}
if(current==9)
{
l.setText("Que10: SQL Stands For?");
jb[0].setText("Structured Qurey Language");
jb[1].setText("Sequential 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");

}
}

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

9.0 0utput:

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

10.0 Skills Developed:


During the course of this micro-project, I learnt to create a GUI and Event Handling
managing the expenses:
a) I learnt various syntaxes of Java language.

b) I learned to capture and manage user interactions

c) I focused on creating an intuitive and user-friendly interface, emphasizing clear


labels and real-time feedback for better usability.

11.0 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

Sou.Venuati Chavan Polytechnic Pune 2023-24


Advance Java Programming - Online Quiz Application
22517

Sou.Venuati Chavan Polytechnic Pune 2023-24

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