Sahil Java Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

A

Micro-Project
On
Online Paper Test

Submitted To
MSBTE
In Partial Fulfilment of Requirement of Diploma Of
Computer Engineering
Under I Scheme
Submitted By

Mr. Sahil Pradip Pawar


Ms. Karuna Nitin Shetye
Mr. Omkar Suresh Sontakke .
Ms. Usha Shiva Shetye

Under the Guidance Of


Mr. S.S.Zende.

FOR ACADEMIC YEAR 2020-2021


YASHWANTRAO BHONSALE POLYTECHNIC,
SAWANTWADI.
MAHARASTRA STATE BOARD
TECHNICAL EDUCATION
CERTIFICATE
This is to certified that
Name Roll No.

Mr. Sahil Pradip Pawar 47

Of Fourth Semester of Diploma in COMPUTER ENGINEERING of instate


Yashwantrao Bhonsale Polytechnic (1742) has Completed the Micro Project
satisfactorily in Subject Java Programming(_22412_) for
the academic year 2020 To 2021 as prescribed in the curriculum.

Subject Teacher Head of the Department Principal


INTRODUCTION
Java:
Java is a programming language originally developed by James Gosling at Sun
Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a
core component of Sun Microsystems' Java platform. The language derives much of its
syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java
applications are typically compiled to byte code (class file) that can run on any Java Virtual
Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent,
class-based, object-oriented language that is specifically designed to have as few
implementation dependencies as possible. It is intended to let application developers "write
once, run anywhere". Java is currently one of the most popular programming languages in
use, and is widely used from application software to web applications.

Principles:
There were five primary goals in the creation of the Java language
It should be "simple, object-oriented and familiar".
It should be "robust and secure".
It should be "architecture-neutral and portable".
It should execute with "high performance".
It should be "interpreted, threaded, and dynamic".
Java is a fully Object Oriented language because object is at the outer most level of
data structure in Java. No stand alone methods, constants, and
Variables are there in Java. Everything in Java is object even the primitive data
types can also be converted into object by using the wrapper class.

Java Technology
As a development environment, Java technology provides you with large suits of tools:
• A compiler (javac)
• A interpreter(java)
Object and Methods
Java is an object-oriented programming language, abbreviated OOP.
Oops is a programming methodology that views a program as similarly consisting of objects
that interacts with each other by means of action.
Object oriented programming has its own specialized terminology. The objects are called,
appropriately enough, objects. The actions that an object can take are called methods.

A java application program is a class with a method named main, and when you run the java
program the run-time system automatically invokes the method named main.

There are two kinds of java programs

• Applets (Program that run from a web browser).


• Applications (Program that run on computer like other programs).

FEATURES OF JAVA:

Platform Independent:
The concept of Write-once-run-anywhere (known as the Platform independent) is one of
the important key feature of java language that makes java as the most powerful language.
Not even a single language is idle to this feature but java is closer to this feature. The
programs written on one platform can run on any platform provided the platform must have
the JVM.

Simple:
There are various features that make the java as a simple language. Programs are easy to
write and debug because java does not use the pointers explicitly. It is much harder to write
the java programs that can crash the system but we cannot say about the other programming
languages. Java provides the bug free system due to the strong memory management. It also
has the automatic memory allocation and deallocation system.

Object Oriented:
To be an Object Oriented language, any language must follow at least the four
characteristics.

Inheritance : It is the process of creating the new classes and using the behavior of the
existing classes by extending them just to reuse the existing code and adding the additional
features as needed.

Encapsulation: It is the mechanism of combining the information and providing the


abstraction.

Polymorphism : As the name suggest one name multiple form, Polymorphism is the way of
providing the different functionality by the functions having the same name based on the
signatures of the methods.
Dynamic binding : Sometimes we don't have the knowledge of objects about their specific
types while writing our code. It is the way of providing the maximum functionality to a
program about the specific type at runtime.

