CBSE Class 12 Informatics Practices More About Classes And Libraries Assignment

Read and download free pdf of CBSE Class 12 Informatics Practices More About Classes And Libraries Assignment. Get printable school Assignments for Class 12 Informatics Practices. Class 12 students should practise questions and answers given here for More About Classes And Libraries Informatics Practices in Class 12 which will help them to strengthen their understanding of all important topics. Students should also download free pdf of Printable Worksheets for Class 12 Informatics Practices prepared as per the latest books and syllabus issued by NCERT, CBSE, KVS and do problems daily to score better marks in tests and examinations

Assignment for Class 12 Informatics Practices More About Classes And Libraries

Class 12 Informatics Practices students should refer to the following printable assignment in Pdf for More About Classes And Libraries in Class 12. This test paper with questions and answers for Class 12 Informatics Practices will be very useful for exams and help you to score good marks

More About Classes And Libraries Class 12 Informatics Practices Assignment

Brief Summary of the Chapter:
In this chapter the way access of members of a class i.e. about access specifier will be discuss. Java include predefined classes in the form of packages which are also called Java class Library. Some of the used packages are: java.lang. java.util, java.io, java.swing. java.awt, java.applet etc.
Key points:
• The public member of object are accessed through .(dot) operator.
• The private members are accessible only inside their own class.
• The protected members are accessible inside their own class, sub class and packages.
• The default members are accessible inside their own class as well to classes in the same package.
• Related classes and interfaces are grouped together in the form of package.
• Packages and class are imported through import command.

SOLVED QUESTIONS

1. Which keyword can protect a class in a package from accessibility by the classes outside the package?
(a) private
(b) protected
(c) final
(d) None of these
Ans: (d) None of these.

2. We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?
(a) private
(b) protected
(c) final
(d) public
(e) None of these
Ans: (b) protected.

3. Which of the following keywords are used to control access to a class member?
(a) default
(b) abstract
(c) protected
(d) interface
(e) public.
Ans: (c) and (e) public

4. The public members of objects are accessed through which operator.
(a) arrow
(b) dot
(c) this
(d) none of these
Ans: (b) dot

5. The private members are accessible only inside their _______class.
(a) own
(b) sub
(c) super
(d) none of these
Ans: (a) own

6. Which command is used to import packages and their classes?
(a) include
(b) import
(c) public
(d) inline
Ans: (b) import

7.Which statement is used to create a package in Java?
(a) Class
(b) super
(c) this
(d) package
Ans:(d) package

8. In Java, all strings are objects?
(a) True
(b) False
(c) don’t say
Ans: (a) True

9. What do you understand by Package in Java?
Ans: A group of classes is called package

10.Given a package named EDU. Student, how would you import a class named Test contained in this package? Write one line statement.
Ans: import EDU.Student.Test;

11. What will be the output of the following code
StringBuffer city = new StringBuffer(“Madras”) ;
StringBuffer string = new StringBuffer() ;
string.append(new String(city) ) ;
string.insert(0,”Central”) ;
string.out.println(string) ;
Ans: CentralMadras.

