Thursday, September 28, 2017
Thursday, September 21, 2017
Monday, September 18, 2017
Sunday, September 17, 2017
Question & Answer (JAVA) Class 12
Can we explicitly inherit from the Object class?
Whenever we declare a new class without an explicit
"extends" keyword, the class implicitly extends the fundamental
Object class.
When
you explicitly extend a different class that will be descended from the Object
class at some point in its hierarchy. It may help to understand the inheritance
structure more clearly if you explicitly extend the Object class.
What are the two parts of an object?
Answer:
An object is
associated with data and functions.
Object = Data + Methods
Object = Data + Methods
Name the
different types of class members available in a Java program.
Answer:
There are two types of class members
available in a Java program-
• Instance members
• Static members
• Instance members
• Static members
How do we create
an object?
Answer:
Objects
are created through new operator.
For example,
For example,
XYZ
obj = new XYZ ();
The above statement will create an object named “obj”.
The above statement will create an object named “obj”.
Why do we use
methods?
Answer:
We use methods:
>To cope up with
complex problems
>To hide low-level details that can confuse us
> To reuse portions of code
>To hide low-level details that can confuse us
> To reuse portions of code
What is the
difference between user-defined data type and an application?
Answer: The difference is that there
is the main function in an application whereas a user defined data type does
not implement main() method.
What does it mean
that a method or field is “static”?
Answer:
The method with “static” keyword is a method that belongs to a class as a whole and not to a particular
instance or object. The static methods are also known as class methods.
To call a static method, we need to use it with the
classname as follows:
classname.methodname();
What is the
difference between the instance variables and class variables? Can you specify
the instance variable and the class variable in the example given below?
Answer:
When a number of objects are created from
the same class, each of them have their own distinct copies of instance variables. Every instance of the class
shares a class variable, which is in one
fixed location in memory.
Any object can change the value of a class variable. Here, x is a class variable and the variable y is an instance variable
Any object can change the value of a class variable. Here, x is a class variable and the variable y is an instance variable
A class
"abc" inherits from a class "xyz". Write the syntax to
define the class "abc".
Answer:
class abc extends xyz
{
// definition of data members
// definition of member functions
}
How do you
prevent a subclass from having access to a member of a superclass?
Answer: To prevent a subclass from having access to a superclass member,
declare the member as private.
Explain the
relation between base class and derived class.
Answer: A
derived class is formed from the base class. It can use its methods and
variables (depend on specifier) and allow reusability. In a subclass, you can
add new methods and new fields.
More Q&A
How can a class be used as a user-defined data type?
Answer:
A
class is defined as user-defined data type in java because it is created by a
user. A class is based on fundamental data types.
For example, we have defined a class Demo having methods getdata() and display(). Also, we have created an object ob1 of Demo class.
For example, we have defined a class Demo having methods getdata() and display(). Also, we have created an object ob1 of Demo class.
class Demo {
int
a;
float
b;
char
c;
void
getdata() {
: :
}
void
display() {
: :
}}
Demo
obj1= new Demo();
Demo is the class with some fields and functions. These attributes
and functions of class are defined by the user.
Define base
class.
Answer: It
is the existing class from which a new class can be derived. It remains the
same. A base class is also known as super class/parent class.
Define the use of
implement keyword.
Answer: A
class can implement an interface using the keyword implements.
Define the
signature of a method.
Answer:
The signature of a Java method is the combination of method name along with
number and type of the parameters.
How does
constructor and destructor work in inheritance?
Answer:
When the object of derived class is created as constructor of base class, it
invokes the constructor of base class first and then the constructor of derived
class. When the object of derived class is destroyed, destructor of derived
class is invoked first, then the destructor of the base class.
How is an
interface different from a class?
Answer:
• You cannot instantiate an interface.
• An interface doesn't contain any constructors.
• All of the methods in an interface are abstract.
• An interface cannot contain instance fields. The only fields that can appear in an interface must declare both static and final.
• It cannot be extended by a class but it can be implemented by a class.
• An interface can extend multiple interfaces.
• You cannot instantiate an interface.
• An interface doesn't contain any constructors.
• All of the methods in an interface are abstract.
• An interface cannot contain instance fields. The only fields that can appear in an interface must declare both static and final.
• It cannot be extended by a class but it can be implemented by a class.
• An interface can extend multiple interfaces.
What’s wrong with
the following constructor definition for the class student?
public void
student(int n)
{
{
rollno = n;
}
}
Answer:
Here, student is a constructor and a constructor does not have a return type.
It cannot be even declared as void.
YEARLY Solution IP Class 12
SOLVED
2017 Solution Paper IP CLASS 12
SOLUTION(DELHI)
SOLUTION(OUTSIDE DELHI)
2016 SOLUTION PAPER IP CLASS 12
Solution Paper(Delhi)
Solution Paper(Outside Delhi)
2017 Solution Paper IP CLASS 12
SOLUTION(DELHI)
SOLUTION(OUTSIDE DELHI)
2016 SOLUTION PAPER IP CLASS 12
Solution Paper(Delhi)
Solution Paper(Outside Delhi)
STUDY MATERIALS IP CLASS XII
STUDY MATERIALS from different region for Informatics Practices CLASS 12
Tuesday, September 12, 2017
CLASS X FORMATIVE ASSESSMENT MATERIAL FOR MATHEMATICS
CLASS X FORMATIVE ASSESSMENT MATERIAL FOR MATHEMATICS
OBJECTIVE TYPE MUST DO TO SCORE BETTER
CLICK TO DOWNLOAD
OBJECTIVE TYPE MUST DO TO SCORE BETTER
CLICK TO DOWNLOAD
Monday, September 11, 2017
CBSE AISSCE 2016 Marking Scheme for Informatics Practices
CBSE AISSCE 2016 Marking Scheme for Informatics Practices
( Sub Code: 065 Paper Code 90 Outside Delhi )
Download Paper
( Sub Code: 065 Paper Code 90 Outside Delhi )
Download Paper
STUDY MATERIAL (IP-XII)
STUDY MATERIAL (Informatics Practices) Class – XII
Click Here for Download
INDEX
1. Syllabus
2. Unit-1: NETWORKING AND OPEN STANDARDS
3. Unit-2: PROGRAMMING
4. Unit-3: RELATIONAL DATABASE MANAGEMENT SYSTEM
5. Unit-4: IT APPLICATIONS
6. Sample Question Paper
7. Marking Scheme of Sample Question Paper
Source: KENDRIYA VIDYALAYA SANGATHAN, GUWAHATI REGION
Click Here for Download
INDEX
1. Syllabus
2. Unit-1: NETWORKING AND OPEN STANDARDS
3. Unit-2: PROGRAMMING
4. Unit-3: RELATIONAL DATABASE MANAGEMENT SYSTEM
5. Unit-4: IT APPLICATIONS
6. Sample Question Paper
7. Marking Scheme of Sample Question Paper
Source: KENDRIYA VIDYALAYA SANGATHAN, GUWAHATI REGION
Saturday, September 9, 2017
Physics Material for class XII
KRISHNA DHAN SHARMA ,PGT (PHYSICS),K.V. BAGAFA
I BELIEVE THAT ,THIS MATERIALS WILL HELP YOU TO GIVE BASIC IDEA ABOUT THE UNITS.
1.important derivation for optics
2.HOTS OPTICS
3.electrostatics
4.current electricity
5.magnetic effects of current
6.EM WAVES
7.EMI
8.OPTICS
9.DUAL NATURE OF MATTER
10.ELECTRONIC DEVICE
11.ATOMS AND NUCLEI
12.COMMUNICATION
I BELIEVE THAT ,THIS MATERIALS WILL HELP YOU TO GIVE BASIC IDEA ABOUT THE UNITS.
1.important derivation for optics
2.HOTS OPTICS
3.electrostatics
4.current electricity
5.magnetic effects of current
6.EM WAVES
7.EMI
8.OPTICS
9.DUAL NATURE OF MATTER
10.ELECTRONIC DEVICE
11.ATOMS AND NUCLEI
12.COMMUNICATION
Subscribe to:
Posts (Atom)