Press "Enter" to skip to content

Start Searching the Answers

The Internet has many places to ask questions about anything imaginable and find past answers on almost everything.

What are the levels of abstraction?

Physical level: The lowest level of abstraction describes how a system actually stores data. The physical level describes complex low-level data structures in detail. Logical level: The next higher level of abstraction describes what data the database stores, and what relationships exist among those data.

What are the levels of abstraction class or procedural?

Explanation: Abstraction is generally divided into 3 different levels, namely, logical, physical and view level.

What are the levels of abstraction in software engineering?

In software maintenance, the following three levels of reverse engineering abstraction are defined: implementation abstraction, design abstraction, specification abstraction.

  • Implementation abstraction –
  • Design abstraction –
  • Specification abstraction –

What are examples of abstractions in computer science?

Identifying examples of abstraction[edit]

  • A car is a very complex machine but the interface is simple (a steering wheel, a gas pedal and a gear shift)
  • A video game controller only has a few buttons, but underneath the controller is complex control mechanism.

What is abstraction and example?

Abstraction means displaying only essential information and hiding the details. Data abstraction refers to providing only essential information about the data to the outside world, hiding the background details or implementation. Consider a real life example of a man driving a car. This is what abstraction is.

What is abstraction and give a real life example?

Another real life example of Abstraction is ATM Machine; All are performing operations on the ATM machine like cash withdrawal, money transfer, retrieve mini-statement…etc. but we can’t know internal details about ATM. Note: Data abstraction can be used to provide security for the data from the unauthorized methods.

Why is money an example of abstraction?

Money is created from thin air (AKA nothing) but worth is defined in the mind. Billions of dollars in cash are worthless to a kitten. The worth of that money, is defined in your mind. It exists no where else, hence money is kind of abstract since it’s worth is only in the mind.

What is the purpose of abstraction?

The main purpose of abstraction is hiding the unnecessary details from the users. Abstraction is selecting data from a larger pool to show only relevant details of the object to the user. It helps in reducing programming complexity and efforts. It is one of the most important concepts of OOPs.5 วันที่ผ่านมา

What is not type of inheritance?

Explanation: All classes in java are inherited from Object class. Interfaces are not inherited from Object Class. Static members are not inherited to subclass.

What is multiple inheritance explain with example?

Multiple Inheritance is a feature of C++ where a class can inherit from more than one classes. The constructors of inherited classes are called in the same order in which they are inherited. For example, in the following program, B’s constructor is called before A’s constructor.

What is difference between multiple and multilevel inheritance?

“Multiple Inheritance” refers to the concept of one class extending (Or inherits) more than one base class. Multilevel inheritance refers, where one can inherit from a derived class, thereby making this derived class the base class for the new class.

What is polymorphism in oops?

Polymorphism is one of the core concepts in OOP languages. It describes the concept that different classes can be used with the same interface. Each of these classes can provide its own implementation of the interface. Java supports two kinds of polymorphism. You can overload a method with different sets of parameters.

What is real time example of polymorphism?

The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. Real life example of polymorphism: A person at the same time can have different characteristic. Like a man at the same time is a father, a husband, an employee.

What are the types of polymorphism in oops?

There are two major types of polymorphisms in Object Oriented Programming (OOPS) languages. They are Static Binding (Compile time Polymorphism) and Dynamic Binding (Runtime Polymorphism). Method overriding would be the example of Dynamic Polymorphism and Method Overloading would be the example of Static Polymorphism.

What is difference between polymorphism and inheritance?

1. Inheritance is one in which a new class is created (derived class) that inherits the features from the already existing class(Base class). Whereas polymorphism is that which can be defined in multiple forms. Inheritance supports the concept of reusability and reduces code length in object-oriented programming.

Can you have polymorphism without inheritance?

polymorphism without inheritance there are languages where you have polymorphism without using inheritance . some examples are javascript, python, ruby,, and small talk. in each of these languages it is possible to write car.

Can we override main method?

No, we cannot override main method of java because a static method cannot be overridden. The static method in java is associated with class whereas the non-static method is associated with an object. Therefore, it is not possible to override the main method in java.

Can we make constructor static?

No, we cannot define a static constructor in Java, If we are trying to define a constructor with the static keyword a compile-time error will occur. In general, static means class level. A constructor will be used to assign initial values for the instance variables.

Can constructor be static or final?

Java constructor can not be static One of the important property of java constructor is that it can not be static. We know static keyword belongs to a class rather than the object of a class. A constructor is called when an object of a class is created, so no use of the static constructor.

Can we make constructor as final?

No, a constructor can’t be made final. A final method cannot be overridden by any subclasses. But, in inheritance sub class inherits the members of a super class except constructors. In other words, constructors cannot be inherited in Java therefore, there is no need to write final before constructors.

Why constructor is non-static?

Constructors are NOT static functions. When you do Test test =new Test(); a new Test object is created and then the constructor is called on that object (I mean this points to the newly created object). Constructors are neither static (as called using class name) or non-static as executed while creating an object.

Can we have static constructor in non-static class?

A non-static class can contain one parameterless static constructor. Parameterized static constructors are not allowed. Static constructor will be executed only once in the lifetime. So, you cannot determine when it will get called in an application if a class is being used at multiple places.

Why is static constructor called first?

Static constructor are called automatically before the first instance is created or any static members are referenced. A static constructor is used to initialize any static data, or to perform a particular action that needs to be performed once only. Static constructors cannot be inherited or overloaded.