KEMBAR78
CMMI Maturity Levels Explained | PDF | Html Element | Java (Programming Language)
0% found this document useful (0 votes)
254 views23 pages

CMMI Maturity Levels Explained

The document discusses the five maturity levels of the Capability Maturity Model Integration (CMMI) framework. Each maturity level builds upon the previous one and provides a foundation for continuous process improvement. Maturity Level 1 focuses on basic project management processes. Maturity Level 2 introduces managed processes. Maturity Level 3 establishes defined and standardized processes. Maturity Level 4 quantitatively manages processes. Maturity Level 5 optimizes processes through continuous improvement. Higher maturity levels involve more rigorous, quantitative, and predictable processes.

Uploaded by

Chaithanya Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
254 views23 pages

CMMI Maturity Levels Explained

The document discusses the five maturity levels of the Capability Maturity Model Integration (CMMI) framework. Each maturity level builds upon the previous one and provides a foundation for continuous process improvement. Maturity Level 1 focuses on basic project management processes. Maturity Level 2 introduces managed processes. Maturity Level 3 establishes defined and standardized processes. Maturity Level 4 quantitatively manages processes. Maturity Level 5 optimizes processes through continuous improvement. Higher maturity levels involve more rigorous, quantitative, and predictable processes.

Uploaded by

Chaithanya Kumar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 23

CMMI

A maturity level is a well-defined evolutionary plateau toward achieving a mature software process. Each maturity level provides a layer in the foundation for continuous process improvement. In CMMI models with a staged representation, there are five maturity levels designated by the numbers 1 through 5 1. 2. 3. 4. 5. Initial Managed Defined Quantitatively Managed Optimizing CMMI Staged Represenation- Maturity Levels

Now we will give more detail about each maturity level. Next section will list down all the process areas related to these maturity levels.

Maturity Level Details:


Maturity levels consist of a predefined set of process areas. The maturity levels are measured by the achievement of the specific and generic goals that apply to each predefined set of process areas. The following sections describe the characteristics of each maturity level in detail.

Maturity Level 1 - Initial


At maturity level 1, processes are usually ad hoc and chaotic. The organization usually does not provide a stable environment. Success in these organizations depends on the competence and heroics of the people in the organization and not on the use of proven processes. Maturity level 1 organizations often produce products and services that work; however, they frequently exceed the budget and schedule of their projects. Maturity level 1 organizations are characterized by a tendency to over commit, abandon processes in the time of crisis, and not be able to repeat their past successes.

Maturity Level 2 - Managed


At maturity level 2, an organization has achieved all the specific and generic goals of the maturity level 2 process areas. In other words, the projects of the organization have ensured that requirements are managed and that processes are planned, performed, measured, and controlled. The process discipline reflected by maturity level 2 helps to ensure that existing practices are retained during times of stress. When these practices are in place, projects are performed and managed according to their documented plans. At maturity level 2, requirements, processes, work products, and services are managed. The status of the work products and the delivery of services are visible to management at defined points. Commitments are established among relevant stakeholders and are revised as needed. Work products are reviewed with stakeholders and are controlled. The work products and services satisfy their specified requirements, standards, and objectives.

Maturity Level 3 - Defined


At maturity level 3, an organization has achieved all the specific and generic goals of the process areas assigned to maturity levels 2 and 3. At maturity level 3, processes are well characterized and understood, and are described in standards, procedures, tools, and methods. A critical distinction between maturity level 2 and maturity level 3 is the scope of standards, process descriptions, and procedures. At maturity level 2, the standards, process descriptions, and procedures may be quite different in each specific instance of the process (for example, on a particular project). At maturity level 3, the standards, process descriptions, and procedures for a project are tailored from the organization's set of standard processes to suit a particular project or organizational unit. The organization's set of standard processes includes the processes addressed

at maturity level 2 and maturity level 3. As a result, the processes that are performed across the organization are consistent except for the differences allowed by the tailoring guidelines. Another critical distinction is that at maturity level 3, processes are typically described in more detail and more rigorously than at maturity level 2. At maturity level 3, processes are managed more proactively using an understanding of the interrelationships of the process activities and detailed measures of the process, its work products, and its services.