12. Give the output of the following program:
class MainString
{ public static void main( String agrs[])
{ StringBuffer s = new StringBuffer(“String”) ;
if(s.length() > 5) && (s.append(“Buffer”) .equals(“x”) ;
System.out.println(s) ;
}
}
Ans: StringBuffer.

13. What is the output of the following code fragment if “abc” is passed as argument to the func() ?
Public static void func(string s1)
{
String s = s1 + “xyz”;
System.out.println(“s1=” + s1) ;
System.out.println(“s = “ +s) ;
}
Ans: s1= abc
s =abcxyz

14.What are the access specifiers in Java? Expalin.
Ans: The Access Specifiers control access to members of class from / within Java Program. Java supports various Access Specifiers to control the accessibility of class members.
• Private : A variable or method declared as private, may not be accessed outside of the class. Only class member can access them, since they are private to others.
• Protected: Protected members can be accessed by the class members and subclasses (derived classes) and current package, but they are not accessible from beyond package or outside.
• Public: Class members declared as public, are accessible to any other class i.e. everywhere , since they are public.
• Package (default) : If no any specifier is mentioned, default or friendly access is assumed. Class member may be accessed by any other Class members available in the same package, but not accessible by the other classes outside the package, even subclasses.

15. What do you meant by private, public, protected, package(friendly) access specifiers?
Ans: Private Access Specifier
Members declared as private are accessible by the members of the same class, since they are private.
A private key word is used to specify.
//e.g to demonstrate private specifier.//
class abc
{ private int p;
private void method1()
{ p=10;
system.out.print(“I am Private method”) ;
}
}
class xyz
{……….
void method2()
{ abc x = new abc() ;
x.p =10;
x.method1() ;
}
}
Protected Access Specifier
Protected members are accessible by all the classes in the same package and sub-classes (same of different packages) . A protected key word is used to specify.
Package mypackage;
class abc
{ protected int p;
protected void method1()
{ p=10;
system.out.print(“Protected
method”) ;
}
}
class xyz
{……….
void method2()
{ abc x = new abc() ;
x.p =10;
x.method1() ;
}
}
Lets another Package…
package yourpackage;
import mypackage.*;
class pqr extends abc
{ void method3()
{ abc x=new abc() ;
pqr y=new pqr() ;
x.p=10;
x.method1() ;
y.p=10;
y.method1() ;
}
}
Public Access Specifier
Public Members can be access at anywhere i.e. same or different package. A public key word is used to specify.
packagemypackage;
class abc
{ public int p;
public void method1()
{ p=10;
system.out.print(“Public method”) ;
}
}
package yourpackage;
import mypackage.* ;
class xyz
{……….
void method2()
{ abc x = new abc() ;
x.p =10;
x.method1() ;
}
}
Package (friendly) Access Specifier
If no specifier is explicitly specified, Java assumes default (friendly) access i.e. all the members are accessible in all other classes of the same package only, since they are trusted or friends. This is called Package level access. No any key word is used to specify default access.
package mypackage;
class abc
{ int p;
void method1()
{ p=10;
system.out.print(“Package method”) ;
}
}
class xyz
{……….
void method2()
{ abc x = new abc() ;
x.p =10;
x.method1() ;
}
}

16. What do you understand by Library in Java?
Ans: A library is readymade and reusable component/codes that can be used in a program to perform predefined task.
• Some commonly used Java libraries are Math Library, String Library, Utility Library and IO Library etc.
• You can use import statement at the top of the program to include the Java libraries.
import java.io.*;
• The java.lang is the default imported library in your program without writing import statement.
String Library & its commonly used methods
1 .boolen equals(str) - Compare this (current) string to given string and returns true if both are true otherwise false. e.g. boolean test=str1.equals(str2) ;
2. int compareTo(str1,str2) - Compare two strings in alphabetical order. boolean equalsIgnoreCase(str) - Compare this string to given string but ignores case difference.
3. int length() -Returns the length of this string.
e.g. int x=str1.length() ;
Math Library & its commonly used methods
• Java provides math library, which available under java.lang package.
• In order to use functions/methods of math library, you need to invoke function using math keywords before the function.
e.g. x=math.abs(-7.5) ;
1. pow(num1,num2) - It computes num1 num2 , where num1 and num2 are numbers.
e.g. syste.out.print(“”+math.pow(2,3) ;
2. round(num1) - It rounds off a given number to its nearest integer. It can take float/double as argument. e.g.
system.out.print(“”+math.round(1.5) ) ; 2
system.out.print(“”+math.round(-1.5) ) ; -1
Using Dates & Times in JAVA
• Java offers two classes in java.util package to manipulate date and time.
1. java.util.Date 2. java.util.Calendar
• In order to use Date & calendar, you need to import java.util package. E.g. import java.util.*;
Date d=new Date() ; -It returns system date in the given format.
Tue Jul 20 17:30:22 GMT+05:30 2010

UNSOLVED QUESTIONS

1. What are the different types of access specifier supported by java?

2. Which is the default package of java?

3. What is friendly access of class member?

4. How does a class enforce information hiding?

5. Define an abstract class and abstract methods.

6. What is an interface? What is the use of Interface.

Class 12 Informatics Practices Assignments
CBSE Class 12 Informatics Practices Concept Of Inheritance In Java
CBSE Class 12 Informatics Practices Database Concepts Assignment
CBSE Class 12 Informatics Practices Database Transactions Assignment
CBSE Class 12 Informatics Practices Extensible Markup Language Assignment
CBSE Class 12 Informatics Practices Free And Open Source Software Assignment
CBSE Class 12 Informatics Practices GUI Dialogs And Tables Assignment
CBSE Class 12 Informatics Practices HTML I Basic HTML Elements Assignment
CBSE Class 12 Informatics Practices HTML II Lists Tables and Forms Assignment
CBSE Class 12 Informatics Practices IT Applications Assignment
CBSE Class 12 Informatics Practices Java Database Connectivity To MySQL Assignment
CBSE Class 12 Informatics Practices Java GUI Programming Revision Tour Assignment
CBSE Class 12 Informatics Practices More About Classes And Libraries Assignment
CBSE Class 12 Informatics Practices More on SQL Grouping Records and Table Joins Assignment
CBSE Class 12 Informatics Practices More RDBMS Assignment
CBSE Class 12 Informatics Practices MYSQL Revision Tour Assignment
CBSE Class 12 Informatics Practices Networking and open standards Assignment
CBSE Class 12 Informatics Practices Programming Fundamentals Assignment
CBSE Class 12 Informatics Practices Revision Assignment Set A
CBSE Class 12 Informatics Practices Revision Assignment Set C
CBSE Class 12 Informatics Practices Revision Assignment Set D
CBSE Class 12 Informatics Practices Web Application Development Assignment
CBSE Class 12 Informatics Practices Worksheet All Chapters

More Study Material

CBSE Class 12 Informatics Practices More About Classes And Libraries Assignment

We hope you liked the above assignment for More About Classes And Libraries which has been designed as per the latest syllabus for Class 12 Informatics Practices released by CBSE. Students of Class 12 should download and practice the above Assignments for Class 12 Informatics Practices regularly. We have provided all types of questions like MCQs, short answer questions, objective questions and long answer questions in the Class 12 Informatics Practices practice sheet in Pdf. All questions have been designed for Informatics Practices by looking into the pattern of problems asked in previous year examinations. 

Assignment for Informatics Practices CBSE Class 12 More About Classes And Libraries

Our team of expert teachers have referred to NCERT book for Class 12 Informatics Practices to design the Informatics Practices Class 12 Assignments. If you practice at least one test paper daily, you will get higher marks in Class 12 exams this year. Daily practice of Informatics Practices course notes and related study material will help you to clear all your doubts and have stronger understanding of all concepts. You can download all Revision notes for Class 12 Informatics Practices also from www.studiestoday.com absolutely free of cost.

More About Classes And Libraries Assignment Informatics Practices CBSE Class 12

All questions and their answers for the assignment given above for Class 12 Informatics Practices have been developed as per the latest curriculum and books issued for the current academic year. The students of Class 12 can rest assured that the best teachers have designed the questions of Informatics Practices so that you are able to revise the entire syllabus if you do the assignments. Lot of MCQ questions for Class 12 Informatics Practices have also been given in the worksheets and assignments for regular use. All study material for Class 12 Informatics Practices students have been given on studiestoday.

More About Classes And Libraries Assignment CBSE Class 12 Informatics Practices

Regular assignment practice helps to get a more comprehensive understanding of More About Classes And Libraries concepts. Assignments play a crucial role in understanding More About Classes And Libraries in CBSE Class 12. Students can download all the assignments of the same chapter in Class 12 Informatics Practices in Pdf format. You can print them or read them online on your computer or mobile.

CBSE Informatics Practices Class 12 More About Classes And Libraries Assignment

CBSE Class 12 Informatics Practices latest books have been used for coming up with the latest questions and solutions for the above assignment. If you have revised all concepts relating to More About Classes And Libraries then you should attempt all questions given in the test sheets above. We have also provided lot of Worksheets for Class 12 Informatics Practices which you can use to further make your self stronger in Informatics Practices

Where can I download in PDF assignments for CBSE Class 12 Informatics Practices More About Classes And Libraries

You can download free Pdf assignments for CBSE Class 12 Informatics Practices More About Classes And Libraries from StudiesToday.com

The assignments for More About Classes And Libraries Class 12 Informatics Practices for have been made based on which syllabus

The More About Classes And Libraries Class 12 Informatics Practices Assignments have been designed based on latest CBSE syllabus for Class 12 Informatics Practices issued for the current academic year

Can I download and print these printable assignments for Informatics Practices More About Classes And Libraries Class 12

Yes, These printable assignments for More About Classes And Libraries Class 12 Informatics Practices are free to download and print

How many topics are covered in More About Classes And Libraries Informatics Practices assignments for Class 12

All topics given in More About Classes And Libraries Informatics Practices Class 12 Book for the current academic year have been covered in the given assignment

Is there any charge for this assignment for More About Classes And Libraries Informatics Practices Class 12

No, all Printable Assignments for More About Classes And Libraries Class 12 Informatics Practices have been given for free and can be downloaded in Pdf format

How can I download the printable test assignments for More About Classes And Libraries Informatics Practices Class 12

Just click on the View or Download button below, then another window with the Pdf will be visible, just click on the Pdf icon to download the free assignments for More About Classes And Libraries Class 12 Informatics Practices

Are these assignments available for all chapters in Class 12 Informatics Practices

Yes, apart from Informatics Practices you can download free assignments for all subjects in Class 12

Can I download solved assignments for More About Classes And Libraries CBSE Class 12 Informatics Practices

Our team of expert teachers at studiestoday.com have provided all answers for the practice questions which have been given in Class 12 Informatics Practices More About Classes And Libraries assignments

For which subject have you provided the assignments on this website?

Solved assignments have been provided on StudiesToday for all chapters in Class 12 Informatics Practices assignments

Are these assignments for Class 12 Informatics Practices designed as per CBSE curriculum?

Latest syllabus issued for current academic year by CBSE has been used to design assignments for Class 12

Are there solutions or answer keys for the Class 12 Informatics Practices assignments

Yes, we have provided detailed answers for all questions given in assignments for Class 12 Informatics Practices

How can these assignments help Class 12 students prepare for exams?

Download free solved assignments for Class 12 Informatics Practices and practice them daily to get better marks in examinations

Can students get better understanding of Informatics Practices concepts taught in Class 12?

Yes, students in Class 12 will be able to understand the concepts by solving Informatics Practices for More About Classes And Libraries

Do the assignments cover important topics in Class 12 Informatics Practices?

Yes, we have given practice assignments for all important topics given in More About Classes And Libraries