What is an abstract method

Assignment Help Programming Languages
Reference no: EM13804783

1. If a class contains an abstract method, the class must be declared _____.

abstract

public

private

None of the above

Question 2. What is an abstract class?

A generalized class used only to create related subclasses

A class without any superclasses

A class from which we create many instances

Any subclass with more than one superclass

Question 3. What is an abstract method?

Any method in an abstract class

A method without a body that is declared with the reserved word abstract

A method which cannot be inherited

A method that takes an abstract object as a parameter and returns nothing

Question 4. Which of the following classes is most likely an abstract class?

Vehicle

BlueSpruce

HandSaw

Goldfish

Question 5. In terms of object-oriented programming, a _____ is a mechanism that forces a programmer to adhere to specific rules when developing an application.

contract

base class

requirements analysis

method signature

None of the above

Question 6. An abstract method can be declared in which of the following?

Abstract classes

Any base class

Concrete classes

A and B

A and C

B and C

Question 7. Which language allows implementation of multiple inheritance using only base classes?

Java

C#

C++

All of the above

Question 8. Which of the following class definitions defines a legal abstract class?

class abstract Dog {

void Eat();

}

public abstract class Dog {

void Eat (){}

}

abstract private class Dog {

void Eat ();

}

public class abstract Dog {

void Eat (){}

}

Question 9. Which of the following declares an abstract method in an abstract C# class?

public abstract Calc();

public abstract void Calc();

public void Calc() {}

public void abstract Calc();

Question 10. Which of the following statements is true?

Interfaces contain a list of methods to be implemented.

Interfaces are classes with one or more unimplemented methods.

Interfaces can be instantiated just like regular classes.

Besides the naming convention, there is no difference between an interface and a class.

Reference no: EM13804783

Questions Cloud

Term paper on language development hypotheses : Term Paper on Language Development Hypotheses
Explain what are two ways toyota operation changed : What are two ways Toyota operation might have changed if it had focused on low cost instead of quality
Research on any topic relating to hair care : Please do some research on any topic relating to hair care, nail care, eye care, acne, or skin care. Please explain why you chose this topic and summarize in your own words what you learned about the topic.
Effects of low information security in an organization : Write 2 paragraphs on the effects of low information security in an organization
What is an abstract method : What is an abstract class? What is an abstract method
Problems based on probability distribution : What is the proportion of trucks that can be expected to travel either between 34 and 50 thousand miles?
Write paper that addresses marketing from global perspective : Write a research paper that addresses marketing from a global perspective. The main objective of this assignment is to help you understand the influence of environmental factors on organizations business decisions.
What are two ways fedex and the united states postal service : What are two ways Fedex and the United States Postal Service uses their strategies for attracting customers are different
Identify and analyse the key environmental changes : Identify and analyse the key environmental changes that impact on reward in the organisation and the business context that drives reward strategy. In doing this be sure to include external factors.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd