CBSE Class 11 Informatics Practices Control Structures

Read and download CBSE Class 11 Informatics Practices Control Structures in NCERT book for Class 11 Informatics Practices. You can download latest NCERT eBooks chapter wise in PDF format free from Studiestoday.com. This Informatics Practices textbook for Class 11 is designed by NCERT and is very useful for students. Please also refer to the NCERT solutions for Class 11 Informatics Practices to understand the answers of the exercise questions given at the end of this chapter

NCERT Book for Class 11 Informatics Practices Control Structures

Class 11 Informatics Practices students should refer to the following NCERT Book Control Structures in Class 11. This NCERT Book for Class 11 Informatics Practices will be very useful for exams and help you to score good marks

Control Structures NCERT Book Class 11

 

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

Informatics Practices NCERT Book Class 11 Control Structures

The above NCERT Books for Class 11 Informatics Practices Control Structures have been published by NCERT for latest academic session. The textbook by NCERT for Control Structures Informatics Practices Class 11 is being used by various schools and almost all education boards in India. Teachers have always recommended students to refer to Control Structures NCERT etextbooks as the exams for Class 11 Informatics Practices are always asked as per the syllabus defined in these ebooks. These Class 11 Control Structures book for Informatics Practices also includes collection of question. We have also provided NCERT solutions for Class 11 Informatics Practices which have been developed by teachers of StudiesToday.com after thorough review of the latest book and based on pattern of questions in upcoming exams for Class 11 students.

NCERT Book Class 11 Informatics Practices Control Structures

The latest NCERT book for Control Structures pdf have been published by NCERT based on the latest research done for each topic which has to be taught to students in all classes. The books for Class 11 Informatics Practices Control Structures are designed to enhance the overall understanding of students. All Class 11 NCERT textbooks have been written in an easy to understand language which will help to enhance the overall level of Class 11 students. 

Control Structures NCERT Book Class 11 Informatics Practices

As the students of Class 11 need the books for their regular studies, we have provided all NCERT book for Control Structures in pdf here for free download. All pdf NCERT books available here for Class 11 will help them to read on their mobile or computers. They can take a print of the Class 11 Informatics Practices NCERT Book Control Structures pdf easily and use them for studies. The NCERT textbooks for Class 11 Informatics Practices have been provided chapter-wise and can be downloaded for free of cost. 

Class 11 Informatics Practices Control Structures NCERT Book

Along with Informatics Practices Class 11 NCERT Book in Pdf for Control Structures we have provided all NCERT Books in English Medium for Class 11 which will be really helpful for students who have opted for english language as a medium. Class 11 students will need their books in English so we have provided them here for all subjects in Class 11.

Class 11 Control Structures NCERT Book Informatics Practices

For Class 11 Control Structures we have provided books for students who have opted for Hindi and Urdu medium too. You can click on the links provided above to download all Hindi medium Class 11 Informatics Practices Control Structures book in easy to read pdf format. These books will help Class 11 Informatics Practices students to understand all topics and also strictly follow latest syllabus for their studies. If you are looking to download the pdf version of Class 11 Informatics Practices Control Structures textbook issued by NCERT then you have come to the correct website

Where can I download latest NCERT Book for Class 11 Informatics Practices Control Structures

You can download the NCERT Book for Class 11 Informatics Practices Control Structures for latest session from StudiesToday.com

Can I download the NCERT Books of Class 11 Informatics Practices Control Structures in Pdf

Yes, you can click on the link above and download chapter wise NCERT Books in PDFs for Class 11 for Informatics Practices Control Structures

Are the Class 11 Informatics Practices Control Structures NCERT Book available for the latest session

Yes, the NCERT Book issued for Class 11 Informatics Practices Control Structures have been made available here for latest academic session

How can I download the Class 11 Informatics Practices Control Structures NCERT Book

You can easily access the link above and download the Class 11 NCERT Books Informatics Practices Control Structures for each chapter

Is there any charge for the NCERT Book for Class 11 Informatics Practices Control Structures

There is no charge for the NCERT Book for Class 11 Informatics Practices Control Structures you can download everything free

How can I improve my scores by reading NCERT Book in Class 11 Informatics Practices Control Structures

Regular revision of NCERT Books given on studiestoday for Class 11 subject Informatics Practices Control Structures can help you to score better marks in exams