0% found this document useful (0 votes)
13 views168 pages

Project 6

Uploaded by

aryanmaharana714
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)
13 views168 pages

Project 6

Uploaded by

aryanmaharana714
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/ 168

ODISHA ADARSHA VIDYALAYA

RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
ADITI BADAIK
CLASS: XII, A
ROLLNO:11

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

ADITI BADAIK
CLASS-XII, A
ROLLNO: 11
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
1. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
2. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
3. Platform:
 Desktop application.
 Offline functionality.

Objective
1. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
2. Accessibility: Make arithmetic calculations easy for non-
technical users.
3. Education: Help students and learners understand and
perform simple math operations.
4. Convenience: Offer an always-available alternative to
physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


1. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
2. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
3. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
4. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
5. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
6. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
7. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
8. Cross-Platform:
Available for Windows, mac OS, and Linux.
9. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
1. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
2. Install Java Development Kit (JDK) (Required for Java
Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
3. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
4. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
1. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
2. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
3. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
4. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
5. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
1. Information Technology for class XII
-By Sumit Arora
2. Database Management Applications Class XII student
Handbook.
-By CBSE
3. https://netbeans.apache.org/front/main/index.html
4. https://www.oracle.com/in/java/technologies/downloads/
5. https://chatgpt.com/
6. https://docs.oracle.com/javase/tutorial/uiswing
7. Online help of NetBeans
8. Various websites of discussion forum and software
development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
SHITAL EKKA
CLASS: XII, A
ROLLNO:2

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

SHITAL EKKA
CLASS-XII, A
ROLLNO: 2

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
4. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
5. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
6. Platform:
 Desktop application.
 Offline functionality.

Objective
5. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
6. Accessibility: Make arithmetic calculations easy for non-
technical users.
7. Education: Help students and learners understand and
perform simple math operations.
8. Convenience: Offer an always-available alternative to
physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


10. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
11. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
12. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
13. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
14. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
15. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
16. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
17. Cross-Platform:
Available for Windows, mac OS, and Linux.
18. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
5. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
6. Install Java Development Kit (JDK) (Required for Java
Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
7. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
8. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
6. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
7. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
8. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
9. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
10. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
9. Information Technology for class XII
-By Sumit Arora
10. Database Management Applications Class XII
student Handbook.
-By CBSE
11. https://netbeans.apache.org/front/main/index.html
12. https://www.oracle.com/in/java/technologies/downloads/
13. https://chatgpt.com/
14. https://docs.oracle.com/javase/tutorial/uiswing
15. Online help of NetBeans
16. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
TANUJA MINZ
CLASS: XII, A
ROLLNO:7

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

TANUJA MINZ
CLASS-XII, A
ROLLNO: 7

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
7. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
8. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
9. Platform:
 Desktop application.
 Offline functionality.

Objective
9. Efficiency: Provide a quick and reliable tool for
performing everyday calculations.
10. Accessibility: Make arithmetic calculations easy for
non- technical users.
11. Education: Help students and learners understand and
perform simple math operations.
12. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


19. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
20. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
21. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
22. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
23. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
24. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
25. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
26. Cross-Platform:
Available for Windows, mac OS, and Linux.
27. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
9. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
10. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
11. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
12. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
11. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
12. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
13. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
14. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
15. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
17. Information Technology for class XII
-By Sumit Arora
18. Database Management Applications Class XII
student Handbook.
-By CBSE
19. https://netbeans.apache.org/front/main/index.html
20. https://www.oracle.com/in/java/technologies/downloads/
21. https://chatgpt.com/
22. https://docs.oracle.com/javase/tutorial/uiswing
23. Online help of NetBeans
24. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
SHALINI BAG
CLASS: XII, A
ROLLNO:35

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

SHALINI BAG
CLASS-XII, A
ROLLNO: 35

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
10. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
11. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
12. Platform:
 Desktop application.
 Offline functionality.

Objective
13. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
14. Accessibility: Make arithmetic calculations easy for
non- technical users.
15. Education: Help students and learners understand and
perform simple math operations.
16. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


28. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
29. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
30. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
31. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
32. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
33. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
34. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
35. Cross-Platform:
Available for Windows, mac OS, and Linux.
36. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
13. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
14. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
15. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
16. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
16. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
17. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
18. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
19. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
20. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
25. Information Technology for class XII
-By Sumit Arora
26. Database Management Applications Class XII
student Handbook.
-By CBSE
27. https://netbeans.apache.org/front/main/index.html
28. https://www.oracle.com/in/java/technologies/downloads/
29. https://chatgpt.com/
30. https://docs.oracle.com/javase/tutorial/uiswing
31. Online help of NetBeans
32. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
MONICA MINZ
CLASS: XII, B
ROLLNO:2

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

MONICA MINZ
CLASS-XII, B
ROLLNO: 2

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
13. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
14. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
15. Platform:
 Desktop application.
 Offline functionality.

Objective
17. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
18. Accessibility: Make arithmetic calculations easy for
non- technical users.
19. Education: Help students and learners understand and
perform simple math operations.
20. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


37. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
38. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
39. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
40. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
41. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
42. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
43. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
44. Cross-Platform:
Available for Windows, mac OS, and Linux.
45. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
17. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
18. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
19. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
20. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
21. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
22. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
23. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
24. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
25. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
33. Information Technology for class XII
-By Sumit Arora
34. Database Management Applications Class XII
student Handbook.
-By CBSE
35. https://netbeans.apache.org/front/main/index.html
36. https://www.oracle.com/in/java/technologies/downloads/
37. https://chatgpt.com/
38. https://docs.oracle.com/javase/tutorial/uiswing
39. Online help of NetBeans
40. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
SANJANA MINZ
CLASS: XII, B
ROLLNO:7

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

SANJANA MINZ
CLASS-XII, B
ROLLNO: 7

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
16. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
17. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
18. Platform:
 Desktop application.
 Offline functionality.

Objective
21. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
22. Accessibility: Make arithmetic calculations easy for
non- technical users.
23. Education: Help students and learners understand and
perform simple math operations.
24. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


46. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
47. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
48. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
49. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
50. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
51. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
52. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
53. Cross-Platform:
Available for Windows, mac OS, and Linux.
54. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
21. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
22. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
23. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
24. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
26. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
27. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
28. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
29. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
30. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
41. Information Technology for class XII
-By Sumit Arora
42. Database Management Applications Class XII
student Handbook.
-By CBSE
43. https://netbeans.apache.org/front/main/index.html
44. https://www.oracle.com/in/java/technologies/downloads/
45. https://chatgpt.com/
46. https://docs.oracle.com/javase/tutorial/uiswing
47. Online help of NetBeans
48. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
NILIMA KUJUR
CLASS: XII, B
ROLLNO:20

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

NILIMA KUJUR
CLASS-XII, B
ROLLNO: 20

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
19. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
20. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
21. Platform:
 Desktop application.
 Offline functionality.

Objective
25. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
26. Accessibility: Make arithmetic calculations easy for
non- technical users.
27. Education: Help students and learners understand and
perform simple math operations.
28. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


55. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
56. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
57. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
58. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
59. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
60. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
61. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
62. Cross-Platform:
Available for Windows, mac OS, and Linux.
63. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
25. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
26. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
27. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
28. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
31. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
32. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
33. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
34. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
35. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
49. Information Technology for class XII
-By Sumit Arora
50. Database Management Applications Class XII
student Handbook.
-By CBSE
51. https://netbeans.apache.org/front/main/index.html
52. https://www.oracle.com/in/java/technologies/downloads/
53. https://chatgpt.com/
54. https://docs.oracle.com/javase/tutorial/uiswing
55. Online help of NetBeans
56. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17
ODISHA ADARSHA VIDYALAYA
RAJGANGPUR, SUNDARGARH
SESSION 2024-25

APROJECTON
____
Submitted By
JHARANA BANKRA
CLASS: XII, A
ROLLNO:23

Under the Guidance of


Mr. Manas Ranjan Nayak
Computer Science Teacher

Department of Computer Science


Odisha Adarsha Vidyalaya Rajgangpur, Sundargarh

Page| 1
CERTIFICATE
This is to certify that name of class XII has successfully
completed Project on Getting Any Character From
string under the guidance of Computer Science
Teacher Mr. Manas Ranjan Nayak during the Year
2024-25.

Signature of Teacher Signature of Principal


Name: Manas Ranjan Nayak

Page| 2
ACKNOWLEDGEMENT

W e undertook this project work, as the part of our XII-


Information Technology course. We had tried to apply our
best of knowledge and experience, gained during the study
and class work experience. However, developing software is
generally a quite complex and time-consuming process. It requires a
systematic study, insight vision and professional approach during the
design and development. Moreover, the developer always feels the
needs, the help and good wishes of people near you, who have
considerable experience and idea.

We would like to extend our sincere thanks and gratitude to our


teacher Mr. Manas Rajan Nayak (COMPUTER SCIENCE TEACHER).
We are very much thankful to our Principal Miss Banita Patel for
giving valuable time and moral support to develop this application

We would like to take opportunity extend our sincere thanks and


gratitude to our parents for being a source of inspiration and
providing time and freedom to develop this application.

JHARANA BANKRA
CLASS-XII, A
ROLLNO: 23

Page| 3
CONTENTS

SL Topics Page
No. number
1 Introduction 1
2 Objective & Scope of the Project 2
3 Theoretical Background 3 to 4
4 System Implementation 5
5 System Design & Development 6 to13
6 User Manual 14 to16
7 References 17

Page| 4
1. Introduction
In this project, we have developed a Simple Calculator App
using Java with the help of NetBeans IDE. The goal of the
application is to perform basic string manipulation
method charAt() it also deals with error
handling by implementing IF ELSE decession
making. This simple program serves as a great
beginner project for understanding
fundamental programming concepts regarding
string manipulation,
The project demonstrates how Java can be used to create
interactive applications that allow users to input values,
perform calculations, and view the results instantly. By
utilizing NetBeans IDE, we leverage its powerful tools for
GUI development, allowing us to design a clean and intuitive
user interface This application accepts a String
and an integer as input, fetches a character
lies in that location and displays it as
output.
This project is intended to enhance understanding of Java
syntax, GUI components such as buttons, text fields, and
labels, as well as basic control flow mechanisms for
processing arithmetic operations. Furthermore, it provides a
solid foundation for building more advanced Java applications
in the future.

Page| 1
2. Objective & Scope of the Project

Scope
22. Core Features:
 This application accepts a String and an integer as input,
fetches a character lies in that location and displays it as
output.
23. Design and Usability:
 User-friendly interface suitable for all age groups.
 Display of current input, operation and result in a
clear and readable manner.
24. Platform:
 Desktop application.
 Offline functionality.

Objective
29. Efficiency: Provide a quick
and reliable tool for performing
everyday calculations.
30. Accessibility: Make arithmetic calculations easy for
non- technical users.
31. Education: Help students and learners understand and
perform simple math operations.
32. Convenience: Offer an always-available alternative
to physical calculators.

Page| 2
3. Theoretical Background

3.1WhatisNetBeansIDE?
NetBeans is an open-source integrated development environment
(IDE) used primarily for developing Java applications, though it also
supports other languages such as C, C++, PHP, HTML, JavaScript,
and more. It provides a rich set of tools for developers to write, debug,
and optimize code efficiently.

Key Features of NetBeans


64. Support for Multiple Languages:
Native support for Java.
Plugins for C/C++, PHP, HTML5, Python, and other languages.
65. Code Editor:
Advanced text editor with features like syntax highlighting, auto-
completion, and code refactoring.
66. Project Management:
Helps organize code into projects with clear structures and easy
navigation.
67. Debugging Tools:
Built-in debugger to find and fix bugs in the code.
68. UI Development:
Visual design tools for creating graphical user interfaces (GUIs),
especially for Java Swing applications.
69. Integration with Build Tools:

Page| 3
Supports tools like Maven, Ant, and Gradle for build and dependency
management.
70. Version Control:
Built-in support for Git, Subversion(SVN), and Mercurial.
71. Cross-Platform:
Available for Windows, mac OS, and Linux.
72. Extensibility:
Allows installation of plugins to extend its capabilities.
Uses of NetBeans
It is used for Development of desktop, web, and mobile applications.
Learning and teaching programming concepts (common in academic
environments). Building enterprise applications using Java EE.
History and Current Status
It is originally developed by Sun Microsystems, later acquired by
Oracle. Currently it is maintained by the Apache Software Foundation
as part of the Apache Incubator program. Latest versions are branded
as Apache NetBeans.

Page| 4
4. System Implementation

Hardware Requirements:
 Computer with at least2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, mac OS, Linux).

Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for codingand UI design.
 Java Swing for the GUI

Page| 5
5. System Design & Development

Coding
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/

/**
*
* @author admin4
*/
public class NewJFrame6 extends javax.swing.JFrame {

/**
* Creates new form NewJFrame6
*/
public NewJFrame6() {
initComponents();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel1 = new javax.swing.JLabel();


jLabel2 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setText("Enter a sentence");

jLabel2.setText("Enter the location");

jTextField1.setText("jTextField1");

jButton1.setText("Find");
jButton1.addActionListener(new java.awt.event.ActionListener() {
Page| 6
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new


javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel2,
javax.swing.GroupLayout.DEFAULT_SIZE, 204, Short.MAX_VALUE)
.addComponent(jLabel1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)
.addComponent(jTextField2)))
.addGroup(layout.createSequentialGroup()
.addGap(224, 224, 224)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 153,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(174, 174, 174)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 315,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(101, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(50, 50, 50)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jTextField1,
javax.swing.GroupLayout.DEFAULT_SIZE, 52, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(18, 18, 18)

Page| 7
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE, 53,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(34, 34, 34)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29,
Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(70, 70, 70))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:
// TODO add your handling code here:
//declare necessary variables
String str= new String();
int loc;
char c;
//processing
str=jTextField1.getText();
loc=Integer.parseInt(jTextField2.getText());
//to check whether the entered location is negative or 0 if so it will display an
error
if(loc<=0)
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}
else if(loc<=str.length())
{
//loc is decreased 1 as length() counts form 0
loc--;
c=str.charAt(loc);
if(c==' ')
{
//loc increased to original(entered) value and displayed
loc++;
jLabel3.setText("The character at: "+loc+" is Space");
}
else
{
loc++;
jLabel3.setText("The character at: "+loc+" is "+c);
}
}

/*if loc is nether 0 nor negative nor within the string length then it must exceed
Page| 8
string length thus invalid location*/
else
{
jLabel3.setText("Invalid entry ! ! Plz try again");
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(NewJFrame6.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */


java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame6().setVisible(true);
}
});
}

Page| 9
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField1;
private javax.swing.JTextField jTextField2;
// End of variables declaration
}

Page| 10
RESULT

Page| 11
Testing with first set of inputs

Page| 12
Testing with another set of inpouts.

Page| 13
6. User Manual

How to install Software?


Hardware Requirements:
 Computer withatleast2GB of RAM, 1.0GHzCPU.
 Keyboard and mouse for user input.
 Display screen for showing the application interface.
 Java-compatible OS(Windows, macOS, Linux).
Software Requirements:
 Java Development Kit(JDK)(version8 or above).
 NetBeans IDE for coding and UI design.
 Java Swing for the GUI

Installing NetBeans
29. Download NetBeans:
Go to the official Apache NetBeans website.
Download the installer for your operating system
(Windows, macOS, or Linux).
30. Install Java Development Kit (JDK) (Required for
Java Development):
Ensure you have the JDK installed. You can download it
from the Oracle website or use Open JDK.
After installation, set the JAVA_HOM Environment variable to
point to the JDK installation directory.
31. Install NetBeans:
Run the downloaded installer.
Follow the on-screen instructions to complete the
installation process.

Page| 14
During installation, ensure it detects your JDK.
32. Launch NetBeans:
After installation, open NetBeans from your desktop or
applications menu.

