0% found this document useful (0 votes)
41 views39 pages

NM DEVOPS RECORD final year

Naan mudhalvan DevOps Report for final year students

Uploaded by

jonesjughead907
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)
41 views39 pages

NM DEVOPS RECORD final year

Naan mudhalvan DevOps Report for final year students

Uploaded by

jonesjughead907
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/ 39

TABLE OF CONTENTS

Sno. Date Content Pg.no. Signature

8
Exp no: 1 Introduction to Agile Methodology
Date:

AIM:
The aim is to understand the fundamentals of Agile methodology, including its values,
principles, and frameworks, and to compare it with traditional software development models.

SOFTWARE REQUIREMENTS:
 No specific software tools are required, as this experiment is theoretical.
 Access to course materials on the Infosys Springboard program.
 Optionally, Agile practice tools like Jira or Trello may be used for demonstration
purposes if available.

PROCEDURE:
1. Course Introduction
o The course outline was reviewed to understand the topics covered on Agile
methodology and software engineering basics.
o The educators in the course videos were introduced, with their areas of expertise
and teaching approaches noted.

PAGE NO:
2. Software Engineering Basics
o The Need for Software Engineering was studied to understand the purpose and
activities involved in creating reliable software.
o The concept of a software crisis was examined, which led to the development of
software engineering.
o Various traditional SDLC (Software Development Life Cycle) models were
reviewed, and the roles involved in a software team were discussed.

3. Traditional Software Engineering Models


o Different SDLC models were analyzed, including the Waterfall, Prototyping,
Spiral, and Rapid Application Development (RAD) models.
o A self-assessment quiz on the Waterfall Model was completed to assess
understanding.

PAGE NO:
4. Agile Manifesto
o The reasons for the rise of the Agile approach in IT were explored, with emphasis
on its four core values and 12 guiding principles.
o Understanding was reinforced through a quiz on Values and Principles of Agility.

5. Agile Frameworks
o Several Agile frameworks, including Scrum and Kanban, were studied to
understand how Agile can be adapted to various project needs.
o FAQs on Agile methods were reviewed, providing insights on applying each
framework based on different project requirements.

6. Traditional vs Agile
o A comparison between traditional SDLC methods and Agile was conducted,
focusing on how Agile evolved and the flexibility it offers, especially for rapid
delivery.

PAGE NO:
7. Gamification of Scrum and Kanban Activities
o Practical demonstrations of Agile principles were observed through activities
such as the Agility in Sprints - Airplane Activity and Kanban Coin Activity.

8. Summary
o A concluding quiz and assessment were completed to validate the understanding
of Agile methodology concepts.
THEORY AND APPLICATION:
Agile methodology is a software development approach that emphasizes flexibility,
customer collaboration, and incremental delivery. Instead of following rigid planning,
Agile prioritizes responding to changes, allowing software to be produced more quickly and
to adapt to client needs. The Agile Manifesto introduced four values: prioritizing individuals
and interactions over processes and tools, working software over comprehensive
documentation, customer collaboration over contract negotiation, and adapting to change
over following a strict plan.
In practical application, Agile frameworks such as Scrum and Kanban are widely utilized.
Scrum operates with iterative sprints, each delivering a potentially shippable product
increment. Kanban, on the other hand, visualizes work and manages flow by limiting work-
in-progress, promoting continuous improvement.

RESULT:

Thus the understand the fundamentals of Agile methodology, including its values, principles,
and frameworks, and to compare it with traditional software development models verified
successfully

PAGE NO:
Exp no: 2 Continuous Integration and Continuous Delivery
Date:

AIM:
The aim is to understand the principles of Continuous Integration and Continuous Delivery
(CI/CD) in DevOps, including the technology, people, and process aspects, along withpractical
implementation using Java and an open-source tool stack.

SOFTWARE REQUIREMENTS:
 Java Development Kit (JDK)
 Git for version control
 SonarQube for static code analysis
 JUnit for unit testing and code coverage
 Maven for build automation
 Docker for containerization
 A CI/CD tool (e.g., Jenkins)

PROCEDURE:
1. Prelude
o Pre-requisites for the course were reviewed, including the background
knowledge required.
o The learning outcomes were noted, providing an overview of what would be
achieved in this course.
o A case study was introduced, which would be referenced throughout the course
to contextualize DevOps concepts.

PAGE NO:
2. Fundamentals of DevOps
o Definitions of DevOps were explored, including popular industry perspectives
on the concept.
o A quiz was completed to evaluate understanding of DevOps fundamentals.

3. Devops Adoption in Projects


o The technology aspects of DevOps adoption were introduced, covering the tools
and infrastructure required.
o Capabilities needed for successful DevOps adoption were aligned with project
requirements.
o A quiz was taken to assess knowledge of these aligning capabilities.

PAGE NO:
o Various tool stacks and their implementation in DevOps were studied.
o The orchestration steps involved in Continuous Integration and Continuous
Delivery were examined, followed by a quiz on CI/CD concepts.
o People and process aspects were discussed, focusing on the roles and
responsibilities of team members in a DevOps environment.

4. Implementation of CI/CD with Java and Open Source Stack


o The open-source tool stack for creating a CI/CD pipeline was introduced.
o Version control was explained through the use of Git.
o Static code analysis was implemented using SonarQube.
o Automated unit testing was set up using JUnit, and code coverage tools were
introduced.
o Build automation was explained, using Maven to streamline the build process.
o The purpose of an artifact repository was discussed.
o The orchestration of build activities to create a continuous integration pipeline
was demonstrated.
o Dynamic environment provisioning and management were covered, along with
their role in a CI/CD pipeline.
o Release management steps were outlined for an automated CI/CD pipeline.

PAGE NO:
o The process of continuous delivery and deployment to staging and production
environments was explored.
o Containerization was explained to demonstrate its role in hassle-free deployment
across multiple environments.
o The concept of gating in a CI/CD pipeline was introduced, describing types and
methods of gating conditions.

5. Metrics and Measurement


o Common metrics used to evaluate the progress of an automated CI/CD pipeline
were explained, focusing on tracking efficiency and success rates.

PAGE NO:
6. Practice Exercises
o Practice exercises were provided as a guide, with step-by-step instructions for
constructing an automated continuous integration pipeline.
o The course concluded with a self-assessment to evaluate the understanding of
continuous integration and delivery concepts in DevOps.

THEORY AND APPLICATION:


DevOps is an approach that combines software development (Dev) and IT operations
(Ops), emphasizing collaboration, automation, and iterative delivery. CI/CD is a key
component of DevOps, ensuring that code changes are continuously integrated, tested, and
deployed to production environments. CI/CD pipelines automate much of the software
delivery process, allowing for more reliable and frequent releases.
A CI/CD pipeline typically involves several steps, including version control, static code
analysis, automated testing, build automation, and deployment. Tools like Git (for version
control), SonarQube (for code quality analysis), JUnit (for testing), Maven (for build
automation), and Docker (for containerization) are widely used in CI/CD implementations.

RESULT:

Thus the understand the principles of Continuous Integration and Continuous Delivery (CI/CD) in
DevOps, including the technology, people, and process aspects, along withpracticalimplementation
using Java and an open-source tool stack verified successfully.

PAGE NO:
Exp no: 3 Building of CI-CD Pipelines in Jenkins
Date:

AIM:
The aim of this experiment is to build an understanding of Continuous Integration and
Continuous Deployment (CI/CD) pipelines using Jenkins, along with their benefits and
application in DevOps.

SOFTWARE REQUIREMENTS:
 Jenkins

PROCEDURE:
Step 1: Login into your Jenkins account as shown below.
Step 2. Once logged in, the user will be redirected to the Jenkins console, here’s the
reference for the same.

Step 3:
To create a new project, select the option available in the Dashboard which is “New
Item” Refer to the image provided below:

PAGE NO:
Step 4:
Now a list of options will be visible on the screen, along with a field to name the pipeline.
Add a suitable name and select the “Pipeline” option to proceed. Refer to this screenshot.

Step 5:
Once redirected, the configuration page will appear. This is the most important page as here
all the details will be filled in. At first, there is the General section where the user can add a
description based on the project for which the pipeline has to be created. And establish the

PAGE NO:
connection to compute from where the pipeline will access the project. Refer to the
screenshot to understand better.

Step 6:
Now comes the second section, i.e. “Build triggers”. Here, we need to specify the branch and
repository and give the credentials too. And add additional behaviours if required so far.
Refer to the screenshot to have a better understanding.

Step 7:
The next section is “Advanced Project Options”, as the name suggests it is related to thespecial
pipelines only, simpler projects do not require any specifications in this section. Please refer to
the screenshot given below for the same.

