Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Computer Science - Java Programmming all that you need to know

Rating
-
Sold
-
Pages
15
Uploaded on
08-03-2024
Written in
2023/2024

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 frequently asked questions in exams with answers. This will definitely help you ace your Computer Science Exam!

Show more Read less
Institution
Course

Content preview

Elementary Concepts of Object & Class


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++.

Written for

Institution
Secondary school
Course
School year
4

Document information

Uploaded on
March 8, 2024
Number of pages
15
Written in
2023/2024
Type
Class notes
Professor(s)
Ms.shalini
Contains
Grade x

Subjects

$6.09
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
asciencestar

Get to know the seller

Seller avatar
asciencestar
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
22
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions