answersLogoWhite

0

What is class in oops concept?

Updated: 8/9/2023
User Avatar

Wiki User

14y ago

Best Answer

Classes are the integral part of the all-important programming paradigm known as Object-Oriented Programming(OOP). In OOP, a programming problem is perceived as a problem in a real-life scenario, as an interaction between objects. The problem is tackled by having a system of interacting objects, that interact among themselves to solve the programming problem. Objects in OOP bear semblance to real-life objects. Classes serve as templates for the creation of objects of the same type. For instance, students may be thought to be objects of the human-being class, cars may be thought to be objects of the Automobile class. Classes are defined as collection of methods(functions) and data members(variables), additionally defined by scope rules. In addition, classes also achieve the OOP principles of encapsulation, abstraction, polymorphism and inheritance. Encapsulation refers to binding data and code together, with data controlling access to code. Abstraction refers to the hiding the implementation details of a class from outside functions and exposing only necessary details. Polymorphism refers to the scenario when a class can play more than one role. Inheritance is used when one or more classes must include properties of another set of classes, and also have properties of their own.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

practical implementation of theoretical representation of encapsulation is nothing but class. in order to provide data security we can wrap data & its functionality into single autonomous units, called class.

object is used to crate instance of a class. it is used to allocate memory for class members dynamically at run time.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

A class is a collection of related data and functions which can serve to keep information organized and procedures grouped in a logical fashion.

Generally, a class defines an object or group of objects with similar features. It provides methods for creating, editing and destroying an instance of the object type defined by the class.

Remember the three key features of OOPs

  1. Abstraction - the abstract data-type representing all aspects of the object is entirely defined within the class. This is usually done by aggregating terminal data-types into records or other higher level structures that represent the idea of the object without using a specific instance of the object. The abstract data type is public.
  2. Encapsulation - everything needed to work with an object is located within it's class. Functions to create, manipulate and dispose of any instance of an object are all hidden inside the class. the names of the functions and their parameters are public, however, their underlying logic and structural code are private.
  3. Polymorphism - a class is able to transform itself and the objects it represents depending on the parameters passed to it, e.g. a class that represents regular polygons requires only one parameter to determine which polygon to draw (n>=3). It requires a second parameter to tell it how long each side should be. The first parameter makes the class polymorphic.

To these three ideas several others have been added, being special cases of these three ideas or workflow paradigms from general programming practice: re-usable, overloading, inheritance.
  1. Re-usabilty means that the code can be used again in new work because it has already been tested and debugged - this comes form the idea of code libraries or repositories where a coder or company stores code that, having passed all testing phases and been successfully implemented in other projects, is deemed ready for re-use
  2. Overloading is a special case of polymorphism. It simply means using the parameters passed to the class to cause the operators within the class to behave differently.
  3. Inheritance - a class inherits features from superior classes and bequeaths features to lower classes. For example a class used for drawing geometric shapes to the screen might have as its base parameters a colour and a thickness/size of line/point. This class will probably inherit a set of features from the i/o classes. The class then has sub-classes to
    • draw points, requiring parameters that give it x, y and maybe z coordinates
    • draw lines, requiring parameters that give start and finish coordinates or start and angular direction coordinates and length of line.
    • draw shapes, requiring parameters that give the shape a type (number of sides), length of side, starting coordinate, whether the starting coordinate is the top-left corner of the shape or the geometric centre of the shape, etc.
    • draw other segments and shapes, such as circles, ellipses, arcs, etc.

This answer is:
User Avatar

User Avatar

Wiki User

9y ago

A class in object-oriented programming is a type of template in the program code. It helps users create objects by simply using values.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

simply class is nothing but the collection of objects.....

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

the concept of the oops class is a objct-oriented program

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is class in oops concept?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is single inheritance in oops?

Single Inheritance is the concept of deriving a class properties from a single base class


What is containership in oops concept?

In container class we can only access the public part of base class. For accessing of private and protected part of base class we use friend functions.


Inner class oops?

Inner class oops is a program. This program is smaller class within a bigger class.


What is an anonymous class in oops?

class is defined in the class


What type of language is delphi whether it is a oops or procedural?

its not a oops concept, its a procedural concept in data structure as well as data ananlysis n algorthim


What is class in oops?

class is a user defind datatype


Oops concept in oracle?

Each entity is consider as a object


What is data type of class in oops?

user defined


What does a video game designers work in?

there is oops concept http://coders-blog.com/


Does java support oops concept?

Yes. Java is an Object Oriented Programming Language and it supports the OOPS concepts like Inheritance, Polymorphism etc


In oops what is the difference between class variable and variable?

Class Variable is a subset of Variables.


What is actual meaning of class in oops?

Class in oops is a thing that hava no physical existence, it is just a property of any object.object is recognised by a class. we can understand it by this way that "animal" is a class but "tiger" is an object "animal" have not any physical existence but "tiger" is physically exist but recognised by the word "animal".