[go: up one dir, main page]

0% found this document useful (0 votes)
6 views5 pages

X Quick Revision

The document outlines key programming concepts, focusing on programming paradigms, modular programming, and object-oriented programming (OOP) principles such as data abstraction, encapsulation, inheritance, and polymorphism. It also defines important terms like classes, objects, and modules, and discusses advantages of OOP including code reusability and ease of maintenance. Additionally, it provides a review of Java programming elements, including data types, function prototypes, and control statements.

Uploaded by

atharvagrawal520
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views5 pages

X Quick Revision

The document outlines key programming concepts, focusing on programming paradigms, modular programming, and object-oriented programming (OOP) principles such as data abstraction, encapsulation, inheritance, and polymorphism. It also defines important terms like classes, objects, and modules, and discusses advantages of OOP including code reusability and ease of maintenance. Additionally, it provides a review of Java programming elements, including data types, function prototypes, and control statements.

Uploaded by

atharvagrawal520
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Definitions and Main Points

Programming Paradigms :Paradigm means organizing principle of a program. It is an


approach to programming. It is of two types:
● Procedural : Emphasis is on doing things and not on data. The alogorithm is
main here.
● Non-Procedural:Emphasis is on data and not on procedure. Data and its
safety is important here.
Modular Programming :
It is an extension of procedural progamming where a big program is divided into smaller
parts known as Modules.
Module :
A module is an indentifiable piece of code within a program with a set of inputs and
outputs.
Object :
Object is an identifiable entity with some characteristics and behaviour.
For example : “Orange”is an object. Its characteristic is its shape and color, and its
behaviour is that its is juicy and taste sweet-sour.
In OOP programming, object represents an entity that can store data and has its interface
through functions.
Objects are the actual entities that exist in memory.
Class :
A class is a template/ blueprint representing a group of objects that share common
properties and relationships.
While class is a conceptual blueprint, an object is an actual entity which is an instance of a
class.
Class is user defined data type.
Class is composite data type or reference data type.
For Example: “Fruit” is a class and orange, papaya, banana are the objects of this
class, because they share some common properties of fruit.
Another example : “Automobiles” is a class and we can say that car, bus, van etc. are the
objects of this class.
Basic Concepts of OOP:
1. Data Abstraction : Abstraction or Data Abstraction is an act of representing
essential features without including the background details or explanations.
For example : Driving a car, where we just know the essential features like gear and
steeringl handling, but the inside mechanical details are not known or required.
2. Encapsulation: The wrapping up of data and operations/functions (that
operate on the data) into a single unit (called class) is known as Encapsulation.
3. Inheritance : Inheritance is the capability of one class of things to inherit
capabilities or properties from another class.
● Base class : A base class is a super class from which another class inherits
properties.
● Sub-class (derived class):The class that is derived and inherits the
properties of base class is known as sub-class or derived class.
4. Polymorphism : Polymorphism is the ability for a message or data to be
processed in more than one form.
Polymorphism is a property by which the same message can be sent to objects of several
different classes, and each object cabn respond in a different way depending on its class.
5. Modularity : Modularity is a property by which a big or lengthy program is
divided into smaller parts called as modules. It reduces the complexity of program.
Advantages of OOP :
1. Re-use of code
2. Ease of comprehension
3. Ease of fabrication and maintenance
4. Easy design and extension

Dear Students , Please revise the definitions these topic from class notes /
book :

● Tokens as smallest individual unit of java program


● Unicode as 2 byte code for characters - java character set
● Literals fixed value that do not change during execution of program
● Unary, Binary and Ternary operators

● Short hand operators:


+= , -= , *= , /= , %=
● Increment and decrement operators
● Conditional operator ?: as ternary operator
● Type conversion = 1. Implicit or Type promotion
2. Explicit or Type casting
● Initial class
● Data types 1. Primitive datatypes : in built data types. Total 8
in number: byte, short, int, long, float, double, char, boolean

2. Reference Data types: Made up of primitive data types. Also called as


composite data types or user degined data types . Example: class, Array, String,
interface
● Size in bytes for 8 Primitive data types :
byte : 1 byte
short : 2 bytes
int : 4 bytes
long : 8 bytes
float : 4 bytes
double : 8 bytes
char : 2 bytes
boolean: 1 byte but only 1 bit is used.
● Function Prototype: First line of function definition that specify function name, its
return type and list of parameters.
● Function signature: Number and data type of parameters . It is a part
● Actual parameter
● Formal parameter
● Call by value: In this method of call, the actual parameters gets copied into formal
parameters so if formal parameters are modified, the actual parameters remains
unchanged.
Primitive data types are passed by using call by value method.
● Call by reference: In this method of call , a reference of actual Parameters is passed
to formal parameters thus both share the same memory location. Thus if formal
parameters are modified, the actual parameters also are modified.
Objects ,and arrays are passed by using call by reference method.
● Array: A collection of values of same data type under a single variable name.
● Subscript: undex number or memory location of an element in array.
Range is 0 to size-1
● Base type of array: data type of array
● Access specifiers : private, public , protected and default(friendly- without
keyword)
● Class variables or static variables
● Instance variables or non-static variables
● Static and non-static functions
● Constructor function and its characteristics
● Types of constructor function:
1. Parameterized Constructor
2. Non-Parameterized Constructors
● Function Overloading: It implements Polymorphism.
● Escape sequences or non-graphic characters
● Fall -through in switch-case
● Jump statements - break and continue
● Iteration
● Variations in for loop
● Functions of class String
● Functions of class Character
● Wrapper classes : Library classes to wrap primitive data types in its object. Present
in package java.lang. Total 8 for each primitive data type.
Wrapper class: Data type
Byte : byte
Short : Short
Integer: int
Long: long
Float: float
Double: double
Character.: char
Boolean: boolean
● Functions of wrapper classes as parseInt….
● Autoboxing and Un-boxing
Dear Students,
Revise from class notes :
Difference Between :
● Class and object
● break and continue
● While and do-while loop
● If - else and switch-case
● Type promotion and type casting( Implicit and Explicit type conversion)
● Static and non-static functions
● Class and instance variables
● Autoboxing and un-boxing
● Linear search and Binary search in Array

Important keywords/ statements


● void function does not return anything
● final keyword tomake any variable as constant
● new keyword to create object or array
● import keyword to include any package
● System.exit(0) to terminate the program execution
● break to terminate the loop execution
● return to terminate the function execution
● this It refers to the the current object
Important Points :
● Default package of java java.lang
● Package that stores wrapper classes java.lang
● Package to store class Scanner java.util
● Package to store class Math and class String java.lang
● ASCII Codes A to Z 65 to 90
a to z 97 to 122
0 to 9 48 to 57
Space 32

You might also like