Which of the following is a benefit of using a list as a data abstraction in a program select two answers?
Abstraction is the concept of object-oriented programming that “shows” only essential attributes and “hides” unnecessary information. 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. Click here if the video is not accessible Suppose you want to create a banking application and you are asked to collect all the information
about your customer. There are chances that you will come up with following information about the customer But, not all of the above information is required to create a banking application. So, you need to select only the useful information for your banking application from that pool. Data like name, address, tax information, etc. make sense for a banking application which is an Abstraction example in OOPs Since we have fetched/removed/selected the customer information from a larger pool, the process is referred as Abstraction in OOPs. However, the same information once extracted can be used for a wide range of applications. For instance, you can use the same data for hospital application, job portal application, a Government database, etc. with little or no modification. Hence, it becomes your Master Data. This is an advantage of Abstraction in OOPs. Difference between Abstraction and Encapsulation
Difference between Abstract Class and Interface
What is Abstract Class?Abstract Class is a type of class in OOPs, that declare one or more abstract methods. These classes can have abstract methods as well as concrete methods. A normal class cannot have abstract methods. An abstract class is a class that contains at least one abstract method. What are Abstract Methods?Abstract Method is a method that has just the method definition but does not contain implementation. A method without a body is known as an Abstract Method. It must be declared in an abstract class. The abstract method will never be final because the abstract class must implement all the abstract methods. Advantages of Abstraction
When to use Abstract Methods & Abstract Class?Abstract methods are mostly declared where two or more subclasses are also doing the same thing in different ways through different implementations. It also extends the same Abstract class and offers different implementations of the abstract methods. Abstract classes help to describe generic types of behaviors and object-oriented programming class hierarchy. It also describes subclasses to offer implementation details of the abstract class. Summary:
Which of the following are benefits of using well named variables in a computer program?Which of the following are benefits of well-named variables? -The program will be easier to read. -The program will be easier for others to debug. Which of the following statements best describes the predictability of the results when this algorithm is run on a computer?
Which of the following best describes the problem caused by the lack of unique ID numbers?Which of the following best describes the problem caused by the lack of unique ID numbers? Students who have the same name may be confused with each other.
Which of the following best explains how algorithms that run on a computer can be used to solve problems *?Which of the following best explains how algorithms that run on a computer can be used to solve problems? All problems can be solved with an algorithm that runs in a reasonable amount of time.
|