Sunteți pe pagina 1din 10

Q. 1 what is Difference between static and dynamic website?

A. 1 Static means "constant--never changing".

Dynamic is "changing". You can make dynamic changes to a database without


having to shutdown the instance and restart for the changes to take effect.
However, if you do not update the control file, when you shutdown and startup, the
dynamic change is gone--it wasn't permanent.

Static sites are meant for those sites that can’t be changed or updates regularly.

And Dynamic sites are those sites that changes or update regularly.

Q.2 what is the difference between static RAM and dynamic RAM?

A.2 your computer probably uses both static RAM and dynamic RAM at the same
time, but it uses them for different reasons because of the cost difference between
the two types. If you understand how dynamic RAM and static RAM chips work
inside, it is easy to see why the cost difference is there, and you can also
understand the names. Dynamic RAM is the most common type of memory in use
today. Inside a dynamic RAM chip, each memory cell holds one bit of information
and is made up of two parts: a transistor and a capacitor. These are, of course,
extremely small transistors and capacitors so that millions of them can fit on a
single memory chip. The capacitor holds the bit of information -- a 0 or a 1 (see How
Bits and Bytes Work for information on bits). The transistor acts as a switch that lets
the control circuitry on the memory chip read the capacitor or change its state. A
capacitor is like a small bucket that is able to store electrons. To store a 1 in the
memory cell, the bucket is filled with electrons. To store a 0, it is emptied. The
problem with the capacitor's bucket is that it has a leak. In a matter of a few
milliseconds a full bucket becomes empty. Therefore, for dynamic memory to work,
either the CPU or the memory controller has to come along and recharge all of the
capacitors holding a 1 before they discharge. To do this, the memory controller
reads the memory and then writes it right back. This refresh operation happens
automatically thousands of times per second. This refresh operation is where
dynamic RAM gets its name. Dynamic RAM has to be dynamically refreshed all of
the time or it forgets what it is holding. The downside of all of this refreshing is that
it takes time and slows down the memory. Static RAM uses a completely different
technology. In static RAM, a form of flip-flop holds each bit of memory (see How
Boolean Gates Work for detail on flip-flops). A flip-flop for a memory cell takes 4 or 6
transistors along with some wiring, but never has to be refreshed. This makes static
RAM significantly faster than dynamic RAM. However, because it has more parts, a
static memory cell takes a lot more space on a chip than a dynamic memory cell.
Therefore you get less memory per chip, and that makes static RAM a lot more
expensive. So static RAM is fast and expensive, and dynamic RAM is less expensive
and slower. Therefore static RAM is used to create the CPU's speed-sensitive cache,
while dynamic RAM forms the larger system RAM space.
Q.3 what is the difference between dynamic and static IP addresses?

A.3 IP address is a 32-bit number that identifies each client or server on the
Internet. This definition is based on the current version 4 of the Internet Protocol
(IPv4). Each packet sent across the Internet

Includes the sender's and receiver's IP addresses in order to route the packets
correctly. You can think of it as the Internet equivalent of a phone number where
you can be reached. IPv4 addresses are divided into 4 parts, each ranging from 0 to
255, separated by dots, for example: 192.168.0.1

Dynamic IP addresses can change each time you connect to the Internet,
while static IP addresses are reserved for you statically and don't change
over time.

Residential Internet connections, whether broadband or dialup usually use dynamic


IP addresses, while commercial leased lines and servers have static IPs, so they can
always be reached at the same address.

The need for dynamic IP addresses arises from the limited number of IP addresses
available in IPv4 (Internet Protocol version 4). Theoretically, there can be about four
billion IPs in the Internet, however, the actual number is much lower for various
reasons. Something had to be done to ensure supply of address space, at least until
IPv6 is widely implemented on the Internet, allowing for 128bit IP addresses. The
limited IP address space is one of the reasons for the wide use of NAT routers, as
well as DHCP and leasing of dynamic IP addresses.

With dynamic IP addressing, there is a pool of IPs that your ISP can assign to users.
When you connect to the Internet, your computer is leased one IP address from that
pool for a number of hours. When you disconnect, or when the lease expires the IP
address is freed and put back into the pool of available IPs. That way, ISPs can have
more subscribers than number of IP addresses (as long as they don't all connect to
the Internet at the same time) and ease IP maintenance.

Even with always-on broadband connections, it's easy to just lease IP addresses as
needed. That's why the DHCP dynamic IP addressing is widely used today,
especially for residential connections where users don't run servers. The downside
is, your IP address, or "phone number" if you will, can change any time you get
disconnected, there is a power outage, ISP maintenance, etc. The fact that you get
disconnected does not necessarily mean the IP address is going to change, just as
the fact that you get the same IP address does not mean it is assigned statically.

Q: 4 what is the difference between static and dynamic testing?


A: 4 Difference number 1: Static testing is about prevention, dynamic testing is
about cure.

Difference number 2: The static tools offer greater marginal benefits.

Difference number 3: Static testing is many times more cost-effective than dynamic
testing.

Difference number 4: Static testing beats dynamic testing by a wide margin.

Difference number 5: Static testing is more effective!

Difference number 6: Static testing gives you comprehensive diagnostics for your
code.

Difference number 7: Static testing achieves 100% statement coverage in a


relatively short time, while dynamic testing often often achieves less than 50%
statement coverage, because dynamic testing finds bugs only in parts of the code
that are actually executed.

Difference number 8: Dynamic testing usually takes longer than static testing.
Dynamic testing may involve running several test cases, each of which may take
longer than compilation.

Difference number 9: Dynamic testing finds fewer bugs than static testing.

Difference number 10: Static testing can be done before compilation, while dynamic
testing can take place only after compilation and linking.
Difference number 11: Static testing can find all of the followings that dynamic
testing cannot find: syntax errors, code that is hard to maintain, code that is hard to
test, code that does not conform to coding standards, and ANSI violations.

Q.5 Difference between Overloading and Overriding?

A.5

1. In overloading, there is a relationship between methods

Available in the same class where as in overriding, there

Is relationship between a super class method and subclass

Method.

2. Overloading doesn't block inheritance from the

Super class where as overriding blocks inheritance.

3. In overloading, separate methods share the same name

Where as in overriding, subclass methods replaces the

Super class.

4. Overloading must have different method signatures where

As overriding must have same signature.

Q.6 Difference between abstract class and interface?

A.6 (1) An abstract class may contain complete or


Incomplete methods. Interfaces can contain only the
Signature of a method but no body. Thus an abstract class
Can implement methods but an interface cannot implement
Methods.
(2) An abstract class can contain fields,
Constructors, or destructors and implement properties. An
Interface cannot contain fields, constructors, or
Destructors and it has only the property's signature but no
Implementation.
(3) An abstract class cannot support multiple
Inheritance, but an interface can support multiple
Inheritance. Thus a class may inherit several interfaces
But only one abstract class.
(4) A class implementing an interface has to
Implement all the methods of the interface, but the same is
not required in the case of an abstract Class.
(5) Various access modifiers such as abstract,
Protected, internal, public, virtual, etc. are useful in
Abstract Classes but not in interfaces.
(6) Abstract classes are faster than interfaces.

OR
What is Difference between Interface and abstract Class
Interface:
1. Interface has only Signature.
2. All the Methods are Public; it doesn't have access Modifier Controls
3. It have used Multiple inheritance in the Object oriented Language
4. All the Methods are Abstract.
5. It does not have Contructor, destructor, Fileds
6. A Class May inherits several Interfaces

Abstract Class:
1. Abstract Class have Method defination and Implementation
2. It have control the Access Modifiers
3. It does not allow multiple Inheritences
4. Some methods are concrete
5. It has Contructor and destructor
6. Only one abstract have to derived

Q7. What are the OOPS concepts?

Ans7. 1) Encapsulation: It is the mechanism that binds together

Code and data in manipulates, and keeps both safe from

Outside interference and misuse. In short it isolates a

Particular code and data from all other codes and data. A

Well-defined interface controls the access to that

Particular code and data.

2) Inheritance: It is the process by which one object

acquires the properties of another object. This supports

the hierarchical classification. Without the use of

hierarchies, each object would need to define all its

characteristics explicitly. However, by use of inheritance,

an object need only define those qualities that make it

unique within its class. It can inherit its general

attributes from its parent. A new sub-class inherits all of


the attributes of all of its ancestors.

3) Polymorphism: It is a feature that allows one interface

to be used for general class of actions. The specific

action is determined by the exact nature of the situation.

In general polymorphism means "one interface, multiple

methods", This means that it is possible to design a

generic interface to a group of related activities. This

helps reduce complexity by allowing the same interface to

be used to specify a general class of action. It is the

compiler's job to select the specific action (that is,

Method) as it applies to each situation.

Q8. What Is the class?

Ans. 1) A class is a template that defines the form of an object.2) A class specifies both the
data and the code that will operate on that data.3) Objects are instances of a class.4) The methods
and variables that constitute a class are called members of the class.

Or

A class is created by use of the keyword class.

The general form of a class definition that contains only instance variables and methods:
class classname {
// declare instance variables
access type var1;
access type var2;
// ...
access type varN;

// declare methods
access ret-type method1(parameters) {
// body of method
}
access ret-type method2(parameters) {
// body of method
}
// ...
access ret-type methodN(parameters) {
// body of method
}
}

The general form for declaring an instance variable is shown here:


access type var-name;
1. access specifies the access,
2. type specifies the type of variable, and
3. var-name is the variable's name.

1. To access these variables, you will use the dot (.) operator.
2. The dot operator links the name of an object with the name of a member.
3. The general form of the dot operator is shown here:

object.member

You can use the dot operator to access both instance variables and methods.
What is an Abstract class?

An abstract class only allows other classes to inherit from it and cannot be instantiated. When we create an abstract class, it should have
completed methods but at least one or more uncompleted methods and these must be preceded by the key word abstract. If all the metho
abstract class are uncompleted then it is the same as an interface, but there is a restriction that it cannot make a class inherit from it, whi
can not work as a base class.

What is an Interface?

An interface is defined by the key word interface. An interface has no implementation; it only has the definition of the methods without
When we create an interface, we are basically creating a set of methods without any implementation. A class implementing an interface
the implementation of the interface members. All the methods and properties defined in an interface are by default public and abstract.

Abstract Class vs. Interface

· An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Th
class can implement methods but an interface can not implement methods.

· An abstract class can contain fields, constructors, or destructors and implement properties. An interface can not contain fields, constru
destructors and it has only the property's signature but no implementation.

· An abstract class cannot support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit sever
but only one abstract class.

· A class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abst

· Various access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.

· Abstract classes are faster than interfaces.


Q9. Features of OOPS?
Ans9

Abstraction

Abstraction is a process of identifying the relevant


qualities and behvaiors an object should possess. Lets take
an example to understand abstraction. A Laptop consists of
many things such as processor, motherboard, RAM, keyboard,
LCD screen, wireless antena, web camera, usb ports, battery,
speakers etc. To use it, you don't need to know how
internally LCD screens, keyboard, web camera, battery,
wireless antena, speakers works. You just need to know how
to operate the laptop by switching it on. The intrinsic
details are invisitble. Think about if you would have to
call to the engineer who knows all internal details of the
laptop before operating it. This would have highly expensive
as well as not easy to use everywhere by everyone. So here
the Laptop is an object that is designed to hide its complexity.

Think If you need to write a piece of software to track the


students details of a school, you may probably need to
create Students objects. People comes in all different
backgrounds, educational qualifications, locations, hobbies,
ages and have multiple religion, language but in terms of
application, an student is just a name, age, class and roll
number, while the other qualities are not relevant to the
Application. Determining what other qualities (background,
qualifications, location, hobbies etc) are in terms of this
Application is abstraction.

In object-oriented software, complexity is managed by using


Abstraction. Abstraction is a process that involves
identifying the critical behavior of an object and
Eliminating irrelevant and complex detilals. A well
thought-out abstraction is usually simple, and easy to use
in the perspective of the user, the person who is using your
Object.
Encapsulation

Encapsulation is a method for protecting data from unwanted


access or alteration by packaging it in an object where it
is only accessible through the object's interface.
Encapsulation are often referred to as information hiding.
But both are different. Infect information hiding is
Actually the result of Encapsulation. Encapsulation makes it
possible to separate an object's implementation from its
Original behavior - to restrict access of its internal data.
This restriction facilitate certain details of an object’s
behavior to be hidden. This allows to protect an object's
internal state from corruption by its user.

It is the mechanism by which Abstraction is implemented. In


other words you can say that it is the result of the
Encapsulation. For example, the Laptop is an object that
encapsulates many technologies/hardwares that might not be
understood clearly by most people who use it.
Inheritance

Inheritance is the ability to define a new class or object


that inherits the behavior and its functionality of an
Existing class. The new class or object is called a child or
subclass or derived class whie the original class is called
Parent or base class. For example, in a software company
Software Engineers, Sr. Software Engineers, Module Lead,
Technical Lead, Project Lead, Project Manager, Program
Manger, Directors all are the employees of the the company
but their work, perks, roles, responsibilities differs. So in
OOP, the Employee base class would provide the common
behaviors of all types/level of of employee and also some
behaviors properties that all employee must have for that
Company. The particular sub class or child class of the
employee would impelement behaviors specific to that level
Of the employee. So by above example you can notice that the
main concept behind inheritance are extensibility and code
reuse (in this case you are extending the Employee class and
using its code into sub class or derived class).
Polymorphism

As name suggests, Polymorphism means an ability to assume


Different forms at different places. In OOP, it is a
language's ability to handle objects differently based on
Their runtime type and use. Polymorphism is briefly
described as "one interface, many
Implementations”. polymorphism is a characteristic of being
able to assign a different meaning or usage to something in
different contexts - specifically, to allow an entity such
as a variable, a function, or an object to have more than
One form.

There are two types of polymorphism.

1. Compile time polymorphism - It is achieved by


overloading functions and operators
2. Run time polymorphism - It is achieved by overriding
virtual functions

Let’s say you have a class that have many Load methods having
different parameters, this is called Compile time
Polymorphism. Let’s take another example where you have a
virtual method in the base class called Load with one
parameter and you have redefined its functionality in your
sub class by overriding base class Load method, this is
Called Run time polymorphism.

S-ar putea să vă placă și