Official NCERT Book for Class 11 Informatics Practices: Control Structures
Explore the complete NCERT textbook for Class 11 Informatics Practices. Tailored for the 2026-27 curriculum, this resource breaks down complex topics to help students prepare effectively for school examinations.
Chapter-wise Study Material: Control Structures
Access the complete PDF for Control Structures below. This focused excerpt allows students to isolate specific topics for thorough review. Cross-reference your textbook exercises with our detailed NCERT Solutions for Class 11 Informatics Practices.
Control Structures
Selection Statements
Observe the form execution given in Figure 6.1 carefully and try to analyze the problem. Figure 6.1 Sample Run of The Vote Eligibility Checker Application Observing the sample run of the above application, it is clear that we have designed an application where we are accepting the age from the user and we want to validate whether the person is eligible to vote or not. We are accepting the age of the user in a text field and testing whether the age entered by the user is greater than 18 or not. If the age is greater than 18 then the message "You are eligible to VOTE" is displayed.
In suchsituations when we have to take action on the basis of outcome of a condition, we need to use a Selection statement. Design the form and set the properties of the components so that the form looks exactly like the one displayed in figure 6.1. Let us now try to write the code for the "Check Eligibility To Vote" button as given in Figure 6.2. The code for the STOP button is the same as learnt in previous chapters.
retrieves the value entered by the user in the text field using getText().This value by default is treated as a string and not as a number so it needs to be converted to an integer type and this is achieved using the parseInt() method. if (Integer.parseInt(jTextField1.getText()) >=18)
check whether the value retrieved from the text field is greater than or equal to 18 or not. The if statement is used to check the condition and if the condition evaluates to true then we specify what action is to be taken if (Integer.parseInt(jTextField1.getText()) >=18)
JOptionPane.showMessageDialog(null, "You are eligible to VOTE")
This if statement is used to check whether the value retrieved from the text field is greater than or equal to 18 or not and if it is then it displays the message "You are eligible to VOTE" using the showMessageDialog() method. Can you guess what will happen if the condition evaluates to false in the above application? Understanding the if statement completely will help us answer this question.
The if statement allows selection (decision making) depending upon the outcome of a condition. If the condition evaluates to true then the statement immediately following if will be executed and otherwise if the condition evaluates to false then the statements following the else clause will be executed. Thus, if statement is a selection construct as the execution of statements is based on a test condition. The selection statements are also called conditional statements or decision control statements.
The syntax of if statement is as shown below:
Syntax:
if (conditional expression)
{
Statement Block;
}
else
{
Statement Block;
}
There are certain points worth remembering about the if statement as outlined below:
The conditional expression is always enclosed in parenthesis. The conditional expression may be a simple expression or a compound expression.
Each statement block may have a single or multiple statements to be executed. In case there is a single statement to be executed then it is not mandatory to enclose it in curly braces ({}) but if there are multiple statements then they must be enclosed in curly braces ({})
The else clause is optional and needs to be included only when some action is to be taken if the test condition evaluates to false.
After familiarizing with the if statement, can you now understand what will happen in the above application if the Age entered by the user is less than 18? Well in that case, the user will not get any message because we have not included the else clause in our code above. So, let us re-write the program to take care of both the cases i.e. Age>= 18 as well as Age <18. The modified code for this application is given in Figure 6.3.
Please refer to the link below - CBSE Class 11 Informatics Practices Control Structures
NCERT Book for Class 11 Informatics Practices Control Structures
Class 11 Informatics Practices Control Structures Official E-Book
Access the official NCERT Textbook for Class 11 Informatics Practices Control Structures, updated for the current academic session. Recognized as the core reading material across schools nationwide, board evaluations rely entirely on this syllabus.
English Medium NCERT Textbooks for Class 11
Access a full archive of NCERT books in English Medium tailored for Class 11 courses. Units like Control Structures deliver in-depth concepts and thorough review questions at the section close.
Additional Study Resources for Class 11 Informatics Practices
Elevate your study routine by reviewing our comprehensive NCERT Solutions and revision notes available on our platform free of charge.
FAQs
You can download the latest, teacher-verified PDF for CBSE Book Class 11 Informatics Practices Control Structures for free on StudiesToday.com. These digital editions are updated as per 2026-27 session and are optimized for mobile reading.
Yes, our collection of Class 11 Informatics Practices NCERT books follow the 2026 rationalization guidelines. All deleted chapters have been removed and has latest content for you to study.
Downloading chapter-wise PDFs for Class 11 Informatics Practices allows for faster access, saves storage space, and makes it easier to focus in 2026 on specific topics during revision.
NCERT books are the main source for NCERT exams. By reading CBSE Book Class 11 Informatics Practices Control Structures line-by-line and practicing its questions, students build strong understanding to get full marks in Informatics Practices.