You are on page 1of 3

CANADIAN COLLEGE OF MODERN TECHNOLOGY

1 SILICON HILLS MILE 91

DEPARTMENT OF COMPUTER SCIENCE AND BIT FINAL YEAR

ASP.NET INDIVIDUAL ASSIGNMENT

COURSE INSTRUCTOR: Mr. Isaac Muckson Sesay

SUBMITTED BY: Issa A. Turay

DATE OF SUBMISSION: February 12th, 2021.


ID NO: 18290214

DEPARTMENT: Computer Science

LEVEL: Final Year – First Semester

EMAIL: iaturay214@ccmtsl.com
Q. Explain the main concepts of OOP?

Answer.

To start with, OOP stands for object oriented programming. So therefore these concepts in Java for
instance are the main ideas behind Java’s Object Oriented Programming. These main concepts are:
Abstraction, Encapsulation, Inheritance, and Polymorphism. Grasping them is the key to understanding
how Java works. Basically, Java OOP concepts let us create working methods and variables, then re-use all
or part of them without compromising security.

There are four main OOP concepts in Java which are briefly explained taking key notes to cognizance.

 Abstraction. Abstraction means using simple things to represent complexity. For instance, we


all know how to turn the TV on, but we don’t need to know how it works in order to enjoy it. In
Java, abstraction means simple things like objects, classes, and variables represent more
complex underlying code and data. This is important because it lets avoid repeating the same
work multiple times.

 Encapsulation. This is the practice of keeping fields within a class private, then providing access
to them via public methods. It’s a protective barrier that keeps the data and code safe within
the class itself. This way, we can re-use objects like code components or variables without
allowing open access to the data system-wide.

 Inheritance. This is a special feature of Object Oriented Programming in Java. It lets


programmers create new classes that share some of the attributes of existing classes. This lets
us build on previous work without reinventing the wheel.

 Polymorphism. This Java OOP concept lets programmers use the same word to mean different
things in different contexts. One form of polymorphism in Java is method overloading. That’s
when different meanings are implied by the code itself. The other form is method overriding.
That’s when the different meanings are implied by the values of the supplied variables. See
more on this below.

Q. What does the term "class" mean in OOP?

Answer.

In object oriented programming a Class is a blueprint or a set of instructions to build a specific type of
object. It is a basic concept of Object-Oriented Programming which revolve around the real-life entities.
Class in Java determines how an object will behave and what the object will contain. That is to say, an
object is an instance of a class.

Page 1 of 4
Syntax

class <class_name> {
field;
method;
}

Q. What is the difference between a class and an object?


Answer.

To start with, Classes and Objects in Java are the fundamental components of OOP's. 

A Class in object oriented programming is a blueprint or prototype that defines the variables and the
methods (functions) common to all Java Objects of a certain kind.

An object in object oriented programming is a specimen of a class. Software objects are often used to
model real-world objects you find in everyday life.

Q. What is a token?

Q. What is a destructor?

Q. Explain the term Interface in OOP?

Q. Explain method overriding?

Q. Explain Abstraction in OOP?

Page 2 of 4

You might also like