PAGE NO:
Step 8:
This is the last section i.e. “Pipeline”. Here the user specifies from where the scripts will be
imported including the path to the file, repository, credentials, etc. Refer to the screenshot
attached below for reference.

Sample Pipeline script To Deploy the Web Application Into The Tomcat Server
node
{
//Mention the tools which have been configured

def mavenhome= tool name:"*****"

PAGE NO:
// Mention how to trigger the Pipeline and how many Builds must be there and so on

properties([buildDiscarder(logRotator(artifactDaysToKeepStr:
'', artifactNumToKeepStr: '5', daysToKeepStr: '
', numToKeepStr: '5')), pipelineTriggers([pollSCM('* * * * *')])])

// Getting the code from the GitHub

stage('checkout code'){
git branch: 'development', credentialsId: '*******', url: '********'
}

//Building the code in to packages by using maven

stage('build'){
sh "${mavenhome}/bin/mvn clean package"

//Executing the code quality report by using SonarQube

}
stage('execute sonarqube package'){
sh "${mavenhome}/bin/mvn clean sonar:sonar"

//Uploading the package into nexus

}
stage('upload buildartifact'){
sh "${mavenhome}/bin/mvn clean deploy"

//Deploying th application into Tomcat

}
stage('tomcat'){
sshagent(['myuser']) {
sh "scp -o StrictHostKeyChecking=no target
/maven-web-application.war ec2-user@myuser:/opt/apache-tomcat-9.0.64/webapps/
}
}

PAGE NO:
Step 9:
After writing the pipeline is done click on save it will be directly redirected to the Dashboard
of the project there we can use, the “Build Now” option to run the pipeline and check if it is
successful or not, by using stage view or console output.

We can see the outcome of the pipeline in the stage view where as shown in the image
below.

PAGE NO:
And we can also see the console output where we can see logs of each and every step which
is performed.

Click on the console output to see the logs of each and every stage that is performed by using
the pipeline.

PAGE NO:
Scroll down to the end of the console output there we can see the status of the pipeline if it
is “Finished: success” The pipeline which we have written was a success. If it marks as a
fail we see the logs in the console we can find the reason why the stage was getting failed.
THEORY AND APPLICATION:
DevOps professionals rely on pipelines to automate stages such as building, testing, and
deploying applications. Manually handling these tasks via a user interface consumes
significant time and can impact productivity. By using CI/CD pipeline scripts, teams can
automate these processes, boosting productivity, minimizing errors, and enhancing delivery
speed. CI/CD pipelines help to deliver high-quality applications efficiently to end users.
What is a CI/CD Pipeline?
A CI/CD pipeline, short for Continuous Integration / Continuous Deployment, is a
structured, automated process that enables seamless integration and deployment of code
changes. In a CI/CD pipeline, multiple stages are linked to create a processing system where
each stage receives input, processes it based on predefined rules, and passes it on to the next
stage. This linear flow, in which each stage depends on the successful completionof the
previous stage, ensures stability and efficiency in application delivery. A typical CI/CD
pipeline includes steps like testing code, building the application, pushing to a repository, and
deploying to a server.
Each step occurs sequentially, and if any stage fails, subsequent steps halt until the error is
resolved, ensuring quality is maintained at every stage. The Devops Engineering – Planning
to Production course is a valuable resource, offering real-world examples and best practices
for setting up and optimizing CI/CD pipelines using Jenkins.

PAGE NO:
What is Continuous Integration (CI)?
Continuous Integration (CI) is the practice of automatically building and testing code
whenever changes are pushed to a repository, such as GitHub or GitLab. This automation
ensures that code remains functional and meets standards before being merged into a shared
repository, allowing for rapid detection of issues and increased development speed.

Benefits of Continuous Integration (CI)


 Continuous integration allows for frequent project reports, helping teams to stay
informed of the project’s health.
 Deployments can be completed within set timeframes.
 Bugs are detected promptly, reducing the time and resources needed for
troubleshooting.

What is Continuous Deployment/Delivery (CD)?


Continuous Deployment
Continuous Deployment involves automating the deployment of applications or code to
different environments, such as Development, Testing, and Production. With CI/CD pipelines,
every build and test stage can be configured to proceed automatically, reducing manual
intervention and enabling faster releases.

Continuous Delivery
Continuous Delivery enables teams to deliver builds into production with minimal human
intervention. Every build that passes all automated tests can be deployed into production with
just a single click, allowing for a rapid and efficient release process while maintaining high
quality.

RESULT:
Thus the experiment is to build an understanding of Continuous Integration andContinuous
Deployment (CI/CD) pipelines using Jenkins, along with their benefits and application in
DevOps verified successfully.

PAGE NO:
Exp no: 4 Installation of Jenkins
Date:

AIM:
To successfully install Jenkins, a popular open-source automation server, to facilitate
continuous integration and continuous deployment (CI/CD) processes.
SOFTWARE REQUIREMENTS:
 Java: Jenkins requires Java to run. Ensure you have Java Development Kit (JDK)
version 8 or higher installed.
 Web Browser: A modern web browser for accessing the Jenkins web interface.
 Operating System: Jenkins can be installed on various operating systems including
Windows, macOS, and Linux.
 Minimum Hardware Requirements: RAM: 256 MB (1 GB recommended for better
performance).Disk Space: 1 GB (10 GB recommended for Docker
installations).Recommended Hardware Configuration: RAM: 4 GB or more, Disk Space:
50 GB or more
PROCEDURE FOR INSTALLATION:
Step 1: Setup wizard
On opening the Windows Installer, an Installation Setup Wizard appears, Click Next on
the Setup Wizard to start your installation.

PAGE NO:
Step 2: Select destination folder
Select the destination folder to store your Jenkins Installation and click Next to continue.

Step 3: Service logon credentials


When Installing Jenkins, it is recommended to install and run Jenkins as an independent
windows service using a local or domain user as it is much safer than running Jenkins using
Local System(Windows equivalent of root) which will grant Jenkins full access to your
machine and services.
To run Jenkins service using a local or domain user, specify the domain user name and
password with which you want to run Jenkins, click on Test Credentials to test your domain
credentials and click on Next.

PAGE NO:
Step 4: Port selection
Specify the port on which Jenkins will be running, Test Port button to validate whether the
specified port if free on your machine or not. Consequently, if the port is free, it will show a
green tick mark as shown below, then click on Next.

Step 5: Select Java home directory


The installation process checks for Java on your machine and prefills the dialog with the Java
home directory. If the needed Java version is not installed on your machine, you will be
prompted to install it.Once your Java home directory has been selected, click on Next to
continue.

PAGE NO:
Step 6: Custom setup
Select other services that need to be installed with Jenkins and click on Next.

Step 7: Install Jenkins


Click on the Install button to start the installation of Jenkins.

PAGE NO:
Step 8: Finish Jenkins installation
Once the installation completes, click on Finish to complete the installation.

Jenkins will be installed as a Windows Service. You can validate this by browsing
the services section, as shown below:

Post-installation setup wizard


After downloading, installing and running Jenkins, the post-installation setup wizard begins.

PAGE NO:
This setup wizard takes you through a few quick "one-off" steps to unlock Jenkins, customize
it with plugins and create the first administrator user through which you can continue
accessing Jenkins.

Unlocking Jenkins
When you first access a new Jenkins controller, you are asked to unlock it using an
automatically-generated password.
Step 1
Browse to http://localhost:8080 (or whichever port you configured for Jenkins when
installing it) and wait until the Unlock Jenkins page appears.

Step 2
The initial Administrator password should be found under the Jenkins installation path (set
at Step 2 in Jenkins Installation).
For default installation location to C:\Program Files\Jenkins, a file
called initialAdminPassword can be found under C:\Program Files\Jenkins\secrets.
However, If a custom path for Jenkins installation was selected, then you should check that
location for initialAdminPassword file.

PAGE NO:
Step 3
Open the highlighted file and copy the content of the initialAdminPassword file.

Step 4
On the Unlock Jenkins page, paste this password into the Administrator password field
and click Continue.
Notes:
 You can also access Jenkins logs in the jenkins.err.log file in your Jenkins directory
specified during the installation.
 The Jenkins log file is another location (in the Jenkins home directory) where the
initial password can also be obtained.

PAGE NO:
This password must be entered in the setup wizard on new Jenkins installations before you can
access Jenkins’s main UI. This password also serves as the default administrator account’s
password (with username "admin") if you happen to skip the subsequent user- creation step in
the setup wizard.
DASHBOARD OF JENKINS:

Theory and Application


Jenkins is used for automating the software development process, allowing teams to build, test,
and deploy applications efficiently. It supports various plugins that enhance its functionality,
making it adaptable to different workflows and technologies.

RESULT:
Thus the install Jenkins, a popular open-source automation server, to facilitatecontinuous
integration and continuous deployment (CI/CD) processes verified successfully.

PAGE NO:
Exp no: 5 Installation of SonarQube
Date:

AIM:
To successfully install SonarQube, an open-source platform for continuous inspection of code
quality, enabling teams to manage code quality and security in their software development
projects.
SOFTWARE REQUIREMENTS:
 Java JDK: SonarQube requires Java 11 or later. Ensure that JDK is installed and
configured properly.
 Database: SonarQube requires a database to store analysis results. Supported
databases include:
 PostgreSQL (recommended)
 MySQL
 Oracle
 Microsoft SQL Server
 Web Browser: A modern web browser for accessing the SonarQube web interface.
Minimum Hardware Requirements
 RAM: 2 GB (4 GB recommended for better performance).
 Disk Space: 1 GB (more depending on the size of the projects).
Recommended Hardware Configuration
 RAM: 8 GB or more.
 Disk Space: 20 GB or more.
Step 1: Download and Install Oracle Java 17
Before installing SonarQube, ensure you have Java installed. Follow these steps:
1. Download Oracle Java 17 from Oracle’s website.
2. Run the downloaded installer and follow the installation wizard.
3. Set the JAVA_HOME environment variable to C:\Program Files\Java\jdk-17\bin.
Step 2: Download and Install SonarQube

PAGE NO:
Now, let’s install SonarQube:
1. Download the SonarQube zip file from SonarSource.
2. Extract the contents of the zip file to C:\sonarqube-10.4.1.88267.
3. Set the SONAR_JAVA_PATH environment variable using CMD:
set "SONAR_JAVA_PATH=C:\Program Files\Java\jdk-17\bin\java.exe"

Step 3: Start SonarQube


Start Sonar Qube using the following command in CMD:

Step 4: Access SonarQube Web Interface


1. Open a web browser and navigate to http://localhost:9000.
2. Log in with the default credentials (admin/admin).
3. Follow the prompts to change the password.
Step 5: Install SonarScanner
SonarScanner allows you to analyze your projects for code quality. Here’s how to install it:
1. Download SonarScanner CLI from SonarSource.
2. Extract the contents to a directory, e.g., C:\sonar-scanner-5.0.1.3006-windows.

Step 6: Analyze Your Project


1. Open CMD prompt.
2. Run the SonarScanner command:

PAGE NO:
C:\sonar-scanner-5.0.1.3006-windows\bin\sonar-scanner.bat -
D"sonar.projectKey=myproject" -D"sonar.sources=." -
D"sonar.host.url=http://localhost:9000" -D"sonar.login=<your_token_here>"
Replace myproject with your project key and <your_token_here> with your generated token
from SonarQube.
Step 7: Create and Analyze a Project in SonarQube
1. Log in to SonarQube dashboard.
2. Navigate to Projects tab > Create Project.

3. Set up the project using global settings.

4. Analyze your project locally using SonarScanner.


5. Provide a token for authentication and execute the SonarScanner command.

PAGE NO:
Theory and Application
 Theory: SonarQube is a tool that enables developers to continuously inspect thequality
of code. It provides reports on code smells, bugs, vulnerabilities, and coverage metrics,
helping teams maintain high code quality.
 Application: It is widely used in software development environments to integrate quality
checks into the CI/CD pipeline. SonarQube can analyze multiple programming
languages and integrates with various CI tools like Jenkins, GitLab CI, and more.

RESULT:
Thus the install SonarQube, an open-source platform for continuous inspection of codequality,
enabling teams to manage code quality and security in their software development projects
verified successfully.

PAGE NO:
Exp no: 6 Installation of Eclipse IDE
Date:

AIM:
To successfully install Eclipse IDE, a popular open-source integrated development
environment (IDE) used for Java development and other programming languages.
SOFTWARE REQUIREMENTS:
Prerequisites
 Java Development Kit (JDK): Eclipse requires Java to run. Ensure you have JDK
version 11 or higher installed.
 Operating System: Eclipse can be installed on various operating systems including
Windows, macOS, and Linux.
Minimum Hardware Requirements
 RAM: 4 GB (8 GB recommended for better performance).
 Disk Space: 1 GB (more depending on the number of plugins and projects).
Recommended Hardware Configuration
 RAM: 8 GB or more.
 Disk Space: 5 GB or more.

PROCEDURE:
5 Steps to Install Eclipse

1. Download the Eclipse Installer


Download Eclipse Installer from http://www.eclipse.org/downloads
Eclipse is hosted on many mirrors around the world. Please select the one closest to you and
start to download the Installer

2. Start the Eclipse Installer executable


For Windows users, after the Eclipse Installer executable has finished downloading it should
be available in your download directory. Start the Eclipse Installer executable. You may get a

PAGE NO:
security warning to run this file. If the Eclipse Foundation is the Publisher, you are good to
select Run.
For Mac and Linux users, you will still need to unzip the download to create the Installer.
Start the Installer once it is available.

3. Select the package to install


The new Eclipse Installer shows the packages available to Eclipse users. You can search for
the package you want to install or scroll through the list.
Select and click on the package you want to install.

PAGE NO:
4. Select your installation folder
Specify the folder where you want Eclipse to be installed. The default folder will be in your
user directory. Select the ‘Install’ button to begin the installation.

5. Launch Eclipse
Once the installation is complete you can now launch Eclipse. The Eclipse Installer has
done it's work.

PAGE NO:
Theory and Application
 Theory: Eclipse IDE is a powerful tool that provides a comprehensive environment
for software development. It supports multiple programming languages through
plugins and offers features like code completion, debugging, and version control
integration.
 Application: Eclipse is widely used in the industry for Java development, but it also
supports other languages such as C/C++, PHP, and Python through various plugins.
It is especially popular for developing enterprise applications, Android apps, and web
applications.

RESULT:
Thus the install Eclipse IDE, a popular open-source integrated developmentenvironment (IDE)
used for Java development and other programming languages verified successfully.

PAGE NO:
Exp no: 7 Calculator App in Java using Eclipse IDE
Date:

AIM:
To create a simple calculator application in Eclipse using Java Swing, capable of performing
basic arithmetic operations (addition, subtraction, multiplication, and division).
SOFTWARE REQUIREMENTS:
 Java Development Kit (JDK)
 Eclipse IDE
 Java Swing Library
PROCEDURE:
1. Setup and Configuration:
o Open Eclipse IDE and create a new Java Project.
o Name the project as desired (e.g., "CalculatorApp") and set up the workspace.
o Inside the project, create a new Java class named Calculator.

2. Import Required Packages:


o Import necessary libraries at the beginning of the Calculator class, including:

PAGE NO:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
3. Initialize Components:

o Initialize JFrame, JTextField, JButton, and other components inside the


constructor of the Calculator class.
o Set properties such as font, size, and layout for each component.
o Use arrays to organize the number and function buttons, then add them to a
panel to arrange them in a grid layout.
4. Configure Button Actions:
o Implement ActionListener in the class and override the actionPerformed
method.
o Define logic for each button press within actionPerformed, including:
 Number Buttons: Append numbers to the display text field.
 Operation Buttons (+, -, *, /): Store the first number, set the operator,
and clear the display.
 Equals Button (=): Perform the calculation based on the selected
operator.
 Clear Button (C): Clear the text field.
 Delete Button (Del): Remove the last digit entered.

PAGE NO:
5. Add Components to Frame:
o Add the panel containing number and operation buttons to the frame.
o Set the frame’s properties (size, visibility, layout) and make it visible for
interaction.
6. Run and Test:
o Compile and run the program in Eclipse.
o Test each function to ensure buttons respond correctly and calculations are accurate.

THEORY AND APPLICATION:


The calculator application is built using Java Swing, a part of Java's Abstract Window Toolkit
(AWT) for creating window-based applications. Java Swing provides a rich set of GUI
components and features that allow us to create user-friendly interfaces. This project
primarily makes use of JFrame for the main window, JTextField for displaying numbers and
results, and JButton for interactive buttons.
Key Features Implemented
1. Basic Arithmetic Operations: The application supports addition, subtraction,
multiplication, and division.

PAGE NO:
2. User Interface Elements:
o Display Field: A non-editable JTextField to show the current input and
calculation results.
o Number and Operation Buttons: Buttons are created for numbers (0-9) and
basic arithmetic operations (+, -, *, /), alongside buttons for decimal input (.),
equals (=), clear (C), delete (Del), and negation ((-)).
o Event Handling: Implements ActionListener to handle button clicks, capture
inputs, and perform calculations based on the selected operation.

RESULT:
Thus the simple calculator application in Eclipse using Java Swing, capable of performing
basic arithmetic operations (addition, subtraction, multiplication, and division) verified
successfully.

PAGE NO:

You might also like

pFad - Phonifier reborn

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

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


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy