Page 6 - CA_Blue( J )_Class10
P. 6

INSIDE THE SERIES




                                                  Learning Resources





                                   Learning Objectives


                                    Class in Java             Object                 Properties of Class and Object

                                Learning Objectives: This section describes the objective of the chapter.





                              Definition                       Some More Programs

                 Exception: A situation in which the execution   Program 1  To input a number and using the function perfect() check whether the number is a perfect
                                                                      number or not. The function returns true if the number is a perfect number else returns false.
                 of a program stops abnormally.                1  import java.util.*;
                                                               2  class perfect_function
                  Definition: This section provides a              Some More Programs: This section contains
               definition to the keywords in the chapter.           additional programs related to the chapter.






                                   Let’s Revisit


                         ®  Initialisation means to assign an initial value to a variable before using the variable in the program.

                         ®  We can take values using parameters passed to methods.
                         ®  The Scanner class is a predefined class in Java.

                        Let's Revisit: This section provides a summary of the chapter for quick recapitulation.





                        GLOSSARY                                               MOST COMMON MISTAKES
                                                 21 st   #Digital Literacy     IN PROGRAMMING
                                                Century
                                                 Skills  #Communication
                       1.  Access Specifier: Access  modifiers are keywords in  object-oriented languages that set the accessibility  of
                      classes, methods, and other members.
                       2.  Array: It is a collection of data items which are all of the same type. Each item's position in an array is uniquely      1.  Repeating Codes: Most of the time young programmers repeat a piece of code because they are comfortable
                                                                             with it and it is easy to use. But, this is a trap and a bad practice.
                      designated by an integer.                              Solution: A programmer should always try to understand a problem and write effective codes for it.
                       3.  Assignment Sign: It is denoted by a ‘=’ sign. It is used to assign a value on the right to the variable on the left.
                       4.  Boolean Literal: It is a special literal or a constant that holds the value as true or false.      2.  Naming a Variable: Variable names are very important.
                                                                             Solution: We must take good care while naming a variable. Make sure that variable names are not ambiguous
                       5.  Byte Code: It is an intermediate binary form of java source code that is obtained after execution of the program.   and can be understood easily. We can not use any keyword as variable name.
                       6.  Break: A statement used to exit a loop or a switch statement.      3.  Complex Coding: While writing a code, one must understand that a code is essentially a solution to a problem.
                       7.  Buffer: It is a reserve space in memory used for temporary storage. It is also called cache memory.   Solution: So, a solution should be simple to understand. The core or a program is to make sure that it is easy
                       8.  Compiler: A software that is used to convert high-level languages to machine language. It converts an entire   to understand and implement. There is no need to use complex concepts and write intricate functions. All you
                      program at once.                                       need to do is write simple but effective programs.

                                                                            4.  Proper planning: While writing a code, one must understand the concept and the problem behind it. Coding
                       9.  Continue: It is a statement used to skip the current iteration in a loop and move on to the next step.  Most Common Mistakes in Programming:
                      10.  Data Abstraction: It is a feature of OOP that refers to the act of presenting the essential features without   without that understanding can be tedious yet unyielding.
                                                                             Solution: So, before you start coding, try to understand the problem thoroughly and then start coding.
                      including the background data.                   This section contains an overview of some of
                      11.  Data Hiding: It refers to the act of limiting the access to data directly outside the class premises, even if the      5.  Not taking a break: Coding is a tedious task. No matter how much you love to code, there is a limit to how
                       Glossary: This section contains
                      data is present in the same program.                   much your brain can handle a certain task.
                                                                             Solution: Hence, always remember to take a short break while coding. Taking short breaks can help you to
                      12.  Debugging: It is an act of removing errors or bugs from a program.   the common mistakes that programmers often
                                                                             understand a program from a different perspective.
                      definition of important IT terms.
                                                                                make while programming.
                      13.  Encapsulation: It refers to the process of wrapping the data and methods together in a single unit.     6.  Syntax errors: These are  the most cause of headaches among programmers. Even the most seasoned
                      14.  Explicit Conversion: It refers to the process of converting on data type to another according to the user’s   programmers can miss a comma or a semi-colon here and there.
                      wishes.                                                Solution: Always keep an eye out while writing your codes and everything will be fine.
                      15.  Expression: It is a combination of two or more that two operands/variable and arithmetic operators that      7.  Logic Errors: These are vital errors that can be very hard to spot. These errors affect the working of a program
                      makes sense.
                                                                             and its outcome.
                      16.  Floating Literal: A real number is considered a floating literal if it includes a decimal point.  Solution: To avoid such errors, always check the working of your program and determine if there is a flaw in
                      17.  Identifier: It is used to identify the key elements of a programs like class name, object name, methods, variable   the idea you had for the program.
                      name, etc.                                             8.  Undeclared variable: While programming we might find ourselves in situations where we might need an extra
                      18.  Implicit Conversion: It refers to the process of converting one data type to another without user interference.  variable.
                      19.  Impure Function: These are functions that may or may not return any value, but they can change the state of   Solution: In such cases, we might start using a variable with declaring or initializing it. So, always be aware of
                      an object.                                             the variables that you are using and the variables that you are going unnoticed.
                      20.  Inheritance: It is a feature of OOP that allows one class to acquire the properties of another class.     9.  Undeclared Methods: Methods make a program versatile, at the same time they give rise to some more
                                                                             problems. For example, people often forget to declare a method.
                      21.  Instance Variable: It is a variable which is defined within a class outside any member function.  Solution: So, always provide a prototype of the method before using it to avoid this issue.
                      22.  Library Class: These are classes present by default in the java library for the ease of the programmer.     10.  Array Bounds:  Arrays begin  indexing  at 0; they end indexing  at length-1.  For example, if  you  have a
                      23.  Loop: It is a code construct used to repeat a set of statements multiple times as per the requirements  ten-element  array, the first element is at position zero and the last element is at position 9.
                      of the program.                                        Solution:  Always make sure the check the size of  the array you  are using  and  take the size according
                                                                             to it.
                    486486  Touchpad Computer Applications-X
                                                                           488488  Touchpad Computer Applications-X
   1   2   3   4   5   6   7   8   9   10   11