Maturity Level 4 - Quantitatively Managed


At maturity level 4, an organization has achieved all the specific goals of the process areas assigned to maturity levels 2, 3, and 4 and the generic goals assigned to maturity levels 2 and 3. At maturity level 4 Subprocesses are selected that significantly contribute to overall process performance. These selected subprocesses are controlled using statistical and other quantitative techniques. Quantitative objectives for quality and process performance are established and used as criteria in managing processes. Quantitative objectives are based on the needs of the customer, end users, organization, and process implementers. Quality and process performance are understood in statistical terms and are managed throughout the life of the processes. For these processes, detailed measures of process performance are collected and statistically analyzed. Special causes of process variation are identified and, where appropriate, the sources of special causes are corrected to prevent future occurrences. Quality and process performance measures are incorporated into the organization.s measurement repository to support fact-based decision making in the future. A critical distinction between maturity level 3 and maturity level 4 is the predictability of process performance. At maturity level 4, the performance of processes is controlled using statistical and other quantitative techniques, and is quantitatively predictable. At maturity level 3, processes are only qualitatively predictable.

Maturity Level 5 - Optimizing


At maturity level 5, an organization has achieved all the specific goals of the process areas assigned to maturity levels 2, 3, 4, and 5 and the generic goals assigned to maturity levels 2 and 3. Processes are continually improved based on a quantitative understanding of the common causes of variation inherent in processes. Maturity level 5 focuses on continually improving process performance through both incremental and innovative technological improvements.

Quantitative process-improvement objectives for the organization are established, continually revised to reflect changing business objectives, and used as criteria in managing process improvement. The effects of deployed process improvements are measured and evaluated against the quantitative process-improvement objectives. Both the defined processes and the organization's set of standard processes are targets of measurable improvement activities. Optimizing processes that are agile and innovative depends on the participation of an empowered workforce aligned with the business values and objectives of the organization. The organization's ability to rapidly respond to changes and opportunities is enhanced by finding ways to accelerate and share learning. Improvement of the processes is inherently part of everybody's role, resulting in a cycle of continual improvement. A critical distinction between maturity level 4 and maturity level 5 is the type of process variation addressed. At maturity level 4, processes are concerned with addressing special causes of process variation and providing statistical predictability of the results. Though processes may produce predictable results, the results may be insufficient to achieve the established objectives. At maturity level 5, processes are concerned with addressing common causes of process variation and changing the process (that is, shifting the mean of the process performance) to improve process performance (while maintaining statistical predictability) to achieve the established quantitative process-improvement objectives.

Maturity Levels Should Not be Skipped:


Each maturity level provides a necessary foundation for effective implementation of processes at the next level.

Higher level processes have less chance of success without the discipline provided by lower levels. The effect of innovation can be obscured in a noisy process.

Higher maturity level processes may be performed by organizations at lower maturity levels, with the risk of not being consistently applied in a crisis.

Maturity Levels and Process Areas:


Here is a list of all the corresponding process areas defined for a S/W organization. These process areas may be different for different organization. This section is just giving names of the related process areas, for more detail about these Process Areas go through CMMI Process Areas Chapter. Level Focus Key Process Area Result

5 Optimizing

Continuous Process Improvement

Organizational Innovation and Deployment Causal Analysis and Resolution Organizational Process Performance Quantitative Project Management Requirements Development Technical Solution Product Integration Verification Validation Organizational Process Focus Organizational Process Definition Organizational Training Integrated Project Mgmt (with IPPD extras) Risk Management Decision Analysis and Resolution Integrated Teaming (IPPD only) Org. Environment for Integration (IPPD only) Integrated Supplier Management (SS only) Requirements Management Project Planning Project Monitoring and Control Supplier Agreement Management Measurement and Analysis Process and Product Quality Assurance Configuration Management

Highest Quality / Lowest Risk Higher Quality / Lower Risk

4 Quantitatively Quantitatively Managed Managed

3 Defined

Process Standardization

Medium Quality / Medium Risk

2 Managed

Basic Project Management

Low Quality / High Risk

1 Initial

Process is informal and Adhoc

Lowest Quality / Highest Risk

Describe that Software development is a layered technology.


Software Development is a Layered Technology : Software development is totally a layered technology. That means, to develop software one will have to go from one layer to another. The layers are related and each layer demands the fulfillment of the previous layer. Figure below is the upward flowchart of the layers of software development.

01. A Quality Focus : Software engineering must rest on an organizational commitment to quality. Total quality management and similar philosophies foster a continuous process improvement culture, and this culture ultimately leads to the development of increasingly more mature approaches to software engineering. The bedrock that supports software engineering is a quality focus.

02. Process : The foundation for software engineering is the process layer. Process defines a framework for a set of Key Process Areas (KPAs) that must be established for effective delivery of software engineering technology. This establishes the context in which technical methods are applied, work products such as models, documents,

data, reports, forms, etc. are produced, milestones are established, quality is ensured, and change is properly managed.

03. Methods : Software engineering methods provide the technical how-to's for building software. Methods will include requirements analysis, design, program construction, testing, and support. This relies on a set of basic principles that govern each area of the technology and include modeling activities and other descriptive techniques.

04. Tools : Software engineering tools provide automated or semi-automated support for the process and the methods. When tools are integrated so that information created by one tool can be used by another, a system for the support of software development, called computer-aided software engineering, is established.

What is HTML?
HTML is a language for describing web pages. HTML stands for Hyper Text Markup Language HTML is a markup language A markup language is a set of markup tags The tags describe document content HTML documents contain HTML tags and plain text HTML documents are also called web pages

HTML Tags
HTML markup tags are usually called HTML tags

HTML tags are keywords (tag names) surrounded by angle brackets like <html> HTML tags normally come in pairs like <b> and </b> The first tag in a pair is the start tag, the second tag is the end tag The end tag is written like the start tag, with a forward slash before the tag name Start and end tags are also called opening tags and closing tags

<tagname>content</tagname>

HTML Unordered Lists


An unordered list starts with the <ul> tag. Each list item starts with the <li> tag. The list items are marked with bullets (typically small black circles).

<ul> <li>Coffee</li> <li>Milk</li> </ul>


How the HTML code above looks in a browser: Coffee Milk

HTML Ordered Lists


An ordered list starts with the <ol> tag. Each list item starts with the <li> tag. The list items are marked with numbers.

<ol> <li>Coffee</li> <li>Milk</li> </ol>


How the HTML code above looks in a browser: 1. Coffee 2. Milk

HTML Definition Lists

A definition list is a list of items, with a description of each item. The <dl> tag defines a definition list. The <dl> tag is used in conjunction with <dt> (defines the item in the list) and <dd> (describes the item in the list):

<dl> <dt>Coffee</dt> <dd>- black hot drink</dd> <dt>Milk</dt> <dd>- white cold drink</dd> </dl>
How the HTML code above looks in a browser: Coffee - black hot drink Milk - white cold drink

Styling HTML with CSS


CSS was introduced together with HTML 4, to provide a better way to style HTML elements. CSS can be added to HTML in the following ways: Inline - using the style attribute in HTML elements Internal - using the <style> element in the <head> section External - using an external CSS file

The preferred way to add CSS to HTML, is to put CSS syntax in separate CSS files. However, in this HTML tutorial we will introduce you to CSS using the style attribute. This is done to simplify the examples. It also makes it easier for you to edit the code and try it yourself. You can learn everything about CSS in our CSS Tutorial.

Inline Styles
An inline style can be used if a unique style is to be applied to one single occurrence of an element.

To use inline styles, use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example below shows how to change the text color and the left margin of a paragraph:

<p style="color:blue;margin-left:20px;">This is a paragraph.</p>


To learn more about style sheets, visit our CSS tutorial.

HTML Style Example - Background Color


The background-color property defines the background color for an element:

Example
<!DOCTYPE html> <html> <body style="background-color:yellow;"> <h2 style="background-color:red;">This is a heading</h2> <p style="background-color:green;">This is a paragraph.</p> </body> </html>

Try it yourself The background-color property makes the "old" bgcolor attribute obsolete. Try it yourself: Background color the old way

HTML Style Example - Font, Color and Size


The font-family, color, and font-size properties defines the font, color, and size of the text in an element:

Example
<!DOCTYPE html> <html> <body>

<h1 style="font-family:verdana;">A heading</h1> <p style="font-family:arial;color:red;font-size:20px;">A paragraph.</p> </body> </html>

Try it yourself The font-family, color, and font-size properties make the old <font> tag obsolete.

HTML Style Example - Text Alignment


The text-align property specifies the horizontal alignment of text in an element:

Example
<!DOCTYPE html> <html> <body> <h1 style="text-align:center;">Center-aligned heading</h1> <p>This is a paragraph.</p> </body> </html>

Try it yourself The text-align property makes the old <center> tag obsolete. Try it yourself: Centered heading the old way

Internal Style Sheet


An internal style sheet can be used if one single document has a unique style. Internal styles are defined in the <head> section of an HTML page, by using the <style> tag, like this:

<head> <style type="text/css"> body {background-color:yellow;} p {color:blue;} </style> </head>

External Style Sheet


An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the <head> section:

<head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head>

HTML Style Tags


Tag <style> <link> Description Defines style information for a document Defines the relationship between a document and an external resource

Deprecated Tags and Attributes


In HTML 4, several tags and attributes were used to style documents. These tags are not supported in newer versions of HTML. Avoid using the elements: <font>, <center>, and <strike>, and the attributes: color and bgcolor.

JavaScript Strings
A string simply stores a series of characters like "John Doe". A string can be any text inside quotes. You can use simple or double quotes:

Example
var carname="Volvo XC60"; var carname='Volvo XC60';
You can access each character in a string with its position (index):

Example
var character=carname[7];
String indexes are zero-based, which means the first character is [0], the second is [1], and so on. You can use quotes inside a string, as long as they don't match the quotes surrounding the string:

Example
var answer="It's alright"; var answer="He is called 'Johnny'"; var answer='He is called "Johnny"';
Or you can put quotes inside a string by using the \ escape character:

Example
var answer='It\'s alright'; var answer="He is called \"Johnny\"";

Try it yourself

String Length
The length of a string (a string object) is found in the built in property length:

Example
var txt="Hello World!"; document.write(txt.length); var txt="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; document.write(txt.length);

Try it yourself

Finding a String in a String


The indexOf() method returns the position (as a number) of the first found occurrence of a specified text inside a string:

Example
var str="Hello world, welcome to the universe."; var n=str.indexOf("welcome");

Try it yourself The method returns -1 if the specified text is not found. The lastIndexOf() method starts searching at the end of the string instead of at the beginning.

Matching Content
The match() method can be used to search for a matching content in a string:

Example
var str="Hello world!"; document.write(str.match("world") + "<br>"); document.write(str.match("World") + "<br>"); document.write(str.match("world!"));

Try it yourself

Replacing Content
The replace() method replaces a specified value with another value in a string.

Example
str="Please visit Microsoft!" var n=str.replace("Microsoft","W3Schools");

Try it yourself

Upper Case and Lower Case


A string is converted to upper/lower case with the methods toUpperCase() / toLowerCase():

Example
var txt="Hello World!"; var txt1=txt.toUpperCase(); var txt2=txt.toLowerCase(); // String // txt1 is txt converted to upper // txt2 is txt converted to lower

Try it yourself

Convert a String to an Array


A string is converted to an array with the built in method string.split():

Example
txt="a,b,c,d,e" txt.split(","); // String // Split on commas

txt.split(" "); txt.split("|");

// Split on spaces // Split on pipe

Try it yourself

Special Characters
The backslash (\) can be used to insert apostrophes, new lines, quotes, and other special characters into a string. Look at the following JavaScript code:

var txt="We are the so-called "Vikings" from the north."; document.write(txt);
In JavaScript, a string is started and stopped with either single or double quotes. This means that the string above will be chopped to: We are the so-called To solve this problem, you must place a backslash (\) before each double quote in "Viking". This turns each double quote into a string literal:

var txt="We are the so-called \"Vikings\" from the north."; document.write(txt);
JavaScript will now output the proper text string: We are the so-called "Vikings" from the north. The table below lists other special characters that can be added to a text string with the backslash sign: Code \' \" \\ Outputs single quote double quote backslash

\n \r \t \b \f

new line carriage return tab backspace form feed

String Properties and Methods


Properties: length prototype constructor

Methods: charAt() charCodeAt() concat() fromCharCode() indexOf() lastIndexOf() match() replace() search() slice() split() substr() substring() toLowerCase() toUpperCase() valueOf()

Complete String Object Reference


For a complete reference of all the properties and methods that can be used with the String object, go to ourComplete String Object Reference. The reference contains both descriptions and examples, for each property and method.

What is XML?
XML XML XML XML XML XML stands for EXtensible Markup Language is a markup language much like HTML was designed to carry data, not to display data tags are not predefined. You must define your own tags is designed to be self-descriptive is a W3C Recommendation

The Difference Between XML and HTML


XML is not a replacement for HTML. XML and HTML were designed with different goals: XML was designed to transport and store data, with focus on what data is HTML was designed to display data, with focus on how data looks

HTML is about displaying information, while XML is about carrying information.

XML Does Not DO Anything


Maybe it is a little hard to understand, but XML does not DO anything. XML was created to structure, store, and transport information. The following example is a note to Tove, from Jani, stored as XML:

<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>

The note above is quite self descriptive. It has sender and receiver information, it also has a heading and a message body. But still, this XML document does not DO anything. It is just information wrapped in tags. Someone must write a piece of software to send, receive or display it.

With XML You Invent Your Own Tags


The tags in the example above (like <to> and <from>) are not defined in any XML standard. These tags are "invented" by the author of the XML document. That is because the XML language has no predefined tags. The tags used in HTML are predefined. HTML documents can only use tags defined in the HTML standard (like <p>, <h1>, etc.). XML allows the author to define his/her own tags and his/her own document structure.

XML is Not a Replacement for HTML


XML is a complement to HTML. It is important to understand that XML is not a replacement for HTML. In most web applications, XML is used to transport data, while HTML is used to format and display the data. My best description of XML is this: XML is a software- and hardware-independent tool for carrying information.

XML is a W3C Recommendation


XML became a W3C Recommendation on February 10, 1998. To read more about the XML activities at W3C, please read our W3C Tutorial.

XML is Everywhere

XML is now as important for the Web as HTML was to the foundation of the Web. XML is the most common tool for data transmissions between all sorts of applications. Example

<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>


AWT vs Swing

When developing a Java program it is important to select the appropriate Java Graphical User Interface (GUI) components. There are two basic sets of components that you will most likely build your Java programs with. These two groups of components are called the Abstract Window Toolkit (AWT) and Swing. Both of these groups of components are part of the Java Foundation Classes (JFC).

An Overview of the AWT


AWT stands for Abstract Window ToolKit. The Abstract Window Toolkit supports GUI Java programming. It is a portable GUI library for stand-alone applications and/or applets. The Abstract Window Toolkit provides the connection between your application and the native GUI. The AWT provides a high level of abstraction for your Java program since it hides you from the underlying details of the GUI your program will be running on. AWT features include:

A rich set of user interface components. A robust event-handling model. Graphics and imaging tools, including shape, color, and font classes. Layout managers, for flexible window layouts that don't depend on a particular window size or screen resolution. Data transfer classes, for cut-and-paste through the native platform clipboard.

The AWT components depend on native code counterparts (called peers) to handle their functionality. Thus, these components are often called "heavyweight" components.

An Overview of Swing
Swing implements a set of GUI components that build on AWT technology and provide a pluggable look and feel. Swing is implemented entirely in the Java programming language, and is based on the JDK 1.1 Lightweight UI Framework. Swing features include:

All the features of AWT. 100% Pure Java certified versions of the existing AWT component set (Button, Scrollbar, Label, etc.).

A rich set of higher-level components (such as tree view, list box, and tabbed panes). Pure Java design, no reliance on peers. Pluggable Look and Feel.

Swing components do not depend on peers to handle their functionality. Thus, these components are often called "lightweight" components.

AWT vs. Swing


There are, of course, both pros and cons to using either set of components from the JFC in your Java applications. Here is a summary:

AWT: Pros


Cons

Speed: use of native peers speeds component performance. Applet Portability: most Web browsers support AWT classes so AWT applets can run without the Java plugin. Look and Feel: AWT components more closely reflect the look and feel of the OS they run on.

Portability: use of native peers creates platform specific limitations. Some components may not function at all on some platforms. Third Party Development: the majority of component makers, including Borland and Sun, base new component development on Swing components. There is a much smaller set of AWT components available, thus placing the burden on the programmer to create his or her own AWT-based components. Features: AWT components do not support features like icons and tool-tips.

Swing: Pros

Portability: Pure Java design provides for fewer platform specific limitations. Behavior: Pure Java design allows for a greater range of behavior for Swing components since they are not limited by the native peers that AWT uses. Features: Swing supports a wider range of features like icons and pop-up tool-tips for components. Vendor Support: Swing development is more active. Sun puts much more energy into making Swing robust. Look and Feel: The pluggable look and feel lets you design a single set of GUI components that can automatically have the look and feel of any OS platform (Microsoft Windows, Solaris, Macintosh, etc.). It also makes it easier to make global changes to your Java programs that provide greater accessibility (like picking a hi-contrast color scheme or changing all the fonts in all dialogs, etc.).

Cons

Applet Portability: Most Web browsers do not include the Swing classes, so the Java plugin must be used. Performance: Swing components are generally slower and buggier than AWT, due to both the fact that they are pure Java and to video issues on various platforms. Since Swing components handle their own painting (rather than using native API's like DirectX on Windows) you may run into graphical glitches. Look and Feel: Even when Swing components are set to use the look and feel of the OS they are run on,

they may not look like their native counterparts.

Java vs JavaScript Java and JavaScript are programming languages. Java is an object oriented programming language whereas JavaScript is more of a scripting language. Both can be used to make web pages more interactive. However, Java is also used to develop server side applications and standalone programming. Java Java is an object oriented programming language. In early 1990s, Sun Microsystems developed the Java language. Initially, it was designed to make small programs for the web browser called applets. But later on, Java was used to create applications based on e-commerce. There are five main features of Java language: Provides more flexibility to develop software applications because of object oriented approach. Easy to use as it combines the best properties of other programming languages. Allows code written in Java to run on different platforms or Java code is independent of platform. The code from the remote source can be executed securely. Built-in support for computer networks. Java also supports automated memory management model that allows developers to get rid of the time consuming method called manual memory management. Programmers can easily do this by implementing automatic garbage collection. But according to some people, Java is slow as well as consumes more memory than other programming languages such as C++. JavaScript JavaScript is also a programming language which is used to make web pages more dynamic as well as interactive. Constant downloads from the server are not required in case of JavaScript as it runs on the users computer. JavaScript is different from the Java programming language. Most modern day web browsers have built-in JavaScript. However, JavaScript based web pages can run only if JavaScript is enabled on the web browser and the browser supports it. JavaScript is enabled in most browsers by default. No special program is required in order to write code in JavaScript as it is an interpreted language. You can use any text editor such as Notepad in order to write JavaScript code. You can also use other text editor that colorizes the different codes making it easier to detect any error. JavaScript is different from HTML because JavaScript is used to create more dynamic web pages while HTML is a markup language that is used to create static content on the web page. You can insert the JavaScript code in a HTML file by using the <script> tag. But if you want to use the script in different pages of the website then you can save the scripts in different files with .js extension. Difference between Java and JavaScript Java is an object oriented programming language whereas JavaScript is more of a scripting language. JavaScript is used to make the web pages more interactive. However, Java can be used not only to make interactive web pages but can also be used to create server side applications and standalone programming. Java uses the concept of classes and objects that makes reuse of the code easier but there is no such thing in JavaScript. Java exhibits the properties like inheritance, data encapsulation and polymorphism whereas JavaScript does not.

write ajavascript program to add two numbers where the numbers are entered by user

<html> <body> <p>Click the button to calculate x.</p> <button onclick="myFunction()">Try it</button> <br/> <br/>Enter first number: <input type="text" id="txt1" name="text1">Enter second number: <input type="text" id="txt2" name="text2"> <p id="demo"></p> <script> function myFunction() { var y = document.getElementById("txt1").value; var z = document.getElementById("txt2").value; var x = y + z; document.getElementById("demo").innerHTML = x; } </script> </body> </html>

You might also like