Page 564 - ComputerScience_Class_11
P. 564

INTERNAL ASSESSMENT





              Marks: 30


                                                              BLUEJ
              Teachers should  maintain  a record of all  the assignments done  by the students as part  of the practical  work
              throughout the year and give it due credit at the time of cumulative evaluation at the end of the year. Students are
              expected to do a minimum of twenty assignments for the year and ONE project based on the syllabus.
              Candidates will be required to submit a work file containing the practical work related to programming assignments
              done during the year and ONE project.

              1.  Programming assignments done throughout the year:  10 marks
              2.  Project Work (based on any topic from the syllabus):  5 marks


                Program 1      Write a program to generate the series of squares of the first N numbers.

                 1       import java.util.Scanner;

                 2       public class SquareSeries
                 3       {

                 4           public static void main(String args[])
                 5           {

                 6               Scanner sc = new Scanner(System.in);
                 7               System.out.print("Enter the value of N: ");

                 8               int N = sc.nextInt();
                 9               int square;
                10               for (int i = 1; i <= N; i++)

                11               {
                12                   square = i * i;

                13                   System.out.print(square + " ");
                14               }

                15           }
                16       }

              The output of the preceding program is as follows:

                     BlueJ: Terminal Window - Java

                 Options
                Enter the value of N: 5
                1 4 9 16 25




                  562  Touchpad Computer Science (Ver. 3.0)-XI
   559   560   561   562   563   564   565   566   567   568   569