0% found this document useful (0 votes)
9 views

Object Oriented Programming Topper Series

The document covers various concepts of Object-Oriented Programming (OOP) including definitions of classes, objects, encapsulation, inheritance, and polymorphism. It also discusses the differences between procedural and object-oriented programming, types of inheritance, and advantages of OOP. Additionally, it touches on web hosting types, domain name registration, and content management systems.

Uploaded by

hellscythe5565
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)
9 views

Object Oriented Programming Topper Series

The document covers various concepts of Object-Oriented Programming (OOP) including definitions of classes, objects, encapsulation, inheritance, and polymorphism. It also discusses the differences between procedural and object-oriented programming, types of inheritance, and advantages of OOP. Additionally, it touches on web hosting types, domain name registration, and content management systems.

Uploaded by

hellscythe5565
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/ 60

Hi All

1. The variables declared inside the class are known as ____. Data
member
-
- -

2. What is the difference between structure and class?


3. The functions associated with the class are called __ Member
function
-
-
-

- 4. Access to data is restricted by the feature known as __


-
Encapsulation/
-
5. Late binding is also called ___. Dynamic binding Dute hang
-

-
6. Which of the following is not a type of inheritance?

- a. Hybrid b. Multiplec. multilevel d. Multiclass


7. What are the limitations of procedural programming approaches?
Date is undervalued Greate new Datatepe difficulty
is
,

- poor Real world modeling


8. Which of the following is not a characteristic of OOP?
-
-

-
a. It emphasizes procedure more than data. -
---
b. It offers good real world modelling.
c. It wraps up related data items and associated functions in the unit.
d. None of these
9. What do you mean by inheritance? How does this support
'reusability’?
-
-

Reusability: Inheritance supports the concept of “reusability”, i.e. when


we want to create a new class and there is already a class that
includes some of the code that we want, we can derive our new class
from the existing class. -

10. Distingush between an object and a class?


-
&
- - -

- -

-
-

-
- -

- -

- - -
-
-

-
-

---

35
Briefly explain about any three concepts of OOP

1. Object
2. Classes
3. Data abstraction
4. Data Encapsulation
5. Modularity
6. Polymorphism
7. Inheritance
The ability of a message or data to be processed in more than
one form is called ________.
-
(a) Polymorphism (b) Encapsulation
(c) Data abstraction (d) Inheritance
_______ are individual instances of class.

object
Write any two advantages of using object oriented
--

programming over procedure-oriented programming


-

Ans :
1. Data is given more importance -
2. Provides modular programming -
3. Can define abstract datatypes -
4.Data hinding -
5. Real life modeling L
List any four different forms of inheritance
-
-
-
1. Single inheritance - one sub class is inherited by one base
-

class .
-
-
2. Multiple inheritance - class have more than one base class .
-
-
-
3. Multilevel inheritance - a derived class created from another
derived class .
-
4. Hierarchical inheritance - more than one sub class is
-
-

-
inherited from a single base class .
5. Hybrid inheritance- combining more than one type of
-
inheritance .
-
Identify the type of inheritance that has two base classes and

--
one derived class.
(a) Multi level inheritance (b) Multiple inheritance
(c) Hierarchical inheritance (d) Hybrid inheritance
What is polymorphism in Object Oriented Programming ? Name
- -

the two types of polymorphism.


-

Ans :
Polymorphism (from the Greek meaning ”having mul-
tiple forms”) is the ability to assign different meanings in
different contexts, to an entity such as object, function or
-

operator. Two types of polymorphism are compile time poly-


-

morphism and run time polymorphism.


-

-
How do the access labels of class data type implement data
- -
-
hiding ?
-

Ans:
Data hiding is a process of combining data and func-
--
tions into a single unit. The access specifiers (labels) used
-
-

in C++ are Public,Private and Protected. In, Public all the


-

members will be available to everyone. In private, the data


-
- -

and function can’t be accessed by other classes. In protected,


-
--

data and functions will only be available to the derived class.


--
________ protect data from unauthorized access.
(a) Polymorphism
(b) Encapsulation -
(c) Data abstraction
Write any two advantages of Object Oriented Programming
-

a. OOP provides a clear modular structure for programs.


b. It is good for defining abstract data types.
c. Implementation details are hidden from other modules and
have a clearly defined interface.
What do you mean by Inheritance in C ++ ?
Inheritance is the process by which objects of one class
acquire the properties and functionalities of another class
Write any 3 differences between Procedure oriented
programming and object oriented programming
-

S
-

-
- -

- -

-- -

- -

-
-

-
-

-
Explain Compile Time Polymorphism sum (int, int)
-

Sum (float ,fina


Ans : Compile time polymorphism refers to the ability of the
compiler to relate or bind a function call with the function
definition during compilation itself.
-
1. Function Overloading : Function overloading is a feature of
object-oriented programming where two or more functions
-

can have the same name but different parameters.


~ -

2. Operator Overloading : Operator overloading is the concept


-

of giving new meaning to an existing C++ operator (like +, -,


--

=, * etc.).
O Variable in JavaScript start with
1.

vor
2. Write a JavaScript code to find sum of two numbers using function?
&
-

- -
-

- -
-
- - -

-
-
- -

-
- =>

&
- - -

-
R -
-
-

- -
-

-
-
3.
I Explain Datatypes in JavaScript?

1 number > tre,


- -re frantinal ,
intesor

27 5
es : + 25,
.
-

of characters enclosed
2 . String >
-
group
In Double Quotes.

"Abaizs" "Hello" "123"


, S

boolean > tanc or face


3 .
-
4. Write JavaScript code to find square of numbers?·
&

- -
1-10 ?
-

-
-
-
-

--
-

Y
S = (x1 =
1
--


&
i=i+ 1
-

-
-
-
=
I
Hi

S = 2x2

E
-
5. Explain events in JavaScript?
-

-
-

E
-
-

- -
-

-
6. ay whether the following statements are true or false:Web page
using two print functions

a. A function is automatically executed when the browser opens the


web page.
b. A function is usually placed in the head section of a web page.

c. A function can be called any number of times.


d. Even though a function is defined within the body section, it will not
be executed, if it is not called
6. Say whether the following statements are true or false:Web page
-
using two print functions - =

a. A function is automatically executed when the browser opens the


E web page. -

- -
-

- -

b. A function is usually placed in the head section of a web page.


T
T c. A function can be called any number of times.
- d. Even though a function is defined within the body section, it will not

↓ be executed, if it is not called


--

D
7. Is true or false ; isNaN("hello")
-
>
-
-

e
tasa
8. Write a JavaScript code to create a web page that displays the capital
of a State?
9. Predict the output of following :
<HTML>
<BODY>
<SCRIPT Language= "JavaScript">
var i, s = 0;
for (i = 1; i <= 100; i += 2)
s += i;
document.write("Sum = " +s);
</SCRIPT>
</BODY>
</HTML>
10. Classify the following values in JavaScript into suitable data types.
--

"Welcome","123", "true", 67.4, .98, false, "hello"

↓/
String Number ~
Stor, number bookn
Stres stors
1. The companies that provide web hosting services are called.____
G
-
-

The companies that provide web hosting services are called Web Hosts.
-
2. VPS is
-

a. Virtual Premium Service


b. Virtual Private Service
c. Virtual Premium Server
d. Virtual Private Server -
3. What is CMS? What are the features of CMS? Give Examples.
---
4. How is responsive web design implemented?
--
5. A supermarket in a city wishes to take its business online. It plans to
&

accept orders for its products through a website and receive payments
online. - -

-
a. Which type of hosting is suitable for this website? Dedicated
- -

b. Explain the reason for your choice. hunting


-
6. Raju wishes to host a website for his family. What are the advantages
-

that free web hosting companies provide?

&
1. Free hosting provides web hosting services free of charge.
- -
-

2. Free web hosting is useful for sharing content on the web, among
-

groups having similar interests like family unions, nonprofit


-
-

organisations , etc. who are not able to spend money on web hosting.
-
-

7. Emil wishes to purchase the web hosting space required to host a
- - -

website for his medical shop. List the features to be taken into
-

consideration while buying hosting space on a web server.


-
8. What is the advantage of using SFTP protocol in FTP software?
9. Explain types of web hosting?
10. Write any two examples of FTP client software?
Web hosting

Web hosting is the service of providing


storage space in a web server to serve files
for a website to be made available on the Internet.
Types of web hosting

1. Shared Hosting : -

➔ It is referred to as shared because many different websites are stored


-

on one single web server and they share resources like RAM and CPU.
➔ Shared hosting is most suitable for small websites that have less
traffic.
➔ Shared servers are cheaper and easy to use

-
2. Dedicated hosting : -

➔ Dedicated web hosting is the hosting where the client leases the entire
-
web server and all its resources.
➔ The web server is not shared with any other website.
➔ Websites of large organisations, government departments, etc. where
there are large numbers of visitors, opt for dedicated web hosting.
➔ Dedicated servers provide guaranteed performance, but they are very
expensive.
3. Virtual Private Server:

➔ A Virtual Private Server (VPS) is a physical server that is virtually


partitioned into several servers using the virtualization technology.
➔ Each VPS works similar to a dedicated server and has its own separate
server operating system, web server software and packages like
e-mail, databases, etc. installed in it.
➔ VPS hosting provides dedicated bandwidth to each website on the
server.
➔ Some popular server virtualization softwares are VMware, Virtualbox,
FreeVPS, User- mode Linux, Microsoft Hyper-V, etc.
Buying Host space

Purchase of hosting space Factors have to be considered:


-
➔ Amount of space required for storing the files of our website.
- -
-
➔ Involvement of programming content.
-

➔ Requirement of Windows hosting or Linux hosting.


-

➔ Database support, e-mail facility, etc


--
Domain Name Registration

➔ Domain names are used to identify a website in the Internet.


➔ The details of domain names are available in WHOIS data base. This
database is owned and managed by ICANN (Internet Corporation for
Assigned Names and Numbers).
➔ The details of domain name (URL) include the name, address, telephone
number and e-mail address of the registrant.
➔ The domain name is connected to the IP address of the server through
‘A record’.
FTP client software

➔ FTP is used to transfer files from one computer to another on the


Internet.
➔ FTP client software establishes a connection with a remote server and
is used to transfer files from our computer to the server computer.
➔ FTP sends username and password to the server as plain text which is
unsecure.
➔ Therefore nowadays, SSH FTP (SFTP) protocol which encrypts and
sends usernames, passwords and data to the web server is used in
the FTP software.
➔ FTP uses Secure Shell (SSH) protocol which provides facilities for
secure file transfer.
Free Hosting

➔ Free hosting provides web hosting services free of charge.


➔ Such free web hosting sites may place certain restrictions on the files.
➔ The size of the files that can be uploaded may be limited, audio/video
files (mp3, mp4, etc.) may not be permitted and so on.
➔ Free web hosting is useful for sharing content on the web, among
groups having similar interests like family unions, non-profit
organisations, etc. Sites.google.com, yola.com, etc. are free web
hosting services.
Content Management System

➔ Content Management System (CMS) refers to a web based software


system which is capable of creating, administering and publishing
websites.
-

➔ CMS provides an easy way to design and manage attractive websites.


-
➔ CMS provides standard security features in its design.
➔ Help people with less technical knowledge to design and develop secure
websites. -
-

➔ Some of the popular CMS software are WordPress, Drupal and Joomla
--
Responsive web design
-

➔ Responsive web design is the custom of building a website suitable to


work on every device and every screen size, no matter how large or
-

small, mobile phone or desktop or television.


➔ Responsive web design can be implemented using flexible grid layout,
-

flexible images and media queries.


-
-

➔ Flexible grid layouts set the size of the entire web page to fit the
-

display size of the device.Media queries provide the ability to specify


- -
different styles for individual devices.
-
➔ Flexible images and videos set the image/video dimensions to the
-

percentage of display size of the device.


-

You might also like