RCB Grade 11 Syllabus Content
By Dr. Swati Goel
(Java programming -Technical skill)
(RCA)
Programming concepts –Students should be able to:
• declare and use variables and constants
• understand and use basic data types: Integer, Real, Char, String and Boolean •
understand and use the concepts of sequence, selection, IF conditions, Multiple
IF condition. Switch CASE statement .
(RCB)
• Do While loop,
• Nested For Loop,
• Arrays,
• Arrays of string,
• Multi dimension array,
• Classes and object
Criteria D – Evaluating
• Students will learn relevant Testing methods.
Patter Program
Java-Do While Loop
23 rd Sep 2022 Live demo Practice
Execution of do while loop in the Java Calculator program –SDL Task
• [Link]
32/execution-of-do-while-loop-in-the-java-cal
culator-program
Control Structures in Java
Conditional statements – 10 min Self study time
Click here : [Link]
JAVA EXERCISE: WHILE LOOP
• Exercise 1: Write Java program to prompt the user to choose
the correct answer from a list of answer choices of a question.
The user can choose to continue answering the question or stop
answering it. See the example below:What is the command
keyword to exit a loop in Java?
a. int
b. continue
c. break
d. exit
Enter your choice: b
Incorrect!
Again? press y to continue:
Click this link for more java program practice:
[Link]
Solution
• import [Link].*;
public class JavaExercises
{
public static void main(String[] args)
{
selectChoice();
}
static void selectChoice(){
String choice;
String con="y";
try{
BufferedReader br=new BufferedReader(new InputStreamReader([Link]));
[Link]("What is the command keyword to exit a loop in Java?");
[Link]("[Link]");
[Link]("[Link]");
[Link]("[Link]");
[Link]("[Link]");
while ([Link]("y")==0)
{
[Link]("Enter your choice:");
choice =[Link]();
if ([Link]("c")==0)
{
[Link]("Congratulation!");
}
else if ([Link]("q")==0 || [Link]("e")==0) { [Link]("Exiting...!"); break; }
else [Link]("Incorrect!");
[Link]("Again? press y to continue:");
con =[Link]();
}
}catch(IOException e){}