Using NetBeans
36. Create a New Project:
 Click File > NewProject.
 Select the type of project (e.g., "Java with Maven"
or "Java Application").
 Click Next, enter project details (name, location),
and finish.
37. Write Code:
 Once the project is created, open the Main.java file
or the main class file.
 Write your code in the editor. It provides features
like syntax highlighting, auto-completion, and
suggestions.
38. Run Your Project:
 Click the Run button (green triangle) in the toolbar,
or press Shift + F6.
 The output will be displayed in the Output window
at the bottom.
39. Debug Your Code:
 Use the Debug button (green triangle with a bug
icon) to start debugging.
 Add breakpoints by clicking on the line number in
the editor.

Page| 15
 Inspect variables and step through the code in the
Debugger panel.
40. Manage Libraries and Dependencies:
 For Java projects, you can manage libraries via
Project Properties > Libraries.
 Use Maven or Gradle for dependency management
(build tools are integrated into NetBeans).

Page| 16
7. References

In order to work on this project, the following books and


literature are referred by me during the various phases of
development on the project.
57. Information Technology for class XII
-By Sumit Arora
58. Database Management Applications Class XII
student Handbook.
-By CBSE
59. https://netbeans.apache.org/front/main/index.html
60. https://www.oracle.com/in/java/technologies/downloads/
61. https://chatgpt.com/
62. https://docs.oracle.com/javase/tutorial/uiswing
63. Online help of NetBeans
64. Various websites of discussion
forum and software development activities

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also
helped me to develop software project.

Page| 17

You might also like