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

  The given code is meant to find out the largest item of a

the following code is meant to find the largest item of a list but the lines are out of order. the following code is

  Create test-methods for each operations

Write the methods to pass the tests. A significant portion of your score will be based on the effectiveness and thoroughness of your test-methods.

  Write a program that prompts the user to enter the mass

Write a program that prompts the user to enter the mass of a person in kilograms and outputs the equivalent weight in pounds. Output both the mass and the weight rounded to two decimal places

  Program to store highest value using two-dimensional array

Write down a program which uses the two-dimensional array to store highest and lowest temperatures for each month of the year.

  Create class for factory workers are paid certain amount

Create class for Factory workers are paid a certain amount for each unit they make and their total pay is the number of units produced times the pay per unit.

  Implement a program that processes an input file

Implement a program that processes an input file by changing every occurrence of an old string into a new string. (e.g., the usage is: chstr.pl file oldstring newstring, chstr.pl is your program name, file, oldstring and newstring are parameters ..

  Write a code to locate and rank keywords

You are working on the custom Web application to design document library for client. Write code to locate and rank the keywords. You have been given sample document to use for testing.

  Write function to merge contents of two sorted arrays

Write a function which will merge contents of two sorted (ascending order) arrays of type FLOAT values, use efficient bubble sort to sort two arrays first and then use merger function.

  Write function that takes array of positive integers

Write a function that takes an array of positive integers and the size of the array, and returns the average (type float) of the values.

  Find e(x) and var(x)

Suppose 0.4 of students are women and gpa for women has mean of 3 and sd 0.8; Gpa for men has mean of 2.5 and sd of 1.0. a sample size of 100 students which consist 40 women and 60 men.

  Creating application to test class rectangle

Write down application to test class Rectangle.

  Recursive method to replace all occurrences of character

Write down the program which uses the recursive method to replace all occurrences of character with another character in given sentence.

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