Class X-(NOTES) Computer Applications Chapter 1 & 2 Chapter Name (Concept of Objects and Introducing classes)  Concept of Object – Oriented Programming System(OOPS) Definition of OOPS OOP is an approach to standardize the programs by creating partitioned memory area for both data and functions. OR The programming concept which is implemented using an object is known as Object oriented programming. Note- OOP treats data as a critical element in the program development and does not allow data to flow freely from function to function.

 Principles of OOPS 1. Class and objects 2. Encapsulation 3. Data Abstraction 4. Inheritance 5. Polymorphism

 Class -- A class defines the structure and behaviour of an object. OR A class is a set of Objects. OR A class can be defined as combination of data & methods.  Object—object are the basic runtime entities which contains characteristic (variables) and behaviour(methods) of particular class.  Encapsulation—wrapping up of data and functions into a single unit(class) is called Encapsulation.  Data Abstraction—The act of representing essential features without including the background details or explanations.  Inheritance—A process according to which some properties of a class are shared by another class is known as Inheritance. In oop the concept of inheritance implement the idea of Reusability.  Polymorphism—It is the ability of representing a thing in more than one form is called polymorphism. It is also known as Overloading.

Difference between class and object

Class object It is a representation of an abstraction only It is real and unique entity having some characteristics and behaviours. It is known as ‘Object Factory’ It is known as an ‘Instance of a class’

 Class as an Object Factory Once a class has been defined , we can create any number of objects. Each objects belonging to a specific class possesses the data and functions defined within the class. Hence class is also termed as Object factory. Thus class is the prototype of an object.

 Objects as Instances of a class Having a class defined ,you can create as many onjects as needed. All these objects materialize the abstraction represented by theclass. These onjects are called instances of this class. All the instance created with a given class will have the same structure and behaviour . a real world example of an object would be “Doberman”,which is an instance of a class called “Dog”.

Note-This very aspect i.e. objects as instances of a class, will be covered in details in chapter 5 where you will learn classes in software terms.

Class X-(NOTES) Computer Applications Chapter 3 Chapter Name (Introducing on Bluej Environment)

 History of java James A. Gosling born on may 19, 1955, near Calgary, Alberta, Canada is famous software developer. He developed many compilers and mail systems. Since 1984 he has been associated with Sun Micro Systems and developed java programming language in 1991. He named the language ‘Oak’ . since this named was already copyright and used for another programming language. So another name had to be chosen. The name ‘JAVA’ came into existence from several individuals involved in making this language: , Arthur Van Hoff and Andy Bechtolsheim.(JAVA)

 Different types of java programming: There are two types of java program:- i) Stand Alone Application-A program that can run independently with out requiring external support. ii) Internet Applets (java Applets)- small complied program embedded in a web page which runs on the viewer’s machine in a secured manner.

 Basic features of java  Java is an object oriented programming language.  Java is a platform independent language.  Java programs are both compiled and interpreted.  Java is a case sensitive language. It distinguishes the upper case and lower case letters.

 Java compilation process Java is a high level language. The programs written in java are compiled get converted into an intermediate code is called Byte Code. This code is independent of the machine on which the program is to run. This makes a java program highly portable as its byte code can easily be transferred from one system to another. When this Byte code is to be run on any system, an interpreter, known as (JVM) is needed which translates the byte code to machine code.

Source code

Java compiler

Byte code

JVM JVM JVM

Windows Unix OS Macintosh OS OS

Java compilation process