As the languages like Objective C, C++ fulfills the above four characteristics yet they are not
fully object oriented languages because they are structured as well as object oriented
languages. But in case of java, it is a fully Object Oriented language because object is at the
outer most level of data structure in java. No stand alone methods, constants, and variables
are there in java. Everything in java is object even the primitive data types can also be
converted into object by using the wrapper class.

Robust:
Java has the strong memory allocation and automatic garbage collection mechanism. It
provides the powerful exception handling and type checking mechanism as compare to other
programming languages. Compiler checks the program whether there any error and
interpreter checks any run time error and makes the system secure from crash. All of the
above features make the java language robust.

Distributed :
The widely used protocols like HTTP and FTP are developed in java. Internet
programmers can call functions on these protocols and can get access the files from any
remote machine on the internet rather than writing codes on their local system.

Portable:
The feature Write-once-run-anywhere makes the java language portable provided that the
system must have interpreter for the JVM. Java also has the standard data size irrespective of
operating system or the processor. These features make the java as a portable language.

Dynamic:
While executing the java program the user can get the required files dynamically from a
local drive or from a computer thousands of miles away from the user just by connecting with
the Internet.

Multithreaded:
As we all know several features of Java like Secure, Robust, Portable, dynamic etc; you
will be more delighted to know another feature of Java which is Multithreaded. Java is also
a multithreaded programming language. Multithreading means a single program having
different threads executing independently at the same time. Multiple threads execute
instructions according to the program code in a process or a program. Multithreading works
the similar way as multiple processes run on one computer.

Compiler/Interpreter Combo:
Code is compiled to byte codes that are interpreted by a Java virtual machines (JVM)
This provides portability to any machine for which a virtual machine has been written. The
two steps of compilation and interpretation allow for extensive code checking and improved
security.
Security:
No memory pointers
Programs run inside the virtual machine sandbox.
Array index limit checking
Code pathologies reduced by
• byte code verifier - checks classes after loading
• Class loader - confines objects to unique namespaces. Prevents loading a hacked
"java.lang.SecurityManager" class, for example.
• Security manager - determines what resources a class can access such as reading and
writing to the local disk.

Good Performance:
Interpretation of byte codes slowed performance in early versions, but advanced virtual
machines with adaptive and just-in-time compilation and other techniques now typically
provide performance up to 50% to 100% the speed of C++ programs.

Built-in Networking:
Java was designed with networking in mind and comes with many classes to develop
sophisticated Internet communications. Features such as eliminating memory pointers and by
checking array limits greatly help to remove program bugs.

RUNTIME ENVIRONMENT SPECIFICATIONS


Hardware Requirements:
The physical equipment of a system is called the hardware and the following equipment
required for my project so that my project run efficiently
These equipments are as follows
1. P-Dual/Core 1.6GHz
2. Intel 845 GVSR Motherboard
3. 160GB HDD
4. Monitor
5. Keyboard
6. Mouse
7. Printer
8. CD/DVD Drive
Software requirement:
1. JDK 1.7
• Eclipse 8.0
• Net Beans 7.2.1
2. Database
• My SQL Database Server 5.5
3. Jdbc Driver for My SQL Database Server
• mysql-connector-java-5.1.22-bin.jar
4. Operating System
• Windows Vista / XP sp3 / Win 7 / Win 8/ Linux

Introduction to Online Paper Test

Purpose:
The purpose of Java Programming On-line Test is to take online test on JAVA
Programming Language in an efficient manner and no time wasting for checking the
paper. The main objective of on-line test is to efficiently evaluate the candidate
Thoroughly through a fully automated system that not only saves lot of time but also
Gives fast results. For students they give papers according to their convenience and
Time and there is no need of using extra thing like paper, pen etc.

Scope:
Scope of this project is very broad in terms of other manually taking exams.
Few of them are:-

• This can be used in educational institutions Specially in Java Training Center as well
as in corporate world to test Student’s Java Basic Skills in Only 10 minutes.
• Can be used anywhere any time as it is a web based application(user
Location doesn’t matter).
• No restriction that examiner has to be present when the candidate
Takes the test.

Features:
• Secure
• Easy to use
• Reliable and accurate
• No need of examiner
• Basic Overview of Java Programming Language.
The Java Programming Online test created for taking online test for Java Language
has following stages:-
• Login
• Test
• Result

Login/Input:
There is a quality login window because this is more secure than other login forms as in a
normal login window there is only one logins available so that only one person can access to
test with his/her individual login. The User has to fill up only His/her name to start the Java
Programming On-line Test. After Filling Name on textbox Press ok to see the instructions to
start the Test. Hence by Single Login Window it is more secure and reliable than previously
used on-line tests.

Test:
Test page is the most creative and important page in this project. It
Consists of 2 modules namely:
• Instructions.
• Questions with 4 Options.

Instructions:
The Following Instructions will appear will on the left Hand side of the Test Frame which
specifies all the rules & process to Start and complete the online Test efficiently.

1. There are 25 questions in this test and 10 minutes to complete them all.
2. The finish button is highlighted in blue when you reach the end of the test.
3. Clicking the finish button will display the results with the correct answers marked in
light red.
4. The time counter begins when you click on the 'start' button.
5. Best of luck!

Questions with 4 Options:


It includes:-
1. Start and next to the question afterwards if needed.
2. Finish Button to complete the Test only at the last. If The user Press Finish Button
In the middle of the test then a pop up window shows displaying the message that
“CYCLE THROUGH ALL THE QUESTIONS BEFORE PRESSING FINISH”.
3. Check Next & Check Previous Buttons to check the Answers of the Online test only
after completing the test.
4. Time Counter on the Right upper side of the Test Frame displaying the Time Used.

5. Four options on the Right side also displaying no of Options to be chosen with
Radio Buttons to fill the answer of the user.
Result:
After pressing on Finish Button One more Pop up Window will appear on the Screen
Displaying the Result of the User with
1. Total Marks of the User out of 10 as Each Correct Answer contains 1 mark.
2. Percentage
3. Over All Result of the On-line Test showing Whether the User is PASS or FAIL. If
the Total Marks >=9 then the User is PASS otherwise FAIL.

Program code:
/*Online Java Paper Test*/

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

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]);

bg.add(jb[i]);

b1=new JButton("Next");

b2=new JButton("Bookmark");

b1.addActionListener(this);

b2.addActionListener(this);

add(b1);add(b2);

set();

l.setBounds(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);

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

b2.setBounds(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(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()).setEnabled(false);

current=now;

if(e.getActionCommand().equals("Result"))

if(check())

count=count+1;

current++;

//System.out.println("correct ans="+count);

JOptionPane.showMessageDialog(this,"correct ans="+count);

System.exit(0);

void set()

jb[4].setSelected(true);

if(current==0)

{
l.setText("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)

l.setText("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("ActionEv
ent");

if(current==2)

l.setText("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)

l.setText("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)

l.setText("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)

l.setText("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)

l.setText("Que7: Which one among these is not a class ");

jb[0].setText("Swing");jb[1].setText("Actionperformed");jb[2].setText("ActionEvent");jb[3].se
tText("Button");

if(current==7)

l.setText("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("getDo
cumentBase");

if(current==8)

l.setText("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)

l.setText("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("JT
extArea");

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[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());
if(current==9)

return(jb[2].isSelected());

return false;

public static void main(String s[])

new OnlineTest("Online Test Of Java");

}
CONCLUSION:-

The Java Programming On line Test System is developed using Core Java
which fully meets the
Objectives of the system for which it has been developed. The system has
reached a steady
State where all bugs have been eliminated. The system is operated at a high
level of efficiency
and all the teachers and user associated with the system understands its
advantage. The
system solves the problem. It was intended to solve as requirement
specification.

The Software development is a complete process of designing software from the


analysis part of software from user requirements to designing, coding and
finally testing the complete functioning of the software in order to certify the
accuracy of the software in every aspect. It’s a complete process starting from
scratch to completion of the whole system.

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