Computer Science - Java Programmming all that you need to know
8 views 0 purchase
Course
Computer Science
Institution
Fourth Year / 10th Grade
Welcome, Enthusiastic Readers, to a world filled with amazing and useful information!
This document is completely based on the Grade 10 Computer Applications syllabus. It provides an in-depth understanding and comprehensive revision of all concepts in Java Language. This document includes some fre...
Q. What is an Object?
Ans: An Object is an identifiable entity with some characteristics and behavior. E.g. take a class
'Car'. A car class has characteristics like colour, gears, power, length etc. now we create the
object of that class 'Car' namely 'Indica'.
Q. What is OOP? What are the features/concepts in OOP's?
OR
Name any two OOP'S principles.
Ans: The Object Oriented Programming Paradigm is the latest in the software development and
the most adopted one in the programming development. The Paradigm means organising
principle of a program. It is an approach to programming. The concepts of OOP's are: (1) Data
Abstraction (2) Data Encapsulation (3) Modularity (4) Inheritance (5) Polymorphism.
Q. Explain all the Concepts of OOP's?
Ans: Abstraction: It refers to the act of representing essential features without including the
background details or explanation. Encapsulation: It is the way of combining both data and the
function that operates on the data under a single unit. Modularity: It is the property of a system
that has been decomposed into a set of cohesive and loosely couple modules. Inheritance: It is
the capability of one class of thing to inherit properties from another class. Polymorphism: It is
the ability for a message or data to be processed in more than one form.
Q. What are the advantages of OOP's?
Ans: (1) Elimination of redundant coding system and usage of existing classes through
inheritance. (2) Program can be developed by sharing existing modules. (3) Possibilities of
multiple instance of an objects without any interference. (4) Security of data values from other
segment of the program through data hiding.
Q. What is Class? How Object is related to the Class?
Ans: A Class represent a set of Objects that share common characteristics and behavior. Objects
are instance of a class. The Object represents the abstraction representation by the class in the
real sense.
Q. What is the need of a class in Java?
Ans: Classes in Java are needed to represent real-world entities, which have data type properties.
Classes provide convenient methods for packing together a group of logical related data items
and functions that work on them. In java the data items are called fields & the functions are
called methods.
Q. What are Methods? How are these related to an Objects?
Ans: A Method is an operation associated to an Object. The behavior of an Object is represented
through associated function, which are called Methods.
, Q. Point out the differences between Procedural Programming and Object Oriented
Programming.
Ans: Procedural programming aims more at procedures. The emphasis is a doing things rather
then the data being used. In procedural Programming parading data are shared among all the
functions participating thereby risking data safety and security. Object Oriented Programming is
based on principles of data hiding, abstraction, inheritance and polymorphism. It implements
programs using classes and objects, In OOP's data and procedure both given equal importance.
Data and functions are encapsulated to ensure data safety and security.
Q. What is inheritance and how it is useful in Java.
Ans: It is process by which objects of one class acquire the properties of objects of another class.
Inheritance supports the concepts of hierarchical representation. In OOP the concepts of
inheritance provides the idea of reusability.
Q. What role does polymorphism play as java feature?
Ans: It mean the ability to take more than one form. For example, an operation, many types of
data used in the operation.
Q. What is Data hiding?
Ans: Data Hiding means restricting the accessibility of data associated with an object in such a
way that it can be used only through the member methods of the object.
Q. What are nested classes?
Ans: It is possible to define a class within another class, such classes are known as nested
classes. A nested class has access to the members including private members of the class in
which it is nested. However the enclosing class not have access to the members of the nested
class.
Q. Differentiate between base and derived class.
Ans: BASE CLASS - A class from which another class inherits (Also called SUPER
CLASS)DERIVED CLASS - A class inheriting properties from another class. (Also called SUB
CLASS)
Introduction to Java & BlueJ Environment
Q. The two types of Java programs/applications are? [2007]
Ans: The two types of Java Applications are 'Internet Applets' and 'Stand alone application'.
Q. State the distinguishing features of Java and C++?
Ans: (i) Java does not support operator overloading.(ii) Java does not use pointers.(iii) There are
no header files in Java.(iv) Java does not have template classes as in C++.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller asciencestar. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $5.59. You're not tied to anything after your purchase.